Tribhuvan University
Institute of Science and Technology
2079 B.S.
Candidates are required to give their answers in their own words as far as practicable.
Group A
Long Answer QuestionsAttempt any Two questions.
- Question 1What is aggregation? Write a program for implementing following. Create a class author with attributes name and qualification. Also create a class publication with pname. Form these classes o crive a class book having attribute title and price. Each of three classes should have a get data () method to get their data from user. The classes should have put data () method to display the data. Create instances of the class book in main.
- Question 2What is operator overloading? Why it is necessary to overload and operator? Write a program for overloading comparison operators.
- Question 3What is the use of constructor and destructor? Write a program for illustrating default constructor, parameterized constructor and copy constructor.
Group B
Short Answer QuestionsAttempt any Eight questions.
- Question 4Describe the characteristics of object oriented programming languages.
- Question 5Define class and object with suitable examples. How members of class can be accessed?
- Question 6What is inline function? Why it is used? Write a program to illustrate inline function.
- Question 7What are possible data conversion types? Write a program to show basis to user defined conversion.
- Question 8What are the various class access specifies? How public inheritance differs from private inheritance?
- Question 9Write a program to implement function template with multiple arguments.
- Question 10Write a program to illustrate the use of seekg() and tellg().
- Question 11How dynamic memory allocation is done using new and delete? Write program for illustrating use of new and delete.
- Question 12Write Short note On : Friend Function Early binding and late binding