0% found this document useful (0 votes)
6 views

OODS University Paper 2024 SRM

The document outlines an examination structure for the course 21CSC101T - Object Oriented Design and Programming, including instructions for answering different parts of the exam. It consists of multiple-choice questions in Part A, programming tasks in Part B, and conceptual questions in Part C, covering topics such as constructors, inheritance, function overloading, and class templates. The exam is designed for candidates admitted from the academic year 2022-2023 onwards, with a total duration of 3 hours and a maximum score of 75 marks.

Uploaded by

siddhiseth18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

OODS University Paper 2024 SRM

The document outlines an examination structure for the course 21CSC101T - Object Oriented Design and Programming, including instructions for answering different parts of the exam. It consists of multiple-choice questions in Part A, programming tasks in Part B, and conceptual questions in Part C, covering topics such as constructors, inheritance, function overloading, and class templates. The exam is designed for candidates admitted from the academic year 2022-2023 onwards, with a total duration of 3 hours and a maximum score of 75 marks.

Uploaded by

siddhiseth18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Lol dol olrtg] ral EXAMINATION, MAY 202: First & Second Semester 4 21CSC101T - OBJECT 0} (For the candidates admit RIENTED DESIGN AND PROGRAMMING - ted from the academic year 2022-2023 onwards) Note: @ Part ~A should be answered in OMR sheet within first 40 minutes hall invigilator at the end of 40" minute, Gi) Part - Band Part-C should be answered in answer booklet, and OMR sheet should be handed over to Time: 3 Hours Max. Marks: 75 PART ~ A (20 x 1 = 20Marks) Marks BL co FO Answer ALL Questions ae 1. Which feature of OODP indicates code reusability? yt a (A) Inheritance (B) Encapsulation (©) Abstraction () Polymorphism 2. Which of the following access specifier allows the user to inherit the private 1 1 1 2 members of a class? (A) Private (B) Protected (©) Default (D) Public 3. What happens if a user forgets to define a constructor inside a class? pe nae: (A) Objects are not created properly (B) Segmentation fault (©) Error occurs (D) Compiler provides a default constructor to avoid faults/errors 4. Which of the following C++ operators can be overloaded? to2zis (A) Size operator (size of) (B) Conditional operator (?:) (©) Arithmetic operator (+-*/) (D) Class member access operator 5. Which of the following is true about constructors? ror2s (A): A class can have more than one (B) They cannot be inherited constructors (C) Their address can be referred (D) Constructors can have return values 6. Which of the following keyword is used to overload an operator? rosa (A) overload (B) friend (©) operator (D) over rider 7. Which of the following permits function overloading in C++? ae (A) Type of arguments (B) Number of arguments (©) Number of objects (D) Type and number of arguments 8. Dynamic aspects related to a system are shown with help of ed (A) Sequence diagrams (B) Interaction diagrams (©) Deployment diagrams (D) Use case diagrams 9. In multilevel inheritance one class inherits [to 7 | (A) Only from one class (B) More than one class (©) Atleast one class (D) As many classes as required Res MMPL&2-21CSC101T i _ ors inheritable? 1 (B)_ By making thoir visibility mode as jyate mem ce the private " ean your make HE PTY ode y \ to, How en yr ahi visibility private in derived clisy A) By ™ (A) Ba Micon yy mode (D) Teen be done bth by making the (©) By making i vee visibility mode public or protected : as protected onl ly A 10 Ci rent activities and re-introduces ' 1 ang combines two concurrent an 08 7 = ote CE ot activity ean ts performed f atime? them to a flow w B) Fork symbol (A) Joint symbol D Note symbol (©) Decision symbol th. 12. Identify what happens when an attempt ig made to instantiate an object ofan | 2 4 . Identify Ww s abstract class , (B) Warning message aad (D) Objects gets created (C) Compilation error 13. What is an abstract class? (A) Class specifically used as a base class with at least one virtual function fanction (C) Class from which any class is (D) Any class is Cr+ is an abstract derived class (B) Class specifically used as a base class with at least one pure virtual 14. Which is the correct syntax of defining a pure virtual function? (A) Pore virtual retum_type func (); (B). Virtual return_type_fune () pure; (©) Virtual retum_type func ()=0; (D) Virtual return_type fune (); 15. Which among the following best describes member function overriding? (A) Member functions having same (B) Member functions having same name in base and derived classes name in base class only (C) Member functions having same (D) Member functions having same name in derived class only name and different signature inside main funetion 16. keyword is used before a function in a base class which is to be overridden in derived class. (A) void (B) static (C) virtual (D) friend 17. Once a class template is defined, we can create an object of that class using @ suedtic basic or user-defined data types to replace the generic data types used juring (A) Function definition (B) Object definition (C) Class definition (D) Function declaration 18. Which container can have the same key? 141s (A) Map (B) Multimap (©) Unordered map (D) Set 19, What type of access does dequeue and vector provide? 1° 2nd (A) Linear access (B) Random access (C) Parallel access (D) Sequence access Page 2 of 4 MMFL&2-21CSc10IT 20. Choose the correct output for the following code: ' int main () { deque d d.push_back (10); d.push_back (300); d.push_front (20); for (int =0; i a restaurant from the point when the customer enters a restaurant to the point when he leaves the restaurant. 22. a. Write a C++ program that simulates a bookstore inventory system. Defineaclass § 3 7 3 called “Book” with attributes such as title, author and price. Implement a class with constructors, including a default constructor, a parameterized constructor and a copy constructor to initialize book objects and display their information. (OR) b. Draw and illustrate the sequence and collaboration diagram for the withdrawal § 4 2 scenario in the bank ATM system. The system starts the process by employing a standard procedure for validating the card and account holder. 23. a. Define three classes with names shapes, rectangle and circle. Make use ofthe $ > 3 ? member functions getdata ( ), printdata () and area ( ), to find the area of circle and rectangle. Whether type of inheritance is hierarchical? Explain with the sample output. (OR) b. Draw the state chart diagram with three different states for order management * 3 3 3 system. The customers should be able to book the orders in online order management system. The diagram should have joint pseudo state, self-transition, entry and exit connectors, choice pseudo state etc. 24. a. Write a C+ program for implementing the concept of class template. Createthe § * * 7 template class myFirstClass. Inside this, cerate a constructor that will initialize Page 3 of 4 LMMFI82-21¢SC101T 25.4. 26. 27. the two members num! and num2 of the class. Fi i s nun n . Find minim i e. trace numbers using different data (ypes arguments oe concepts using function template concepts. ee and string c (OR) Create a integer vector object vectl. Insert 5 elements into the vector * * 4 ‘ [10,20,30,40,50] by calling the appropriate insert function. Using multiple catch aoocoreoption handling techniques implement the C+ code forthe following exception. (Type conversion; illegal values, improper casts Gi) Bound violations; illegal array indices (iii) Bad references; null pointers. Wate a complete C++ exception handling code to meet the above eases. nce container list using array of integer data type ‘ethods. Create user defined function PrintList () Write a C++ program for sequet and implement the following m' and display output. () Push_front () Gi) insert () (iii) sort() (iv) splice () (v) merge () (vi) POP_back () (OR) to demonstrate the working of STE and perform the Write a C++ program the STL queue and map. following operations in 1 (Insert (ii) Delete (iii) Display (iv). Find PART - C (1 x 15 = 15 Marks) Man mL CO 70 ‘Answer ANY ONE Question Define method overloading. Develop a C+* progrite that utilizes function overloading to calculate the volume of different geometric shapes, such as cubes, cylinders and spheres. Implement the functions with (i) Different number of arguments with same return type Gi) Same number of arguments with different return types to shapes specific calculations 3 3 2 Write a C++ program for the below mentioned inheritance sc ‘Croats a class named shape with a function that prints Create another named class “Polygon” inheriting the shape cl fanction that prints “Polygon is @ shape”. Create two other rectangle and triangle having the sare Fanetion which prints “Rectangle is @ polygon” and “Triangle is @ polygon” respectively. Again, make another class named square P function which prints “Square is a rectan! ”. having the sam ‘Now try calling the function by the objects of each of these classes. (sae oe? handle each “This is a shape”. Jlass with the same classes named yaMia2-21csc1ort

You might also like