Computer Science, asked by abhishektrivedi30049, 3 months ago

Answer any two
[5]
Q.10 A class Telcall calculates the monthlyphone bill of a consumer Some of the
members of the class are given below:
Calss name
tell call
Data members/instance variables :
Phno
phone number
Name
name of consumer
N
number of calls made
Amt
bill amount
Member functions/methods
Telcal (.....)parameterized constructor to assign values to data members
void compute (): to calculate the phone bill amount based on the slabs given below
void dispdata (): to display the details in the specified format
Number of calls
Rate
1.100
Rs 500/- rental charges only
101-200
201-300
Rs.1.00/-per call+rental charges
Rs.1.20/-per call+rental charges
Rs.1.50/-per call+rental charges
Above 301
The calculations need to be done as per the slabs.
Specify the class Telcall giving the details of the constructor void computer () and void dispdata
0
In the main function create an object of type Telcall and dispay the phone bill in the following
format:
Phone mumber
Name
Total calls Amount
XXXXXXXXXXXXXX
XXXXXX
XXXXXXXX
XXXXXXXX​

Answers

Answered by ashokyadavwma409
0

Answer:

wait I will give your answer

Similar questions