Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2.2. Wrie appogram that: 6) Asis the user to enter the sure of a one dimensional aray of Strings they would tike to cesle ixing

image text in transcribed
Q2.2. Wrie appogram that: 6) Asis the user to enter the sure of a one dimensional aray of Strings they would tike to cesle ixing user input - you can assume they eater a valud nurber. You should dedare in array et that aire. (5) Uaing iser ipput rad in the contents of the array wich should be in the lorm of stings. (E) Counts the number of occuntences of the letter "ar in the a aray. (iv) Replece every occurrence of the letter T with a in and stoee 1 back in the ortginal slinge of the amay. (v). Pilit the contents of the array. Q2.3 Wrte a peogram that will use a fwo dimensional array to atore [22 marks] detais of roidal accomrnodation in Maynooth. The array should Atore data in the following format Id, no_octupants. total weely, iert vacant The vacant field can have one of 2 values - O or f to represent that the houte is uncocivpied f0) or that the house is occupled (1) For exariple, one row of the array might store the folowing data c101\%, abl, es00\%, k1) Your programs should (0. ask the user bo enthe the number of properties they would ane thored in the array and creale an appropriate armay. cast. Panedat5 daniery 2018 (0) ask the isser to inout data to the aney for nach proverty you can aswime that the weer enters eve ourfect data boes. (ii) return the tolal number of occuparts in all ecouptid properties along with the totel rent per week pad by theie ocouparts. The pregain should then prirt at the averiget. rental. fick Poit out the contents of Bw airay in Fie folsowing format Proserty 0 101, 5, 400, 1. Preperty t.102, 4, tooe. 0 Prosenty 2. 103.2,600,1 (v) The gropram shoudg Anen incieale the weeky front for each preperty by 6100 ars resatoulate the sverage weeky rental price of al occupind propertes. (vi) The delalk of the if property stored need to be arnensted to the tollowing values: 4105,4=,10005,1p

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

4. Who would lead the group?

Answered: 1 week ago

Question

2. What type of team would you recommend?

Answered: 1 week ago