Question: Write a java application that contain the following classes A) Pizza class that contains the following 1- private Data fields - Size (e.g. small, medium,
Write a java application that contain the following classes A) Pizza class that contains the following 1- private Data fields - Size (e.g. small, medium, and Large) - price (e.g. small (10 CAD), medium (12 CAD), and Large (15 CAD)) - number of Pizzas 2- public Methods: - Two constructors - Setters and Getters (setters should check that in put is valid) - total that returns the total price (users buying three pizzas or more gets 15% discount) - to string method B) Main class that contains main method Inside the main method - Create Array of Pizza objects - Display the array on Console.
Requirements: Write a java application that contain the following classes A) Pizza class that contains the following 1- private Data fields Size (e.g. small, medium, and Large) price (e.g. small (10 CAD), medium (12 CAD), and Large (15 CAD)) number of Pizzas 2- public Methods: W Two constructors Setters and Getters (setters should check that in put is valid) total that returns the total price (users buying three pizzas or more gets 15% discount) to string method B) Main class that contains main method Inside the main method Create Array of Pizza objects Display the array on Console Marking
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
