Revision of Class Ix Syllabus
Class as the Basis of All Computation
User - Defined Method
- Definition of Array
- Types of Array
- Usages of Array
- Sorting and Search Technique of Array
- Declaration of Single and Double Dimension Arrays
- Initialization of Single and Double Dimensional Arrays
- Accepting Data of Single and Double Dimensional Arrays
- Accessing the Elements of Single Dimensional and Double Dimensional Arrays
- Scope of variables
- Scope of Class variables
- Scope of Instance variables
- Scope of Argument variables
- Scope of Local variables
Related QuestionsVIEW ALL 
Write the prototype of a function check which takes an integer as an argument and returns a character.
Define a class named BookFair with the following description:
Instance variables/Data members :
String Bname — stores the name of the book
double price — stores the price of the book Member methods :
(i) BookFair() — Default constructor to initialize data members
(ii) void Input() — To input and store the name and the price of the book.
(iii) void calculate() — To calculate the price after discount. Discount is calculated based on the following criteria.
|Less than or equal to Rs. 1000||2% of price|
More than Rs. 1000 and less than or equal to Rs. 3000
|10% of price|
|More than % 3000||
15% of price
(iv) void display() — To display the name and price of the book after discount. Write a main method to create an object of the class and call the above member methods.