Question: Please create a JAVA program by following these directions: How to start the first program: (compile only) // your name class Ch4lastnameSandvich I/ define 3
Please create a JAVA program by following these directions: 
How to start the first program: (compile only) // your name class Ch4lastnameSandvich I/ define 3 variables private String mainlng private String bread; private double price, // set and get maingredient public void setMainlngredient(String ingredient) // receives ingredient from the second program mainlngredient = ingredient, public String getMainIngredient /// returns mainIngredient to the second program return mainlngredient /I/ set and get bread How to start the second program: (compile and run) II your name import java.unili.Scann public static void main (String args[]) Ch4lastnameSandwich sandwich = new Ch4lastnameSandwich(); // instantiates (creates) one Sandwich object // define 3 variables String ingredient String bread; double price: Scanner input = new Scanner(System.in); System. out. print("Enter main sandwich ingredient >> "); igredient = input.nextLine(); finish the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
