Menu
support@authoritypapers.com
+1(805) 568 7317

instructions please follow format instructions carefully in the comments and enter c 5122186

INSTRUCTIONS: Please follow format/instructions carefully in the comments and enter code where it saysCODE HERE using Netbeans. Thank you! /* Restaurant client application class and service classes
Create a NetBeans project named RestaurantClient Add two service classes to the project. A class named Store whichwill be a direct superclass of a class named Restaurant. ClassRestaurant will be a subclass of Store.   After you havecreated your NetBeans Project your application and service classesin your RestaurantClient project should contain the followingexecutable code for the RestaurantClient, Store and Restaurantclasses: */ //RestaurantClient application class: package restaurantclient; public class RestaurantClient {     publicstatic void main(String[] args) {     } } Store service class: package restaurantclient; public class Store {      } Restaurant service class: package restaurantclient; public class Restaurant extendsStore{      } —————————————————————————————————————————————

In the RestaurantClient application class main methodcode the instructions to perform the tasks indicated in the remarks: package restaurantclient; public class RestaurantClient{   public static void main(String [] args ){ /* Declare two object references of type Restaurant r1 and r2 andinstantiate two Restaurant objects passing three arguments to theconstructor for the class. Use different values for each classobject. */ // CODE HERE /* Output the restaurant name, number of people served and averageprice per person from both object references r1 and r2 byimplicitly calling the toString method to return the data */ // CODE HERE /* Using the appropriate mutator methods on Restaurant objectreference r2, change the value of the number of people served andthe average price per person to the same values in Restaurantobject reference r1. Do not change the restaurant name. Use theappropriate set methods.*/       // CODE HERE    

/* Using the equals method and a selection control structure (ifstatement), compare objects r1 and r2 and output an appropriatemessage indicating if the objects are equal */ // CODE HERE /* Using the appropriate mutator method (set method) on Restaurantobject r2, change the name of the restaurant to the same name inRestaurant object reference r1. */       // CODEHERE      /* Again, using the equals method and a selection controlstructure (if statement), compare objects s1 and s2 and output anappropriate message indicating if the objects are equal*/      // CODE HERE /* Output the average annual taxes for Restaurant object r1. Formatthe output using the format method on the Decimalformat class.*/ //CODE HERE        } } —————————————————————————————————————————————–

In the Store service class code the instructions todefine your Store service class structure with the appropriateconstructors, mutator methods, accessor methods as well as atoString and an equals method : package restaurantclient; public class Store { /* Declare two instance variables to represent the store name andtax rate. Tax rate identifier will be assigned a constant value.*/ // CODE HERE /** * Code an overloaded constructor * Allows client to setbeginning value for name * This constructor takes one parameter *Calls mutator (setName) method */   // CODE HERE /** getName method * @return a String, the name of the store*/   // CODE HERE /** * setName mutator method: * Allows client to set value of name*/     // CODE HERE /** * toString method accepts no parameters returns a stringrepresentation of the store */     // CODE HERE /** * equals method * Compares two Store objects for the same fieldvalues * accepts store reference as parameter * return boolean,true if this object * has the same field values as the parameterreference object */   // CODE HERE    } —————————————————————————————————————————————————–

In the Restaurant service class code the instructionsto define your Restaurant service class structure with theappropriate constructors, mutator methods, accessor methods as wellas a toString and an equals method. Class Restaurant extends classStore: package restaurantclient; public class Restaurant extends Store { /* Declare two instance variables to represent the the number ofpeople served yearly and the average price per meal */ // CODE HERE /*Overloaded constructor: Allows client to set beginning value forpeopleServed, averagePrice and set the store name in the superclass. This constructor takes three parameters. Calls theoverloaded super constructor with the store name and callsappropriate mutator methods to update instance variables ofRestaurant class. */ // CODE HERE /* getPeopleServed method */ // CODE HERE /* getAveragePrice method. Returns the average price per mealpeople pay at the restaurant */

     // CODE HERE /* setPeopleServed mutator method: Allows client to set value ofpeople served every year. If number of people served yearly isnegative, then number of people served yearly is not changed and amessage is output indicating that the number of people servedcannot be less than zero */ // CODE HERE /* setAveragePrice mutator method: Allows client to set value ofthe average price. If the new value of average price per meal isnegative, then the average price per meal is not changed and amessage is output indicating that the average price per meal cannotbe less than zero */ // CODE HERE /* toString method will return a string representation of therestaurant including the Store name the number of people served andthe average price per person. */ // CODE HERE /* equals method compares two Restaurant objects for the same fieldvalues. You will need to compare the superclass Store name as wellas the number of people served and the average price per person inthe Restaurant class to determine equality. You can usesuper.getName() to return the superclass Store name for comparisonor code the super.equals(Object o) method passing your restaurantobject reference as an argument to the superclass equals method tocompare the name. Returns a Boolean. */     // CODE HERE /* averageTaxes method. Computes the average annual taxes paid bythe restaurant. Returns a double. Computes the average annual taxespaid by the restaurant */ // CODE HERE } . . .

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now