Answer to Question #188725 in C++ for Dunga

Question #188725
  1. Write a class definition for an Order class for a nightclub that contains table number, a server’s name, and the number of patrons at the table. Include a private static data member for the table minimum charge, which is $4.75. Write a main() function that declares no Order objects but that uses a static member function to display the table minimum charge.
1
Expert's answer
2021-05-03T13:45:00-0400
class Order
{
     int tableNumber;
     string serverName;
     int numberOfPatrons;
     static float minCharge = 4.75;
 public:
      static void displayMinCharge()
      {
            cout << "Minimal charge is " << minCharge;
      }
}

int main()
{
      displayMinCharge();
      return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
31.05.21, 12:44

Dear hammad , if you have serious assignment that requires large amount 

of work and hence cannot be done for free you can submit it as assignment and our 

experts will surely assist you.



hammad
31.05.21, 09:43

Using the same Order class, write a main()function that declares an Order object, assigns appropriate values, and displays the Order data, including the minimum charge for the table (the minimum charge times the number of patrons at the table).

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS