CPP(object oriented programming) PROGRAMS WITH ALL OPERATIONS USING SWITCH CASE.

   CPP PROGRAMS WITH ALL OPERATIONS  USING SWITCH CASE.





i. Add
ii. Update
iii. Search a book
iv. Purchase a book (update the stock and display the total cost)
v. Record number of successful/unsuccessful transactions (use static data members to keep count of transactions)
Use new operator in constructors to allocate memory space required.

2. Design a class ‘Complex ‘with data members for real and imaginary part. Provide default and
parameterized constructors. Write a program to perform arithmetic operations of two complex numbers using operator overloading. 
i. Addition and subtraction using friend functions.
ii. Multiplication and division using member functions.

3. Write a program in C++ to implement sequential file for students' database and perform following operations on it
i) Create Database
ii) Display Database 
iii) Add a record 
iv) Delete a record 
v) Modify a record

4. Create a base class shape with two double type values and member functions to input the data and compute_area() for calculating area of figure. Derive two classes’ triangle and rectangle. Make compute_area() as a virtual function and redefine this function in the derived class to suit their requirements. Write a program that accepts dimensions of triangle/rectangle and display calculated area.

5. Design a base class with name, date of birth, blood group and another base class consisting of the data members such as height and weight. Design one more base class consisting of the insurance policy number and contact address. The derived class contains the data members’ telephone numbers and driving license number.   Write a menu driven program to carry out the following things:
i. Build a master table           
ii.  Display             
iii.  Insert a new entry
iv. Delete entry
v.  Edit 
vi.  Search for a record

6. Write a program in C++ using function/class template to read two matrices of different data types such as integers and floating point values and perform simple arithmetic operations on these matrices separately and display it.

7. Write a program in C++ which includes the code for following operations :
i. A function to read two double type numbers from keyboard
ii. A function to calculate the division of these two numbers
iii. A try block to detect and throw an exception if the condition “divide-by-zero” occurs iv. Appropriate catch block to handle the exceptions thrown

8. Create employee bio-data using following classes i) Personal record ii))Professional record iii) Academic record Assume appropriate data members and member function to accept required data & print bio-data. Create bio-data using multiple inheritance using C++ .

No comments:

Post a Comment

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages