BIT153 Object Oriented Programming

Object Oriented ProgrammingTU Board 2079

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…

10

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.

A worked answer is on its wayMeanwhile, read the Object Oriented Programming notes for this topic.

Discussion

Loading…

More Object Oriented Programming questions

All Object Oriented Programming old questions