A03

Due Date: Friday, 29 January 2021
File(s) to be submitted: Cabin.java
Sample Output: SampleOutput.html


SUBMIT   /   Check

Cabin (Data types including static data and methods)

Summary

Complete the data type class Cabin. I have provided you with

Details

The Cabin class represents a "cabin" at a luxury resort. It is used by the Manager program, which simulates three days running such a resort.

I have provided you the Manager program. You should not change it at all. Just download it and the starter file for Cabin (both linked above) into your A03 project.

Your job (for this assignment) is to complete the Cabin class. You will need to provide some instance and class variables, and the definitions of various instance and class methods.

You should be able to run the Manager program right away. It will ask you to:

You can paste data from the sample data files into your program to avoid having to retype this information every time you run the program.

After creating the resort, the program will ask for several "transactions". Each transaction is either an "in" (customers checking in), an "out" (customers checking out) or a "close" (the manager shutting up shop for the night).

While the program will run, it won't do the right things. It relies on various methods in the Cabin class to do the work for it. You need to complete those methods. (I have provided you with stubs for all of them.)

You can find the explanation for each method in the documentation provided. It's javadoc documentation, and was generated from the javadoc comments I have provided in the stater file for Cabin.

Your solution must satisfy every part of the javadoc, including the @throws clauses, which indicate what kind of an exception is thrown and under what circumstances it gets thrown. See the discussion in the course notes reviewing data types.

Notes

The Manager program doesn't test every aspect of the Cabin. In particular, the program prevents any illegal data from being given to the constructor and setters. You might want to test your code by commenting out the code that prevents bad values from being passed on to the constructor and setters.

Grading Outline

Your assignment will be graded out of 100. Yes, that is well over 100 points of possible deductions. Doing half the job is not going to get you have the credit. You need to do good work as a matter of course; only excellent work will get full credit.
SUBMIT   /   Check