: : 4. Define a class Discount having the following description: Data members int cost to store the price of an article String name to store the customer's name double do to store the discount double amt to store the amount to be paid Member functions: void input Stores the cost of the article and name of the customer void cal(). Calculates the discount and amount to be paid void display() Displays the name of the customer, cost, discount and amount to be paid Write a program to compute the discount according to the given conditions and display the output as per the given format. Rate of discount List Price No discount Up to 5,000 From 35,001 to 10,000 10% on the list price 15% on the list price From 10,001 to 15,000 20% on the list price Above 15,000 Discount Amount to be paid Output: Name of the customer
Share
Answer:
a force is a push or pull which is applied to the surface