Question: Java Write the abstract class, abstractHouse, which has: o an integer variable for the number of rooms in the house o a double variable for

Java

Java Write the abstract class, abstractHouse, which has: o an integer variable

for the number of rooms in the house o a double variable

Write the abstract class, abstractHouse, which has: o an integer variable for the number of rooms in the house o a double variable for the value of the house o an integer variable for the amount of work required on the house o an integer variable to act as a work counter, tracking the amount of work done on the house o an abstract void method to calculate the value of the house o an abstract Boolean method to perform work Write the Mansion class implementing the abstractHouse class. You may refer to the Trailer class for hints on implementation. The mansion class must have: o an integer variable for the number of floors o a Boolean variable indicating if it has a driveway, if it has one increase the house value by 200 and work required on the house by 20 o a Boolean variable indicating if it is furnished. If it is, increase the value by 500 and the work required by 100 o implemented abstract methods o a constructor that takes as much input the number of rooms, the number of floors, a Boolean value hasDriveway and a Boolean value is Furnished Write a class for a job that involves working with houses other than the Contractor. You may refer to the Contractor class for implementation ideas. This class must: o maintain a Queue of houses that are either being currently worked on or will be worked on o call the implemented abstract methods in the queue o a double variable, wallet, initially at O that tracks the amount of money earned from completing house jobs o an integer counter, tracking the number of houses completed o when all jobs are completed, summarize the number of jobs completed and amount earned o randomly add new jobs of a random house type, be careful with this as you could enter an infinite loop. Refer to the numbers used in Contractor for an approach. Extend Your Learning Exceed the Expectations: Does the doWork() method need to be abstract? Try to refactor the program so that doWork() is not abstract but may call an abstract method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!