Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java . . . Suppose: There is a store that sells: Goods, each of which has the following attributes: a description a price (per item)
java
. . . Suppose: There is a store that sells: Goods, each of which has the following attributes: a description a price (per item) a quantity (items on hand) And one method a toString() The types of goods are: o Food with an attribute "calories". Food objects are not taxable. o Toy with an attribute "minimumAge". Toy objects are taxable. Book with an attribute "author". Book objects are taxable. . o A Taxable item, Has a taxRate of 6 percent (0.06), Has a calculate Tax () method. Define a project with name Interface Concept to define these classes and the interface according to the following this UML. . interface >> Taxable +taxRate =0.06 abstract Goods -description: String -price: double -quantity: int +getters +setters +toString(): String + get TotalPrice (): double +calculate Tax (): double is-a is-a is-a Food -calories: double +constructor +toString (): String +setter +getter +get TotalPrice (): double Book -author: String +constructor +toString: String +calculate Tax (): double setter +getter +get TotalPrice (): double Toy -minimumAge: int +constructor +toString: String +calculate Tax (): double +setter +getter +get TotalPrice (): doubleStep 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