Create beverage classprovide instance fields for name


Problem

Create Beverage class. Provide instance fields for name, sizeInOunces, and calories (for example, "Whole Milk", 8, 145). Each of these should be accessible only within the Beverage class. Create constructor, which initializes the instance fields Write toString() method, modeled after the standard Java toString() method, to return a String representation of the Beverage. Write equals() method, modeled after the standard Java equals() method. Two Beverages are equal if they have the same name and sizeInOunces.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create beverage classprovide instance fields for name
Reference No:- TGS03256770

Expected delivery within 24 Hours