Question: QUESTION 2 (15 MARKS) Given the following information for class Land and its subclasses. Class name: Land Attributes: String owner; double area; Methods: constructors, mutator,

QUESTION 2 (15 MARKS) Given the following information for class Land and its subclasses. Class name: Land Attributes: String owner; double area; Methods: constructors, mutator, retriever, printer public abstract double calcTax () Subclass name: Housing Attributes: char houseTypeCode; Methods: constructors, mutator, retriever, printer Subclass name: Agriculture Attributes: String plant Type; Methods: constructors, mutator, retriever, processor, printer a) Write the calcTax() method for both subclass. For housing, the tax depends on the area and the type of house built on the land. House Type Code House Type Tax Rate per (RM/m^3 area) T Terrace 10 S Semi-detached 15 B Bungalow 20 For Agriculture, the tax rate is fixed to RM3 per meter square area. However, if the land is used to plant Paddy", the owner will get tax discount of 10%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
