Object Oriented Programming 2078

Question Paper Details
Tribhuwan University
Institute of Science and Technology
2078
Bachelor Level / Second Semester / Science
Computer Science and Information Technology ( CSC161 )
( 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.

Group A

Official Answer
AI Generated Answer

AI is thinking...

Long answer questions:

Official Answer
AI Generated Answer

AI is thinking...

Attempt any Two questions:(2x10=20)

Official Answer
AI Generated Answer

AI is thinking...

1. Write a program according to the specification given below:

    - Create a class Account with data members acc no, balance, and min_balance(static)

    - Include methods for reading and displaying values of objects

    - Define static member function to display min_balance

    -Create array of objects to store data of 5 accounts and read and display values of each object

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

2. What is meant by type conversion? Define two way of converting one user defined data type (object) to another user defined object? Write a program that converts object of another distance class with data members feet and inch.(Assume 1m = 3.3 feet and 1cm = 0.4 inch)

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. How ambiguity arises in multipath inheritance? How can you remove this type of ambiguity? Explain with suitable example.

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Group B

Official Answer
AI Generated Answer

AI is thinking...

Short answer questions:
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 structured programming? Discuss characteristics and problems associated with structured programming.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. What is the use of get and getline functions? Explain with suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6. What is meant by pass by reference? How can we pass arguments by reference by using reference variable? Illustrate with example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7. What is constructor? Explain the concept of default and default copy with suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. What is the concept of friend function? How it violates the data hiding principle? Justify with example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

9. What is exception? Why exception handling is better to use? Explain exception handling with try..... catch by using suitable example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. When class templates are useful? How can you define a class that can implement stack with integer as well as sack of strings? Illustrate with example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

11. What is meant by stream? Write a program that reads content of file data.txt and displays the content in monitor.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

12. Write short notes on:

    a. Manipulators

    b. Protected Access Specifier

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...