subject

Write a Java application that includes the following: Sophie, Sally and Jack's financing for their real estate development business is going well. The next step is to create a prototype Subdivision class.
Write a class Subdivision
A Subdivision has only one instance variable, an ArrayList of House elements
Subdivision has a single, no argument constructor.
Accessors
House get(int position) returns the House occupying the given position in the Subdivision. The first house added to the Subdivision is position 0, the next house added is position 1, etc.
ArrayList < House > list() returns the list of houses in this subdivision. The houses in the returned list are in the same order as they were added to the subdivision.
ArrayList < House > listByArea(double floor, double ceiling) returns the list of houses whose total area is greater than or equal to floor, and less than or equal to ceiling. The houses in the returned list are in the same order as they were added to the subdivision. If there are no such houses in the subdivision, an empty list is returned.
ArrayList < House > listByBedrooms(int floor, int ceiling) returns the list of houses that have greater than or equal to floor bedrooms, and less than or equal to ceiling bedrooms. The houses in the returned list are in the same order as they were added to the subdivision. If there are no such houses in the subdivision, an empty list is returned.
int size() returns the number of houses in the Subdivision
String toString() returns a String representation of the Subdivision
Mutators
boolean add(House houseToAdd) adds a House to the Subdivision. add returns true if the House was added successfully, false otherwise.
Test Class
Write a class Phase1 that has only a main method. Phase1 is a console program that asks the user for the number of houses to be added to a Subdivision. For each House, the program asks the user for that House's information and adds it to the Subdivision . When all the houses have been entered, it prints the size of the Subdivision , and the contents of Subdivision ordered by position. The program asks the user for floor and ceiling values for total area, and displays the houses whose total area is between or equal to those values. It similarly asks the user for floor and ceiling values for the number of bedrooms, and displays the houses whose number of bedrooms is between the floor and ceiling (inclusive).
Grading Elements
Subdivision has a single instance variable of type ArrayList
Subdivision has a single no argument constructor
All methods return the designated type and have correct signatures
All methods return the correct values
Returned lists have the proper order of House elements
Accessors do not change the state of the Subdivision (i. e., they do not change the instance variable)
add places Houses into the Subdivision at the correct position
Phase1 provides the specified operation to test Subdivision

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
You know the right answer?
Write a Java application that includes the following: Sophie, Sally and Jack's financing for their...
Questions
question
Mathematics, 13.10.2019 20:50
question
English, 13.10.2019 20:50
question
Geography, 13.10.2019 20:50
Questions on the website: 13722363