Create a class named sandwich. data fields include a string for the main ingredients(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 values for each of these fields. save the class as sandwich.java.
part 2
create an application named testsandwich that instantiates one sandwich object and demonstrates the use of the set and get methods. save this application as testsandwich.java
i am awarding 750 points if both parts are complete and compile and run correctly. both most be done in order to get points for this. this is an exercise from chapter 3 of joyce farrell java programming only use things that have been learned in the first 3 chapters. for your

Solved
Show answers

Ask an AI advisor a question