Question
Develop a menu system like the lab 5d in Lesson 5. Your choices should be: [0] to Exit [1] Display All Houses in the Subdivision
Develop a menu system like the lab 5d in Lesson 5. Your choices should be:
[0] to Exit [1] Display All Houses in the Subdivision [2] Add a House to the Subdivision [3] Delete a House in the Subdivision [4] Change a House in the Subdivision [5] Filter Subdivision by Total Area and Display [6] Filter Subdivision by Plot Size and Display [7] Sort Subdivision by Total Area and Display [8] Sort Subdivision by Plot Size and Display [9] Save Subdivision to Text File Enter a number from 0 to 9:
Details:
On StartUp (before any menu is displayed) load the current subdivision.txt file in an instances of a Subdivsion class.
Option 1 - use the list method from Subdivision and display all
Option 2 - Prompt the user for all 5 house values, create a house and then add the house to the Subdivision
Option 3 - Prompt for the position of the House to be deleted
Option 4 - Prompt for the position of the House to be changed, prompt for new Style and update the House with the new style. Only allow style to be changed.
Option 5 - Prompt for minimum and maximum area and then display. Use the listByArea method in Subdivision.
Option 6 - Prompt for minimum and maximum plot and then display. Use the listByPlot method in Subdivision.
Option 7 - Display the sorted Houses. Use the sort by TotalArea method in Subdivision.
Option 8 - Display the sorted Houses. Use the sortByPlotSize method in Subdivision
Option 9 - Write the Subdivsion back to disk. Overwrite the previous version of subdivision.txt
Hint:
Since options 1,5,6,7 and 8 all display houses you may want to code a method to do that and call it from each option choice. Make sure you are displaying the correct ones and in the correct order.
private static void showSubdivision(ArrayListsubDivisionToShow) { // used many times to show all the Homes }
If you did this correctly you should not have to make any changes to your House class or your SubDivsion class.
use java
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