Question: Solve in Java Please Using the Pizza class documentation, implement the method stubs according to the code comments provided in PizzaTester. You may write whatever
Solve in Java Please





Using the Pizza class documentation, implement the method stubs according to the code comments provided in PizzaTester. You may write whatever code you like in the main method of PizzaTester since the submission tab will test only your method implementations. 459534.2193308.93z4y7 \begin{tabular}{l|l} 17 & Scanner console = new Scanner(System.in); \\ 18 & \\ 19 & String faves = "cheese,olive, green pepper, bacon"; \\ 20 & Pizza small = makeSmall(faves); \\ 21 & System.out.println("small pizza: " + small); \\ 22 & \\ 23 & String top = "mushroom"; \\ 24 & adjust(top, small); \\ 25 & System.out.println("adjusted: " + small); \\ 26 & \\ 27 & Pizza p = small; \\ 28 & String rep = report(p, small); \\ 29 & System.out.println("report #1:"+ rep); \\ 30 & \\ 31 & P makeSmall(faves); \\ 27 & adiurtrtan n). \end{tabular} I/ - return the new pizza public static Pizza makeSmall(String choices) \{ return null; I/ delete this line and replace with your code I/ Stub \#2: adjust I/ - determine the number of toppings on the pizza, excluding cheese I/ - if 2 or fewer, simply add choice as a topping /1 - if 3 or more, reset the toppings to be double choice (no cheese) I/ - EX) if the pizza has 3 toppings, and choice is "pepperoni", then the pizza I/ should update to just have pepperoni twice as its toppings. public static void adjust(String choice, Pizza pie) \{ 3 /I Stub \#3: report /I - if pie1 and pie2 refer to the same object, return "share" /I - if pie1 and pie2 have same diameters and toppings /I (but are different actual pizzas), return "twins" /I - if pie1 and pie2 toppings same, return "diams" /I - otherwise return "topps" public static String report(Pizza pie1, Pizza pie2) \{ return ""; I/ delete this line and replace with your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
