Use the UML diagram given to create the 3 classes and methods. The class house is an abstract class. The method forsale(
Posted: Fri May 20, 2022 11:18 am
Use the UML diagram given to create the 3 classes and methods. The class house is an abstract class. The method forsale() and location() are abstract methods in the House class The forSale method returns a String that states the type of villa or apartment available example : “1 bedroom apartment” The location method is of type void and prints in the output the location of the villa and apartment, example: “the villa is in corniche” Finally create a test class. In the test class make two different objects called housel and house2 and print the forsale and location method for apartment and villa House +for Sale(): String +location(): Void Apartment +toString(): String Villa +toString(): String