Following is an example skeleton of a program TA.oj in MIJava:
public class TA instantiates MIJava multiextends
Student, Staff {
...
}
This TA class extends both the Student and Staff classes. The code for a sub-class should be able to access information in any of its super-classes. For example, the Student class may have a getGPA() method which does not apply to Staff objects, and the Staff class may have a getSalary() method that does not apply to Student objects. However, getGPA() and getSalary() are both valid methods for an instance of the TA class.
Since Java does not directly support multiple class inheritance, you are to come up with a strategy to simulate multiple inheritance using single class inheritance. You may for example use Java's support for multiple interface inheritance.
You need to decide what to do with duplicate method and field names. Specify your language extension restrictions clearly: what is allowed and what is not, and what is your conflict resolution methodology.
Due Date:
Received Time | Grade Modification |
before Monday, November 3, 11:59PM | +10% |
Tuesday, November 4, from 12:00AM to 11:59PM | no modification (on time) |
Wednesday, November 5, from 12:00AM to 11:59PM | -10% |
from Thursday, November 6, 12:00AM to
Friday, November 7, 11:59PM |
-25% |
after Saturday, November 8, 12:00AM | not accepted |
Grading: The programs will be tested on the CS network versions of Java/OpenJava. The assignment will be graded mostly on correctness, but code clarity / readability will also be a factor (comment, comment, comment!). In particular, make sure you state up front in the README file, the restrictions and assumptions you are making on your input MIJava programs. See the professor or TAs, if you have ideas for other extensions for this assignment and would like extra credit for implementing them.
Submission Requirements: Please submit a ZIP file with your code, including a README file with testing instructions and your working examples. In the README file, place the names of each group member (up to two), and the version(s) of Java that you have tested it under. Your code will be tested in the CS machines, so make sure it works there. Your README file should also have a list of specific features / bugs in your solution. Your ZIP file should be named with your WebCT user name(s) as the filename, either userid1.zip or userid1_userid2.zip. Only submit one assignment per pair via WebCT.