filmov
tv
ICSE Class 10 | Chapter 6 Q5 Telephone Bill Program Explained with Java Code

Показать описание
Learn how to solve ICSE Class 10 Chapter 6 Question 5 using Java! 📚
Define a class Telephone having the following description:
Data Members Purpose
int prv, pre to store the previous and present meter readings
int call to store the calls made (i.e. pre - prv)
String name to store name of the consumer
double amt to store the amount
double total to store the total amount to be paid
Member functions Purpose
void input() Stores the previous reading, present reading and name of the consumer
void cal() Calculates the amount and total amount to be paid
void display() Displays the name of the consumer, calls made, amount and total amount to be paid
Write a program to compute the monthly bill to be paid according to the given conditions and display the output as per the given format.
Calls made Rate
Up to 100 calls No charge
For the next 100 calls 90 paise per call
For the next 200 calls 80 paise per call
More than 400 calls 70 paise per call
However, every consumer has to pay ₹180 per month as monthly rent for availing the service.
Output:
Name of the customer Calls made Amount to be paid
.................... .......... .................
.................... .......... .................
In this video, we build a program that calculates the monthly telephone bill based on the number of calls made, including slab-wise billing logic and base rental.
👉 Topics Covered:
Java class Telephone structure
Billing logic using conditional statements
Working with String, int, and double
Output formatting for reports
✨ Perfect for ICSE Class 10 students preparing for board exams or practicing Java programs.
🔔 Subscribe for more solved ICSE Java programs with full explanations!
#ICSEJava #JavaProgramming #TelephoneBill #Class10ICSE #SolvedProgram #BoardExamPrep
Define a class Telephone having the following description:
Data Members Purpose
int prv, pre to store the previous and present meter readings
int call to store the calls made (i.e. pre - prv)
String name to store name of the consumer
double amt to store the amount
double total to store the total amount to be paid
Member functions Purpose
void input() Stores the previous reading, present reading and name of the consumer
void cal() Calculates the amount and total amount to be paid
void display() Displays the name of the consumer, calls made, amount and total amount to be paid
Write a program to compute the monthly bill to be paid according to the given conditions and display the output as per the given format.
Calls made Rate
Up to 100 calls No charge
For the next 100 calls 90 paise per call
For the next 200 calls 80 paise per call
More than 400 calls 70 paise per call
However, every consumer has to pay ₹180 per month as monthly rent for availing the service.
Output:
Name of the customer Calls made Amount to be paid
.................... .......... .................
.................... .......... .................
In this video, we build a program that calculates the monthly telephone bill based on the number of calls made, including slab-wise billing logic and base rental.
👉 Topics Covered:
Java class Telephone structure
Billing logic using conditional statements
Working with String, int, and double
Output formatting for reports
✨ Perfect for ICSE Class 10 students preparing for board exams or practicing Java programs.
🔔 Subscribe for more solved ICSE Java programs with full explanations!
#ICSEJava #JavaProgramming #TelephoneBill #Class10ICSE #SolvedProgram #BoardExamPrep