Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:10, o10922025
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, carter1809
Choose the answers that best complete each sentence. on average, are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, jacobbecker99
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u. s. 483 (1954). b. international shoe co. v. washington, 326 u. s. 310 (1945) c. haynes v. gore, 531 u. s. 98 (2000). d. international shoe co. v. washington, 14 u. s. code 336.
Answers: 1
image
Computers and Technology, 23.06.2019 20:40, bobby3350
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
Do you know the correct answer?
Write a Java application that includes the following: Sophie, Sally and Jack's financing for their...

Questions in other subjects: