DPG Institute of Technology and Management
Department of Computer Application
Assignment Sheet 1
Course: Object-Oriented Programming using
C++
Program: 4-Year BCA
Course Code: 24BCA403DS02
Units Covered: Unit I & Unit II
Maximum Marks: 50 (Theory: 18, Programs: 32)
Unit I
A. Theory Questions (2 × 3 = 6 Marks)
1. Compare procedural programming and object-oriented programming. List at least 4 advantages
of OOP over procedural programming.
2. Explain the four main principles of OOP with real-life examples.
B. Programming Questions (3 × 4 = 12 Marks)
3. Write a C++ program to input marks of 5 subjects and display the total, average, and grade using
decision-making statements.
4. Write a C++ program to check whether a given number is prime or not using loops.
5. Create a C++ program that demonstrates the use of constants, variables, and different data
types.
Unit II
A. Theory Questions (3 × 4 = 12 Marks)
1. Define a class and an object in C++. Explain the role of access specifiers with examples.
2. Explain different types of inheritance in C++ with suitable diagrams.
3. What are constructors and destructors? Differentiate between default, parameterized, and copy
constructors.
B. Programming Questions (4 × 5 = 20 Marks)
4. Write a C++ program to define a class Student with data members name, roll_no, and marks.
Include functions to input and display the data.
5. Write a C++ program to demonstrate the concept of constructors and destructors.
6. Write a C++ program to implement single inheritance where a Person class is inherited by a
Teacher class.
7. Write a C++ program to pass arrays and strings to functions using pointers.
Instructions for Submission
1. Only Hand written assignments will be accepted.
2. After completing the assignment, scan your handwritten work and convert it into PDF format.
3. The first page of your PDF must include: Name, Father’s Name, Class Roll Number.
4. Email the PDF to [email protected] before the deadline.
5.You Must Name your File with your name and class roll no. (e.g. Anjan24BCA987.pdf).
6. Submission Deadline: 25 Aug 2025