In java code format please!!
ASSIGNMENT OVERVIEW
The goal of this project is to practice the programming knowledge and skills that you have acquired so far to implement a pizza ordering system. The user program will provide the user with a menu for ordering pizzas, selecting sizes, and selecting toppings. The menu also provides the ability to order specialty pizzas that have custom configurations and rules that must be incorporated into the program’s logic.
Objectives:
This project focuses on the following learning objectives:
Implementing logic using more complex Java objects and classes
Practicing debugging larger, more sophisticated programs
Applying knowledge of arrays or ArrayLists into your program solution
Applying inheritance to avoid duplication of code logic
Reading:
Read and review the following chapters to assist you in completing this project.
Chapter #7: Arrays & the ArrayList Class
Chapter #8: A Second Look at Classes and Objects
Chapter #10: Inheritance
Assignment Turn-in: You must submit your source code, so we can assess your implementation. In other words, you must submit .java files. If you submit a .class file, you will receive 0 points. You must submit the following .java files. If you decide to use enumerations as part of your design, then those should also be submitted (Size.java and Topping.java)
Driver.java (contains main)
Pizza.java
PizzaOrder.java
Size.java (optional)
Topping.java (optional)
VeggieLoversPizza.java
MeatLoversPizza.java
ASSIGNMENT DETAILS: Part #1: Pizza Class
Referring to the UML diagram below, build a Pizza class. It is recommended using enumerations called Toppings and Size. You can download some sample code defining the Toppings and Size enumerations and a driver class here to assist you here: (Topping.java, Size.java, EnumDriver.java).
Alternative design approaches: Students may (at their discretion) choose to:
Avoid using enumerations and implement the same desired functionality by treating the size and toppings as String data types. If you follow this approach, your mutator (or setter) methods must prevent setting size to anything other than (small, medium, or large) and prevent adding a topping to the array other than (pepperoni, sausage, peppers, or onions).
You can choose to implement the toppings data member as either an ArrayList or an array.
Define fields size and toppings within the Pizza class with data types consistent with the UML design shown above (or
the alternative design options discussed above).
Implement the following methods in addition to the other accessor and mutator methods:
addTopping: adds one additional topping into the toppings array (or ArrayList). Display an error message if the topping has already been added and do not add the topping.
getPrice: returns price of the pizza. Assume that price is $1 per toppings, plus $10 for a small, $15 for a medium, and $20 for a large.
display: Displays to the console the snapshot of the pizza. Follow the formatting standard shown below.
Define a field that stores an ArrayList of Pizzas (It’s also acceptable to implement this as an array and can assume a max
order size of 20 pizzas). This class should contain the following methods:
addPizza: adds one additional pizza into the array (or ArrayList)
getPrice: Returns the price of all pizzas in the order
display: Displays all the pizzas that have been added to the order following the formatting standards shown
below. In addition to listing the order information, it should display the subtotal, the tax (based off an 8% sales tax rate), and the total that includes taxes. The tax rate should be defined as a private constant variable in the Pizza class.
These classes represent specials that have specific sizes, toppings, and prices which cannot be changed. Override
methods to implement the desired functionality documented below:
• VeggieLoversPizza: o Size:Large
o Toppings: Onions and Peppers
o Price: Special price $17 • MeatLoversPizza:
o Size:Large
o Toppings: Pepperoni and Sausage o Price: Special price $18
If someone attempts to modify these attributes above, they should be prevented from changing these configurations and an error message should be displayed.