Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For your information: Rent - Me Management Company has control of a maximum of ten ( 1 0 ) rental units. Rent - Me can:
For your information:
RentMe Management Company has control of a maximum of ten rental units. RentMe can:
rent an available unit to a renter, and
release rented units back into the available pool.
The information provided by an owner is:
The owner's last name
The number of bedrooms and bathrooms of the rental unit the owner is allowing the Management Company to administer.
An owner is able to add units for rent as long as the number of units controlled by the Management Company does not exceed their maximum capacity.
The renter can
request a unit for rent, and
request to be released from a unit.
In requesting a unit, the renter provides last name and the number of bedrooms and bathrooms for which heshe is searching.
The information from the renter gets put into two parallel arrays: both arrays are two dimensional. One array contains the names of the renter and the name of the owner initially empty and the other array holds the number of bedrooms and bathrooms the renter would like. The name of the owner will get populated when the unit is rented.
RentMe representatives will search to see if there are any renters for whom units have not been assigned. They will search for available units using the required parameters. If one is found, the unit will be rented. This is done by marking the unit as unavailable, and by putting the owner's name in the array with the renter's data.
In this phase of the project, you will:
A Set up arrays as follows:
Array : An array of characters which will contain the last name of the owner.
Array : An array of integers which will contain the number of bedrooms, bathrooms and the availability status of the unit.
Array : An array of characters which will contain the last names of the renter and the name of the owner if the unit is rented, or blank empty string if it is not.
Array : An array working in parallel with the renter array, that will contain the number of bedrooms and bathroom for which the renter is seeking as well as a field to indicate if the renter is seeking a unit or wanting to be released.
NOTE: Array and Array are parallel arrays. They work in conjunction with each other.
NOTE: Array and Array are parallel arrays. They work in conjunction with each other.
NOTE: The name of the owner is used to set the relationship between the two sets of arrays.
B Have the owner enter information with respect to availability of units. Populate the Owner and Available Units arrays with the information.
Validate entries before populating arrays
Numeric values cannot be
Number of entries cannot exceed the maximum number manageable by RentMe message to owner re not being able to handle the entry
C As the RentMe management company representative
Search for the name of an owner and print the unit bedroombathroom data associated with the named entry, if found. If not found, indicate that in a message to the user.
Search for a unit criteria bedroom and bathroom count and print the name of the owner of the first available unit that matches the criteria.
Owner Available Units Renter Renter Request
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started