Question: 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 (): double
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
