Question: IN JAVA We are going to make a sandwich project. A sandwich is defined by a name, number of calories (integer is fine), and price.
IN JAVA
We are going to make a sandwich project.
A sandwich is defined by a name, number of calories (integer is fine), and price. Users should be able to create a sandwich given its name, number of calories, and price. If the informed number of calories or price is negative, make sure those values are initialized to zero. Please use toString and a method called isHealthy that returns true if the number of calories is less than 250, false otherwise. Define 250 as a class variable (static) constant (final).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
