-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDishTools.java
More file actions
21 lines (15 loc) · 983 Bytes
/
DishTools.java
File metadata and controls
21 lines (15 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class DishTools {
public static int AVERAGE_COST_OF_DISH_IN_CENTS = 1300;
public void printSummary(){
System.out.printf("");
};
}
/* SHORT ASSIGNMENT #2 --
Create a class of static members (variables and methods) called DishTools
- AVERAGE_COST_OF_DISH_IN_CENTS - an integer constant set to 1300
- shoutDishName() - that takes in a Dish object and prints out the name in all caps
- analyzeDishCost() - that takes in a Dish object and will print out either “More expensive than average” or “Less expensive than average”, depending on the value of the dish costInCents compared to AVERAGE_COST_OF_DISH_IN_CENTS
- flipRecommendation() - that takes in a Dish object and reverses the wouldRecommend boolean value
Try out the DishTools methods with Dish objects in the DishTest main method
BONUS - add some static methods to the Dish class that compares two dishes in some way
*/