Answered step by step
Verified Expert Solution
Link Copied!

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:
Rent-Me Management Company has control of a maximum of ten (10) rental units. Rent-Me 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 he/she 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.
Rent-Me 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 4 arrays as follows:
Array 1: An array of characters which will contain the last name of the owner.
Array 2: An array of integers which will contain the number of bedrooms, bathrooms and the availability status of the unit.
Array 3: 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 4: 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 1 and Array 2 are parallel arrays. They work in conjunction with each other.
NOTE: Array 3 and Array 4 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 <0
Number of entries cannot exceed the maximum number manageable by Rent-Me (message to owner re not being able to handle the entry)
C. As the Rent-Me management company representative
Search for the name of an owner and print the unit (bedroom/bathroom) 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

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_2

Step: 3

blur-text-image_3

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 Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

Students also viewed these Databases questions

Question

What is the auditor's responsibility regarding fraud risk?

Answered: 1 week ago

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago