Computer Science, asked by vicky43154, 8 months ago

Q.9) Create a class Sales with following details:

Data members:

prod_id - to store the product id as long

quantity - to store the quantity as integer

rate - to store the rate of the product as double

Member methods:

Sales() - default constructor to initialize prod_id, quantity and rate with 10001, 100, 500.

void getProduct(long pid, int q, double r) - accept details of any product

double getDiscount() - return discount amount. 10% discount is only given when quantity is

more than 10 or rate is more than 1000. Otherwise 2% discount is given. Discount amount to be calculated

on rate*quantity.

void printBill() - to print discounted bill using getDiscount().

{discounted bill = (rate*quantity) - discount amount}​

Answers

Answered by suryapratapsingh2420
0

Answer:

do by yourself it's very much easy

mark. me as brainlist

Similar questions