public class Sandwich { private String name; private double cost; private boolean diet; public void init() { // updating the instance variables name = new String("HamCheese"); cost = 2.50; diet = false; } public void print() { // accessing the instance variables System.out.println("Name: " + name + ", Cost: " + cost); System.out.println("Diet: " + diet); System.out.println(""); } public String getName() { return name; } public double getCost() { return cost; } public boolean getDiet() { return diet; } public void setName(String theName) { name = theName; } public void setCost(double theCost) { cost = theCost; } public void setDiet(boolean theDiet) { diet = theDiet; } }