Fewpal
0 votes
17 views
in Computer by (224 points)

Design a class Sales with the following description:
Data Members:
String name : to store the name of the product.
int pro_code : to store the product code.
double price : to store the price of the product.
Member methods:
Sales() : to initialize the data members.
void input( ) : to input and store the details of the product.
void discount( ) : to reduce the product price by 10%.
void display( ) : to display the details of the product.

Please log in or register to answer this question.

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...