Okay this is my Homework assignment
The Pizza With Pizzazz Pizza Parlor sells nothing but pizza. Design an object-oriented computer program by doing the following:
a. Create the class diagram and pseudocode for the Pizza service class that contains the toppings for the pizza, the size of the pizza in inches, and the price of the pizza. Sample toppings are: “pepperoni, onions”, and “mushrooms, sausage, black olives”. For this class definition, include the following:
i. A default constructor that initializes each attribute to some reasonable default value for a non-existent pizza.
ii. Another constructor method that has a parameter for each data member. This constructor initializes each attribute to the value provided when an object of this type is instantiated.
iii. Accessor and mutator methods for each attribute.
iv. A method that prints all the data about a pizza.
b. Create the class diagram and pseudocode for the application class PizzaParlor with a main() method that instantiates two objects of the Pizza class. The first object should be named plainPizza and use the default constructor. The second object should be named deluxePizza and use the second constructor to initialize the toppings to “pepperoni, sausage, ham, mushrooms, onions, extra cheese, black olives, tomatoes”, the size of the pizza to 12, and the price to 15.50. Include the following instructions in the main() method.
i. A statement that prints all the toppings on the deluxePizza, using the appropriate method call.
ii. A call to set the price of the plainPizza to 8.50.
iii. A call to set the toppings of the plainPizza to “cheese”.
iv. A call to set the size of the plainPizza to 10.
v. A statement that prints the price of the plainPizza, using the appropriate method call.
vi. A call to change the price of the deluxePizza to 17.50.
vii. A call for the deluxePizza to the method that prints all the information about the pizza.
So this is what I gathered so far for part I of problem
Pizza (class)
Topping = string
Size and Price = Num (all 3 are attributes)
Pizza () (default constructor)
Pizza (String names, num amount)
gettopping (String), same for the others getsize (Num), getprice (Num)
settopping (newTopping : String) : void (and vice versa)
printdata (): Void
But when I get to part II of the assignment then it gets confusing, so after I re-worked everything with I and II together, I assumed maybe create one BIG Class Diagram and Pseudocode.
Pizza Service and Pizza Parlor (class)
toppings, price, size (attributes)
Pizza () (everything from Pizza to setdeluxe are constructors, accessors, and modifiers).
plainPizza (toppings, size, price)
deluxePizza (cheese, 15.50, 12)
getplainPizzatoppings (Sting)
setplainPizzatoppings (Cheese : String) : void
getdeluxePizzaprice (Num)
setdeluxePizzaprice (17.50 : num) : void
Printdata () : void
So I am not sure if that's even close to being accurate or am I doing the assignment correctly, are there suppossed to be 2 diagrams or 1, and am I setting up all the constructors as well as gets and sets (CALLS) correctly or not.
What am I missing in the solution, are there any flaws in it, is there anyway it can be fixed?
Any and all help will be GREATLY appreciated, thank you for your time.