Question: Help Java programming ,class named CookingMeasures declare two constant feilds 1 cup = 48 tablespoons 3 teaspoons = 1 tablespoon feilds teaspoons tablespoons cups two
Help Java programming ,class named CookingMeasures
declare two constant feilds
1 cup = 48 tablespoons
3 teaspoons = 1 tablespoon
feilds
teaspoons
tablespoons
cups
two constructor method:
no args constructor sets all feilds values to zero except the constants. the constants are set using the conversions
the overloaded constructor accepts a value for the number of cups and calculates the value of the other two fields
three set methods thats allow the user to change any measures (set cups, tablesppons, and teaspoons) The set methods must perform calculations to ensure all the three feilds remain consistent
get methods (not including constants)
toString() method that concentrates all the fields values along with labels stating the title of the fileds
the driver class..
one instance of the CookingMeasure class using the default values
loop that allows the user to reset any of the three measures using the set methods
ask the user needs to enter which measure to change, read in the value and call the appropriate set method.
then print the state of the object by calling the toString() method. until she or he wants to quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
