Final answer:
To create a Pizzoa class, define the required attributes and methods. In the application class, create an object of the Pizzoa class and assign the manager name. Use conditional statements to call the appropriate methods based on user input.
Step-by-step explanation:
To create a class for a pizzoa, you can define the attributes required for the class such as the manager's name. One way to store the menu items is to use an ArrayList. Below is an example implementation:
import java.util.ArrayList;
public class Pizzoa {
private String managerName;
private ArrayList<String> menuItems;
public Pizzoa(String managerName) {
this.managerName = managerName;
menuItems = new ArrayList<>();
}
public void addItem(String item) {
menuItems.add(item);
}
public void deleteItem(String item) {
menuItems.remove(item);
}
public void displayMenu() {
System.out.println("Menu: ");
for (String item : menuItems) {
System.out.println(item);
}
}
}
In the application class, you can create an instance of the Pizzoa class and assign the manager name using the object reference. Then, you can display the menu and take user input for desired choice of button. Based on the input, you can use conditional statements to call the appropriate methods of the Pizzoa class.