Computer Applications
Design a class program to calculate the discount given to a customer on purchasing LED Television. The program also displays the amount paid by the customer after discount. The details are given as:
Class name : Television
Data members: int cost, int discount, int amount
Member functions:
Accept( ) : to input the cost of Television
Calculate( ) : to calculate the discount
Display( ) : to show the discount and the amount paid after discount
Objects & Classes
107 Likes
Answer
class Television {
int cost;
int discount;
int amount;
void Accept() {
/*
* Input the cost
* of Television
*/
}
void Calculate() {
/*
* Calculate the discount
*/
}
void Display() {
/*
* Show the discount and
* the amount paid
* after discount
*/
}
}
Answered By
64 Likes
Related Questions
Mention three characteristics and two methods for the following Classes:
Class Mobile Phone
Mention three characteristics and two methods for the following Classes:
Class Fruits
Mention three characteristics and two methods for the following Classes:
Class Bike
Mention three characteristics and two methods for the following Classes:
Class Pen