Demonstrates the use of pizza set and get methods


Discuss the below:

Q1: Create a class named Pizza. Data fields include a String of toppings (pepperoni, sausage, cheese, onions etc.) an integer for diameter in inches (such as 12, 14 or 16) and a double for price such as 13.99, 15.99. 17.99). Include methods to get and set values for each of these fields. Save as Pizza.java

Q2: Create an application named TestPizza that instantiates on Pizza object and demonstrates the use of Pizza set and get methods. Save as TestPizza.java

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Demonstrates the use of pizza set and get methods
Reference No:- TGS01934552

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)