Question: Is this correct(and efficient) code and if not can you please correct and explain why. These are the requirements i'm following so base your responses
Is this correct(and efficient) code and if not can you please correct and explain why. These are the requirements i'm following so base your responses on it too

code java//
public class main {
public static void main(String[] args) { restaurant hi= new restaurant(); hi.serveCheeseBurger(9); System.out.println(); // TODO Auto-generated method stub
}
}
public class OutOfStock extends Exception { }
public class restaurant { private String name; private int order; private int stock=6;
public void setName() { this.name=name; } String getName() { return name; } void serveCheeseBurger(int order){ //if(stockUp==0) { try { for(int i=0; i } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
