Question: need explaination of this problem Liquid -name: String -color: String -nutrition Value: double -amount: double +Liquid(type: String, color: String, nutritionValue: double, amount: double) +setName(type: String):void
need explaination of this problem

Liquid -name: String -color: String -nutrition Value: double -amount: double +Liquid(type: String, color: String, nutritionValue: double, amount: double) +setName(type: String):void +getName():String +setColor(color: String):void +getColor():String +setNutrition Value(weight: double):void +getNutritionValue():double +setAmount(amount: double):void +getAmount():double +drink(amount: double):boolean Member/Method name furColor nutrition Value amount setName getName setColor getColor setNutrition Value getNutrition Value setAmount getAmount drink Definition String holding the name of the liquid String holding the color of the liquid double storing the liquid's nutritional value double storing how much liquid remains Sets the attribute name to the value of the String passed in as a parameter Returns the value of the class attribute name Sets the attribute color to the value of the String passed in as a parameter Returns the value of the class attribute color Sets the class attribute nutrition to the value of the double passed in as a parameter, include logic to ensure that this attribute does not exceed 100 or go below 0. Returns the value of the class attribute weight Sets the attribute amount to the value of the double passed in as a parameter, ensure that amount does not drop below 0 Returns the value of the class attribute amount Decrements the attribute amount by the value passed in as a parameter. Returns true if the attribute amount > 0, otherwise false.
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
This problem presents the design and implementation of a class named Liquid with several attributes and methods related to managing liquid properties ... View full answer
Get step-by-step solutions from verified subject matter experts
