Course Solutions Uncategorized (Solved) : 1 Create Class Called Restaurant Includes Numberoforders Int Counts Number Orders Accessed Q32457379 . . . .

(Solved) : 1 Create Class Called Restaurant Includes Numberoforders Int Counts Number Orders Accessed Q32457379 . . . .

 

(1): Create a class calledRestaurant that includes:

NumberOfOrders (int) that counts the number of orders. It can beaccessed by all classes, and its value will be shared by allobjects.

orderName (String). It can be accessed by this class only.

orderPrice (double). It can be accessed by this class only.

Constructor with arguments to initialize the variables.

Accessors (getters) for all required instance variables.

(2) The Bill class includes two methods:getBill and the main methods

getBill

This method receives an array ofRestaurant object and calculates the bill price, then returnsthe amount as a double value.

main

Create an array of object fromRestaurant with the following values:

order1 :

order Name :

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post