Reverse the class hierarchy from Ch. 9.1. Let class Polynomial from Chapter 7.3.7 be a superclass and implement class Parabola as a subclass. The constructor in class Parabola should take the three coefficients in the parabola as separate arguments. Try to reuse as much code as possible from the superclass inthe subclass. Implement class Line as a subclass specialization of class Parabola. Which class design do you prefer – class Line as a subclass of Parabola and Polynomial, or Line as a superclass with extensions in subclasses? Name of program file: Polynomial_hier.py.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here