The following class Pizza has incomplete codes. Write setter and getter methods for all instance variable of the class, create a parameterized constructor of this class, use isLargePizza() method, and toString() method.
public class Pizza {
String name;
double diameter;
//constructor
void Pizza()
{
//Missing Lines
}
public String isLargePizza()
{
// missing lines
}
@Override
public String toString() {
// missing lines
return super.toString();
}
Hint: When the size of the pizza is greater than 20cm, then it must be considered as large pizza. The islargePizza() method must return boolean value indicating whether the pizza is large or not.
Also, correct the given code where necessary.