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.

Write a java application that contain the following classes A) Pizza class

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

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!