THIS IS WHAT I HAVE DONE SO FAR
(QUESTION BELOW IT)
class Customer
{
public:
int noOfCalls;
String custName;
virtual Compute_Bill();
};
//define function, contructors etc by Customer::Customer() etc
class Premium_Customer: public Customer
{
//premium specific function that inhereit from customer
};
HERE IS THE QUESTION
I need help with this question, I have no idea how to write an object oriented program.
This is the Question:
Write class definitions for Customer and for a derived class Premium_Customer. Customer should contain data members common to all customers, like the number of calls made in a month, the customer's name, and so on. Also implement a virtual member function for computing a bill, Compute_Bill( ) which uses the appropriate algorithm and data members to compute a monthly charge for each type of customer. In all classes be sure to also include any constructors and other member functions that you think are needed especially if you use dynamic memory al¬ location in your class. The derived class should contain data members and initializations specific to it's payment plan, and a specific implementation for the Compute_Bill() member function which overrides the default method. Demonstrate programmatically which plan is better for a customer who makes 30 calls per month averaging 3 minutes per call. What about 60 calls?