What do we need template? Why the program terminate after the occurrence of exception? Describe the types of constructor.
Differentiate between abstract class and concrete class. Write a program to create a class named "Quadratic" that represents a function of the form f(x) = ax + bx + c, where x is a real variable and a, b, c are real constants. The class must satisfy the following requirements.
a. A constructor should be provided that takes the values of a, b and c as arguments. All three of these arguments should default to zero.
b. A function that takes a single argument x return the value of f(x).
c. All data members should be private.
Explain the chain of constructor and destructor between sub classes and super classes during inheritance with example. Create a class named "Point" with data members x and y. Overload the + operator to add the value of two objects of this class.
Attempt any Eight questions
[8x5=40]Can we use object oriented concept using structure instead of classes? Justify your opinion.
In which case default argument is used? Describe with an example.
What is the task of static data members and function? Illustrate with an example.
Differentiate between aggregation and inheritance. Why do we need virtual base class?
Define stream. How do you read the text from file? Describe.
Explain the features of OOP.
Define namespace. List any two manipulators with their uses.
Why do we need friend class? How can we define member function outside the class?
Explain the use of pure virtual function with example.