EECS2030 Lab 07

Due: Wednesday Dec 02, Thursday Dec 03, 2020 before 11:59PM

Introduction

The main goals of this lab are to:

Specification

When we define a Java class, we automatically inherit some methods from java.lang.Object class. There are 3 of them that implementers are usually 'obliged' to override, so that the methods beheave in a more meaningful way.

Implementation

Download the shell project from the following zip file. DO NOT DOUBLE CLICK TO OPEN THIS ZIP FILE! You should import the project from the archive into your workspace as outlined in Lab 1.

This project maintains a student system. Given a JUnit test class (which relies on certain API of methods) and its expected outputs, complete the classes such that all tests pass. Specifically,

You may want to implement Prof calss before implementing Book class and the Comparator classes. Slides on Comparators are provided along with the lab.

A local copy of the Java API can be found here.

Submit

You should submit files Prof.java, Course.java, Book.java, as well as two comparator classes.

To submit your solution via the terminal (assuming you have used remotelab to build your code and complete the lab), first navigate to the src directory for your project, and then issue the submit command into the terminal window to submit fiels one by one:

submit 2030 lab7 Prof.java
submit 2030 lab7 Book.java
...

or, submit some or all files together, for example,

submit 2030 lab7 Prof.java Book.java
...
submit 2030 lab7 *.java

At any time, you can issue submit -l 2030 lab7 into the terminal to check the files that you have submitted for lab6.

Alternatively, if you are using Eclipse on your own machine, you can upload your files through web submit .

Make sure you choose 2030 for the course, and lab7 for the assignment. Upload java files only, DO NOT SUBMIT the ZIP file of your project!