Due Date: Friday Oct 14, 6:00 pm
Object-Oriented Programming II
Type of Homework: Closed
This homework has several objectives. Those objectives are:
This homework is considered a closed homework. Make sure you read the Open/Closed policy before continuing working on this project.
For this project you will complete the following tasks:
Your project will be graded as follows:
GUI 50 %
Java Construct Requirements 10 %
Student Tests Implementation 25 %
Provided JUnit tests 5 %
Style 10 %
For this project:
We encourage you to start working on this project as soon as possible, as there are a lot of details that can not be completely specified in this description, in particular the GUI requirements. You should address these doubts ahead of time during lab session, or office hours.
Even if you are not planning to work on the project for a while make sure that:
You can compile a simple class using the provided code distribution. If you have problems compiling a simple class see your TA immediately.
Submit your project using the "Submit Project" option in Eclipse and verify your submission has been received in the submit server. It is important that you submit your project using the "Submit Project" option rather than uploading a jar file to the submit server. If you are having problems with this submission process contact your TA or instructor immediately.
You must debug your code using the Eclipse debugger and should not use "System.out.println" as a debug tool. TAs in office hours will require you to use the debugger to show any problems you are experiencing.
No release testing is associated with this project.
Keep in mind that the submit server does not test the GUI you will define.
You do not need to provide an UML diagram for this project, although you are encouraged to create one for the GUI.
Cruise Class Modifications
You must modify your Cruise class so that is now implements the Java interface CruiseInterface. This interface is available in the cruise package and it includes all the methods you implemented for project #2 and two additional methods named loadPassengers and generateReport.
You will notice that the cruise methods in the CruiseInterface have been annotated with @NonNull, @CheckForNull or @CheckReturnValue. These are annotations that allow the submit server findbugs tool to determine possible problems in your code. You don't need to understand annotations in order to complete this project, however you should check the findbugs report (available through the submit server) for any possible errors findbugs might be detecting (more details about this will be provided in lecture).
Graphical User Interface (GUI)
You must implement your GUI in the cruiseGui package. Make sure you implement a class named CruiseGui with a main that allow us to run your system. Notice that you don't need to implement a fancy and beautiful interface in order to get full credit for the GUI component of this project. You will receive full credit as long as you satisfy the following requirements:
Java Construct Requirements
Your Cruise class must implement the CruiseInterface (e.g., public class Cruise implements CruiseInterface). You will lose significant points if your class does not implements the interface.
You must define an enumerated type called ReportType in the cruise package which can assume the values Passengers, Crew, and All. Define the enumerated type in a file by itself.
You must use the new for loop construct at least once.
You must handle exceptions dealing with file manipulation by defining the appropriate catch clause.
You may not use System.exit(0) in your code. If you understand that at some point you need to stop the program execution then throw an exception with an appropriate message as follows:
throw new IllegalArgumentException("Your message here");
JUnit Tests Implementation
You must provide tests in the file StudentTests.java present in the tests package. These tests must try to achieve the maximum test coverage possible as described in lecture. Keep in mind that these tests only tests the model component of the cruise application and not the GUI.
Provided JUnit Tests
We have provided a couple of JUnit tests that verify the new features of the cruise application. The JUnit tests include the Project#2 public and release tests. Make sure your implementation satisfies these tests.
Honor Section Requirements
In addition to the above requirements you must satisfy the following requirement:
Submit your project using the submit project option associated with Eclipse.
Please make sure you read the academic integrity section of the syllabus so you understand what is permissible in our programming projects. We want to remind you that we check your project against other students' projects and any case of academic dishonesty will be referred to the University's Office of Judicial Program