Question: - -- Typy ul. Create a class named Sandwich Data fields include a String for the main ingredient (such as tuna), a String for bread

 - -- Typy ul. Create a class named Sandwich Data fields

- -- Typy ul. Create a class named Sandwich Data fields include a String for the main ingredient (such as tuna), a String for bread type (such as wheat), and a double for price (such as 4.99) Include methods to get and set for each of these fields. Add a constructor which sets the price field to 0.00, the ingredient-lo "undefined", and the bread type-to unknown Create an application class named Test Sandwich that instantiates three Sandwich objects and accepts user's input to specify field values for each Sandwich object (e.g. "Tuna" "Wheat", 4.99 ) Use Scanner class or JOptionPane for data inputs Submit two java files (Sandwich.java and Test Sandwich.java) and one MS Word .doc file with the screen shots of the running application and detailed explanation of your solution Do not forget to include the proper comments for each of the statements in both Java classes and the application header in the TestSandwich java file Zip all three files (twojava file and MS Word file) as one zip archive

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!