Question: Please solve this using simple CSS 1 (beginner course/ java 1) programming methods like for loops, if statements, arrays and method only used in the

 Please solve this using simple CSS 1 (beginner course/ java 1)

Please solve this using simple CSS 1 (beginner course/ java 1) programming methods like for loops, if statements, arrays and method only used in the first programing courses. This is because I won't understand really complicated methods since I haven't learned them yet. Thank you!

Part 2 Warming-up to Objects Create a class named Pizza that stores information about a single pizza. It should contain the following: Private instance variables to store the size of the pizza (either small, medium, or large), the number of meat toppings, the number of veggie toppings and whether or not the pizza should be vegan-friendly (in which case you must make sure that the number of meat toppings is 0). Constructor(s) that set all of the instance variables. No-args defaults should be medium, no toppings, non- vegan Public methods to get and set the instance variables. A public method named calcCost that returns a double that is the cost of the pizza. Pizza cost is determined by: o Small: $10 o Medium: $12 o Large: $14 o Each meat topping cost $2 and each veggie topping cost $1 o If the pizza is vegan, it costs an additional $2 A public method named getDescription that returns a String containing the pizza size, whether it is vegan or not, quantity of each topping, and the pizza cost as calculated by calcCost In a class named Pizzaria, write test code to create several pizzas and output their descriptions. You can create the pizzas "manually" and test each pizza. For example, a large pizza with pepperoni and green pepper toppings should cost a total of $17. The description for such pizza would be as follows: Large pizza, not vegan, 1 meat topping, 1 veggie topping: $17.00 dollars

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!