You are on page 1of 2

1. Create a CLASS of student and member functions for the following.

a) getdata b) Calculate the grade from the average marks. c) Increase the fee by 10% In an inherited class get the discount percentage given to the student and calculate the discount amount for the new fee details. Use a datafile to store the details and display them. 2. Create a Class of employee details. Design the following member functions. a) getdata b) Increase the salary by 10% if salary < 4000 c) Display bonus ie. 50% of the salary for whose salary <6000. In an inherited class get the provident fund deductions and calculate the gross salary. Use a file to store the details and display them. 3. Create a Class of cricketers. Design member functions as following. a) getdata b) Grade the player as Batsmen if no. of runs are above 50 and no. of 4s and 6s together counts more than 5. c) Grade the player as bowler if no. of wickets are more than 3 and runs given are less than 30. In an inherited Class accept the match fee and increment the amount by 10% for a batsmen. Use a file to store the details and display them. 4. Write a C++ program to read and display information about employees and managers. Employee is the base class and manager is the sub-class. Store the details in a file and display the content. 5. Write a C++ program to store the accounts details of 10 customers in a bank. Read the file and display all the customers details whose balance greater than 5000 and less than 10000. (use class and objects) Define a class to represent a book in a library and write a complete the program to show the working of member functions. Include the following members: Data members: Book number, Book name, Author, Publisher, Price, No. of copies, No. of copies issued. Member functions 1. to issue a book after checking for its availability 2. to return a book 3. to display book information. Use data file for storage and retrieval. 7. Write a program that created a file named telephone. dat using an object of the class telephone having the following members. Protected data members Telephone_numbers Name Address Public data members

6.

Get_data to obtain data Show_data to display data Search_data to search data (on the basis of tel no) The program is to read the telephone.dat and display its contents. 8. 9. Delete all the records which has duplicate student no. in a file of student details. Create a file of employee details. Store the records into a file called emp1.dat if salary <= 5000, for salary >5000 store records into file emp2.dat. Display the content of all files. Write a program to implement stack using a linked list (Pop, Push and Display). A node consists of one data part (integer) and a pointer. A circular queue is housed in an array of size N. Write C++ function to add an item to rear of the queue. Write a C++ function that uses a link list class to create a Queue and perform push and pop applications. (Make suitable assumptions) Write a program to create a link list and and display its contents then reverse the list and display its contents.

10. 11. 12.

13.

You might also like