Differentiate between abstract class and concrete class. Write a program to create a class named "Quadratic" that represents a function of the form…
BIT Object Oriented Programming · 2079 · Solved Question with Answer
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.
