Use the UML diagram given to create the 3 classes and methods. The class house is an abstract class. The method forsale(
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Use the UML diagram given to create the 3 classes and methods. The class house is an abstract class. The method forsale(
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!