Object Oriented Programming 2066

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2066
Bachelor Level / Third Semester / Science
Computer Science and Information Technology ( CSC-202 )
( Object Oriented Programming )
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Candidates are required to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.

Section A

Official Answer
AI Generated Answer

AI is thinking...

Attempt any two questions: (2x10=20)

Official Answer
AI Generated Answer

AI is thinking...

1. Explain in detail the following principles of Object-Oriented Programming. 

    i. Data encapsulation and data hiding. ii. Inheritance and polymorphism. iii. Abstraction

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. Why constructor and destructor are required on Object Oriented Programming? Explain with  suitable example. 

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. Define a student class (with necessary constructors and member functions) in Object Oriented Programming (abstract necessary attributes and their types). (Write a complete code in C++  programming language).

• Derive a computer Science and Mathematics class from student class adding necessary attributes (at least three subjects). 

• Use these classes in a main function and display the average marks of computer science and mathematics students.

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Section B

Official Answer
AI Generated Answer

AI is thinking...

Attempt any eight questions: (8x5 = 40)

Official Answer
AI Generated Answer

AI is thinking...

4. What is type casting? Explain with suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Write a program to compute subtraction of two complex numbers using operator overloading.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6. Why exception handling is required? Explain with suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7. Differentiate between super class and sub class with suitable examples.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. Write a program in C++ to count a number of words in a line of text.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. Differentiate between function overriding and function overloading. Explain with suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. Explain the role of polymorphism in Object Oriented Programming.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...