BCSL-032 C++ Lab| Solved question papers


These questions are collected from previous years term end exam papers conducted by IGNOU. The questions are arranged according to topic covered in BCSL-032 subjects. Try to solve these questions yourself then read the solutions presented here. Programs are tested on CodeBlock.

1. Write a C++ program to find the area of the following shapes. Use function overloading to implement this program: (i) Circle (ii) Rectangle [June 2015, Set – 3] Solution

2. Write a C++ program to create Account class. Define constructor for this class. Define a method to find the simple interest. Make necessary assumptions. [Dec 2015, Set – 4] Solution

3. Write a C++ program to add two matrices. Define proper class and constructor in this class. Define method to display the sum of two matrices. [Dec 2015, Set – 3] Solution

4. Write a C++ program to find the sum of two complex numbers. Define proper class, constructor and method(s) in your program. Give comments to make your code more understandable. [June 2015, Set – 4] Solution

5. Write a C++ program to create Employee class. Define proper constructor and destructor. Define the method to display employee information such as name, age and designation. Also define the method to calculate salary. Salary = Basic + TA + DA; TA is 10% of the Basic and DA is 80% of the Basic. Make necessary assumption required. [June 2015, Set – 2] Solution

6. Write a C++ program to create Student class. Define constructor for this class. Also define a method to display the student detail and name of five subjects taken by him/her in the current semester. Make necessary assumptions. [Dec 2015, Set – 2] Solution

7. Write a C++ program to create Shape class. Derive Circle and Rectangle classes from this (Shape) class. Define proper constructors for these classes. Declare Area method in Circle and Rectangle classes to find the area of that shape, and implement it with proper comments. [Dec 2015, Set – 2] Solution

8. Write a C++ program to create a Teacher class. Derive Graduate_Teacher and School_Teacher classes from the Teacher class. Define constructor for all the classes. Define methods to display teacher name, subject and years of experience. Make necessary assumptions, if any. [Dec 2014, Set-3] Solution

9. Write a C++ program to find a + b, a — b, a * b and a/ b, where a and b are two numbers. Implement proper mechanism to handle exception(s) in this program. [Dec 2014, Set-1] Solution