21CSC101T May 2023
21CSC101T May 2023
Reg. No. RA 2 2 | o
,MAY 2023
B.Tech/ M.Tech (Integrated) DEGREE EXAMINATION,
Second& Third Semester
PROGRAMMING
21CSC101T- OBJECT ORIENTED DESIGNTAND
2022-2023 onwards)
(For the candidates admitted from the academic year should be
handed over
Note: OMR sheet
minutes and
(i) Part- Ashould be answered in OMR sheet within first 40
tohall invigilator at the end of 40h minute.
(ii) Part - B and Part - C should be answered in answer booklet. Max. Marks: 75
PART -A(20x1=20Marks) 1 1 1
1
Answer ALL Questions
1. Which feature of OOP indicates code reusability?
(B) Encapsulation
(A) Abstraction (D) Polymorphism
(C) Inheritance 1 2 1 2
allows
programs programmer to write specific
(C) A feature that allows codes for a problem
programmer
to make program modular (D) A feature that does not add any
power to the language
14. What is an
exception in C++ program?
(A) A problem that arises during 1 2 4 2
the (B) A problem that arises
execution of aprogram compilation
during
(C) Syntax error (D) Semantic errOr
15. is used to
system.
visualize the topology of the physical components of a 11 4 3
(OR)
h Draw the UML use case diagram for the library management system. The 4 1 3
system will have two users Librarian and student with the following
functions.
Librarian functions: Add books, Add student, Add publication, Issue book,
Return book, Apply penalty, View report
Student functions: Search book, Issue book, Return book, Penalty report,
Change password.
8 3 2 2
22.a. Write a CPP program to add and subtract two complex numbers using
operator overloading concept.
(OR)
8 4 2 3
b. Create the sequence and collaboration diagram for withdrawal scenario in the
bank ATM system. The system starts the process by employing a standard
procedure for validating the card and account holder.
8 3 3
23. a. Write a CPP program to differentiate early binding and late binding with the
help of virtual functions.
(OR) 8 4 3 3
b. Draw the activity diagram with swim lanes for railway reservation system.
The passenger should be able to book ticket in online railway reservation
system. The diagram should include fork, joint, decision etc.
3 4 2
24. a. Write a CPP program to find the largest of two numbers using function
templates.
(OR) 8 4 4 3
b. Develop the components and deployment diagram for online banking system.
8 3 5
23. a. Explain in detal about the components that make up the Standard Template
Libraries (STL).
(OR)
Page 3of4 29MF2&3-21CSC101T
b. Write aCPP program to demonstrate the working of STL stack with the STL 8 4
functions.
PART-C(1x 15 = 15 Marks) Marks BL
26. Create a class named Triangle' with two private data members, base and 15 4
height and one function to calculate the area of triangle. The class should have
the following constructors:
() Having no parameter - values of both base and height are assigned
Zero
(ii) Having two parameters-to assign values to base and height
(iii) Having one parameter - assign value through parameter for base
and assign height = 4
(iv) Having a copy constructor to copy values of one object to another
Create objects for the classes and calculate the area of triangle and print the
area.
27. Write a CPP program for the below mentioned hybrid inheritance scenario: 15 3
Create a class 'student' to get the student details. Inherit a class named
Marks' from 'Student' class to calculate the marks of students. Next,create a
class 'sports' to get the sports marks. Finally, create a class 'Result' inherited
from 'Marks' and 'sports' to calculate the overall result and average (overall
results will be from marks and sports marks).