Question: Create a * class* named lastnameSandwich. Data fields include a String for the main ingredien t (such as Tuna), a String for the bread type
Create a *class* named lastnameSandwich. Data fields include a String for the main ingredient (such as Tuna), a String for the bread type (such as wheat), and a Double for price (such as 4.99) . Include methods to get and set values of each of these fields. Save the class as lastnameSandwich.java
Create an *application* named lastnameTestSandwich that prompts the user for the data, instantiates one Sandwich object, and displays its values. Save the application as lastnameTestSandwich.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
