I know it\'s very beginner stuff but struggling on this, I have been looking at
ID: 3732439 • Letter: I
Question
I know it's very beginner stuff but struggling on this, I have been looking at tutorials and tried a bunch of different things, but nothing seems to work.
change the constructor from:
to:
This will cause a number of warnings and compiler errors. You will need to update the rest of the class based on this new parameter, while still keeping all the method names and return types unchanged. Take note of the parameter's type PizzaType, which refers to the provided enum PizzaType.java. This allows you to use the methods in PizzaType to enable you to write cleaner code.
Explanation / Answer
package oop.PizzaModified; public class PizzaModified { PizzaType pizzaType; PizzaModified(PizzaType type) { this.pizzaType = type; } public int price() { return pizzaType.price(); } public String type() { return pizzaType.toString(); } }