Find a reference on how to convert a decimal number to a binary number [4]
and then write a recursive method to perform the conversion.
Suppose that Staff, Faculty, and StudentWorker are the subclasses of
the Employee class. Indicate whether the following statements are syntactically correct or incorrect. If incorrect, indicate what is wrong with the statement:
A. Employee employee ¼ new Faculty();
*B. Staff staff ¼ new Employee();
*C. StudentWorker student ¼ new StudentWorker();
D. Faculty faculty ¼ new Staff();
2. 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?