Question: Question 1 language java Create a class named Pizza. Data fields include a String for topping (such as pepper-onion), an integer for diameter in inches
Question 1
language java
Create a class named Pizza.
Data fields include a String for topping (such as pepper-onion), an integer for diameter in inches (such as 12) and a double for price (such as 13.99).
Include the following operations:
-default constructor
- constructor with parameter to assign values for each of data fields
- setter methods
- getter methods
- toString method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
