2072 Chaitra Regular engineering note
2072 Chaitra Regular Object-Oriented Programming IOE Pulchowk engineering note
1. Explain the main characteristics of Object-Oriented
Programming. Write a program to find the transpose of a given Matrix using the
concept of Object-Oriented Programming.
2. Define constructor. Why constructor is needed for a class? Explain about different types of the constructor with a suitable program.
3. Write down the significance of the reference variable with a suitable example. Define the default argument. Write a program to show the relation between default argument and function overloading.
4. Why do we need operator overloading? What are the non-over loadable operators in C++? Write a program that will convert an object from a class Rectangle to object of a class Polar using Casting Operator.
5. Explain the need for a virtual base class with a suitable example, Create a derived class manager from two base classes person and employees. Assume suitable data members in each class and display the information.
6. Explain about stream class hierarchy by highlighting the different ios flags and their usage. Write a program to make the billing system of a department store Your program should store and retrieve data from files. Use manipulators to display the record in proper formats.
7. Why do you need Virtual Destructor? Explain with example. Write a program having Polygon as an abstract class with Length and Height as its data member. Create a derived class Rectangle and Triangle. Make Area () as pure virtual function and redefined it in the derived class to calculate the respective area.
8. Define the function template and class template with respective syntax. Write a program to find the square root of the given number. Check the validity of input number and raise the exception as per requirement
2. Define constructor. Why constructor is needed for a class? Explain about different types of the constructor with a suitable program.
3. Write down the significance of the reference variable with a suitable example. Define the default argument. Write a program to show the relation between default argument and function overloading.
4. Why do we need operator overloading? What are the non-over loadable operators in C++? Write a program that will convert an object from a class Rectangle to object of a class Polar using Casting Operator.
5. Explain the need for a virtual base class with a suitable example, Create a derived class manager from two base classes person and employees. Assume suitable data members in each class and display the information.
6. Explain about stream class hierarchy by highlighting the different ios flags and their usage. Write a program to make the billing system of a department store Your program should store and retrieve data from files. Use manipulators to display the record in proper formats.
7. Why do you need Virtual Destructor? Explain with example. Write a program having Polygon as an abstract class with Length and Height as its data member. Create a derived class Rectangle and Triangle. Make Area () as pure virtual function and redefined it in the derived class to calculate the respective area.
8. Define the function template and class template with respective syntax. Write a program to find the square root of the given number. Check the validity of input number and raise the exception as per requirement
0 Comments:
Post a Comment
Please don't enter any spam link in the comment box