. Carly's Catering provides meals for parties and special events. In Chapter 2, you wrote an application that prompts the user for the number of guests attending an event, displays the company motto with a border, and then displays the price of the event and whether the event is a large one. Now modify the program so that the main() method contains only three executable statements that each call a method as follows:

Answer :

mudamoon97

Answer:

Explanation:

public class Event

  public final static int PRICE_PER_GUEST = 35;

  public final static int CUT_OFF = 50;

 

  //Attributes

  private String eventNum;

  private int noOfGuest;

  private int price;

 

  /**

  * param eventNum the eventNum to set

  */

  public void setEventNum(String eventNum)

      this.eventNum = eventNum;

 

 

  /**

  * param noOfGuest the noOfGuest to set

  */

  public void setNoOfGuest(int noOfGuest)

      this.noOfGuest = noOfGuest;

      this.price = this.noOfGuest * PRICE_PER_GUEST;

 

 

  /**

  * return the eventNum

  */

  public String getEventNum()

      return eventNum;

 

 

  /**

  * return the noOfGuest

  */

  public int getNoOfGuest()

Other Questions