Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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(ArrayList subDivisionToShow) { // 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

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

Project Management A Systems Approach to Planning Scheduling and Controlling

Authors: Harold Kerzner

10th Edition

978-047027870, 978-0-470-5038, 470278706, 978-0470278703

Students also viewed these Databases questions