Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started