20 likes | 131 Views
Problem 11, question 2 (insert the words in bold in the exam). Making , as the only change, Line inherit only from Object (and add the required attributes in the definition of Line) makes the hierarchy correct according to the "is a" and "extends" tests
E N D
Problem 11, question 2(insert the words in bold in the exam) • Making, as the only change, Line inherit only from Object (and add the required attributes in the definition of Line) makes the hierarchy correct according to the "is a" and "extends" tests • Making, as the only change, Triangle inherit only from Line (and add the required attributes in the definition of Triangle and Line) makes the hierarchy correct according to the "is a" and "extends" tests • Making, as the only change, Triangle inherit only from Object (and add the required attributes in the definition of Triangle) makes the hierarchy correct according to the "is a" and "extends" tests • Making, as the only change, Line inherit only from Shape (and add the required attributes in the definition of Line) makes the hierarchy correct according to the "is a" and "extends" tests