Question: The DessertItem class will: be changed to an abstract class include an additional attribute, taxPercent, which will be set to 7.25 via Explicit Field Initialization

The DessertItem class will:\ be changed to an abstract class\ include an additional attribute, taxPercent, which will be set to 7.25 via Explicit Field Initialization\ have no changes to the constructors\ include two new methods, getTaxPercent() and setTaxPercent(double) to retrieve and modify the taxPercent instance variable\ include a new abstract method, calculateCost()\ include a new method calculateTax() which will calculate and return the actual tax for the item\ \ \ All subclasses (Candy, Cookie, IceCream, Sundae) will include:\ a new method, calculateCost(), which will override the superclass's method and return the correct cost for the item\ Note: The cost of a Sundae is the cost of the ice cream used plus the cost of the topping\ \ The Order class will:\ include a new method, orderCost(), which calculates and returns the total cost for all items in the order\ Include a new method, orderTax() which calculates and returns the total tax for all items in the order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!