Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please expert i need the following task to be written with C++ language using object oriented programming. the task asks to create a class in

please expert i need the following task to be written with C++ language using object oriented programming. the task asks to create a class in a program for a mobile operator to manage the bills of different call plans. please read the task well as every time experts answer me wrong. I hope this time i receive the correct answer as it will be a bad reputation on chegg company answering the same question for five times with the same wrong way.

You will have a base abstract class Plan which has the following members: 1- Customer Name: a string holding the customers name 2- Phone number: a string holding the mobile phone number. 3- Bill Month: an int with values ranging from 1 to 12 indicating the month of the bill. 4- A parameterized constructor. 5- A pure virtual function calculateBill( ) 6- A pure virtual function readCalls(istream&,int&,int&) that given a file with the calls duration of the customer, it sets the second & third parameters as given in the derived classes. 7- A virtual function printAccountDetails() which prints the accounts customer name, phone number & month of the bill as one of the months {Jan,Feb,Mar,.....Dec}.

Include two inferred classes from the base Arrange called PackagePlan and RatePlan. PackagePlan gives the client a certain number of minutes month to month with a settled cost (monthlyCost). The minutes accessible are partitioned into minutes to the same operator (sameMins), and minutes to other administrators (otherMins). Expect that phone numbers of this administrator begin with 033. If the client needs more minutes either to the same administrator or other administrators than the minutes given by the bundle, the additional minutes will have a certain rate (outRate).

-Packageplan class has :

(member variables)

1- sameMins (available minutes to the same operator be consumed monthly) 2- otherMins (available minutes to other operators to be consumed monthly) 3- monthlyCost (the fixed cost of the package)

4- outRate (the rate of a minute outside of the package) 5- remainingMins (initially set by all of the available minutes in constructor, then updated by readCalls()) 6- outPackMins (initially set to 0 in constructor, then updated by readCalls())

(class packageplan member functions)

7- A parameterized constructor to take in the customers name, customers phone number, current month, available minutes for the same operator, available minutes for different operators, monthly cost, and out of package rate. 8- The overridden member function calculateBill, which will calculate & display the details of the bill. 9- The overridden member function readCalls(istream&,int&,int&) that given a file with the calls duration of the customer, it sets the second parameter to the minutes to the same operator & the third parameter to minutes to other operators. 10- The overridden function printAccountDetails() which prints all accounts details represented in Plan and PackagePlan. 11- A member function remainingMinutes to return the remaining available minutes in the package. 12- A member function outOfPackageMins that returns extra minutes outside of the package.

RatePlan gives a uncommon rate (callRate) for the minutes without limits to the monthly number of minutes. It moreover gives the choice of including a favorite number for the customer where taken a toll of calls to this number are calculated based on a reduced rate (favNumRate).

-Rateplan class has:

(class member variables)

1- callRate: a double storing the cost of the minute. 2- favNumRate: a double storing the cost of the call minute to the favorite number. 3- favNum: a string storing the favorite number of the customer.

(class member functions)

1- A parameterized constructor to take in the customers name, customers phone number, current month, call rate, favorite number rate, and favorite number. 2- The overridden function calculateBill, which will calculate & display the details of the bill. 3- The overridden function readCalls, that given the calls file, it returns the second parameter as the duration of the calls to the favorite number, and the third parameter as the calls to numbers other than the favorite number. 4- The overridden function printAccountDetails() which prints all accounts details represented in Plan and RatePlan.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

b. Compute the mean value of this distribution. Pg45

Answered: 1 week ago