Question: The Triangle class is derived from the RegPolygon class. Using the UML diagrams shown below, complete the following: A. List any overloaded methods in the
The Triangle class is derived from the RegPolygon class. Using the UML diagrams shown below, complete the following:

A. List any overloaded methods in the RegPolygon and Triangle classes.
B. List any overriding methods in the RegPolygon and Triangle classes.
C. If the variable lenSide is a private data member of the RegPolygon class, is lenSide accessible from the Triangle class?
D. If the variable lenside is a protected data member of the RegPolygon class, is lenSide accessible from the Triangle class?
E. If the variable lenside is a protected data member of the RegPolygon class, is lenSide accessible from the main method?
RegPolygon lenSide: int Reg Polygon () RegPolygon (lenSide: int) setLenSide (lenSide: int) get LenSide (): int calcReg PolyArea (): double. toString (): String equals (regPolygon: RegPolygon): boolean makeCopy (reg Polygon: RegPolygon) Triangle Triangle () Triangle (lenSide: int) calcRegPolyArea (): double toString (): String equals (triangle: Triangle) : boolean make Copy (triangle: Triangle)
Step by Step Solution
3.36 Rating (140 Votes )
There are 3 Steps involved in it
Based on the UML diagrams provided for the RegPolygon and Triangle classes here are the answers to the questions A List any overloaded methods in the ... View full answer
Get step-by-step solutions from verified subject matter experts
