Need to write a program that will use arrays to store rent by floor and display
ID: 3634500 • Letter: N
Question
Need to write a program that will use arrays to store rent by floor and display the rent for the selected floor
Process Logic
In this project, you will create a program, using an array, which keeps a list of the rent rates for an apartment building. The rent rate for an apartment depends on which floor the apartment is located on and every apartment on the same floor has the same rent rate. The program shall read the name of the apartment building, how many floors the apartment building has, and get the rental rates for each of the floors. Once the rental rates are provided, the program shall list the rates. The program user shall be able to provide a floor number and the program will display the apartment building name, the total number of floors, the requested floor, and how much the rent is for the given floor.
The customer has several apartment buildings to choose from. The smallest apartment building has three floors and the largest apartment building has 20 floors. The program shall validate that the floor number is between the minimum and maximum floor values. Also, the minimum rental rate for any building is $1,000 per month, while the highest rent is $2,500. The program shall validate that the provided rental rates are within the minimum and maximum rates.
The following is the Object, Property, Setting, Event chart for the form controls, and each input field will have a label/input field pair. Also, group the related information in the associated group box.
The form and form controls will be logically placed on the form, the controls aligned and sized, and a logical tab order will be assigned to each of the form controls.
Design Requirements:
Your program will incorporate the following design features:
The Form
Object Property Setting
frmRentList Text Apartment Rent List
lblHeading Text Name, Course Title, Week Number, Lab Title
grpApartmentInfo Text Apartment Building Information
lblName Text Apartment Name:
txtName Text (empty)
lblNumFloors Text Number of Floors:
txtNumberFloors Text (empty)
lstRents Items (empty)
btnRentData Text Get Rent List
grpFloorRequest Text Floor Request
lblFloor Request Text Requested Floor
txtFloorRequest Text (empty)
btnGetFloorRent Text Get Floor Rent
grpResults Text Rent Results
lblRentResults Text (empty)
grpOperations Text Operations
btnClear Text Clear
btnExit Text Exit
The Event Handlers
Use the following as the design for your event handlers, referring to the flowchart for rules on input validation and processing. The final calculation SHOULD NOT be completed until all the input fields are validated
Control Name Event Task
txtName
Validating
Get apartment name
Validate apartment name
txtNumberFloors
Validating
Get number of floors
Validate number of floors
btnRentData
Click
Collect Floor Rent
Get Data
Add to lstRents
txtFloorRequests
Validating
Get requested floor
Validate requested floor
btnGetFloorRent
Click
Find Floor Data
Display Floor Data
btnClear
Click
Clear all textboxes and output label
btnExit
Click
Close program (Hint: use “Me.close”)
frmRentList
Load
Clear all textboxes and output label (Hint: call the ClearFields module)
To execute your code, click Start and then start debugging. Check your output to ensure that you have space(s) where appropriate. If you need to fix anything, close your execution window and modify your code as necessary and rebuild.
txtName
Validating
Get apartment name
Validate apartment name
txtNumberFloors
Validating
Get number of floors
Validate number of floors
btnRentData
Click
Collect Floor Rent
Get Data
Add to lstRents
txtFloorRequests
Validating
Get requested floor
Validate requested floor
btnGetFloorRent
Click
Find Floor Data
Display Floor Data
btnClear
Click
Clear all textboxes and output label
btnExit
Click
Close program (Hint: use “Me.close”)
frmRentList
Load
Clear all textboxes and output label (Hint: call the ClearFields module)
Explanation / Answer
Did you ever figure it out???
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.