COP 2805 (Java II Programming) Project
Office Hours Checker


Due:  Tuesday 10/5/05, by the start of class


Note you may work in groups on this project if you wish.

Develop a GUI application that checks an instructor's office hours.  HCC instructors are required to post office hours by the end of the first full week of classes.  The Dean must check each submitted office hour schedule to make sure the schedule meets the HCC polices.  This can be a time-consuming and tedious task!  Our dean (Dean Johnson) asked me to develop a program to check the schedules against the policies, and report any violations.

Ideally, this would be a server program, so that a faculty member could use a web form (or thick client) to develop the schedule.  The application could authenticate the user, lookup the instructor's information (status and current teaching schedule) from the HCC database, and allow the instructor to simply click on boxes in a table to schedule weekly office hours.  The submit button would report policy violations to the user or submit the final schedule as email to the dean.  (A printout of the schedule would be nice as well.)

A full server based system would allow an interface for the dean to edit policies and save and load them from a file or database, but don't do that for this assignment!  (The format of such a policy file could be anything, but XML would probably be the correct choice.)


Use Eclipse to create your application.

Use JUnit to create unit tests for your application's methods, after you design the method but before you code it up.  (You will create stub methods at first, but eclipse will do that for you if you ask it nicely.)

For version one, develop a stand-alone java client application.  The program should be a double-clickable jar file.

The user must enter a name, status (full-time or adjunct), and the current class schedule (e.g., a credit class COP-2805, Mon, Wed, 5:30-6:45).  Then the user enters the requested office hours.  When done the use clicks a "submit" button, which reports the any violations of policy, or reports the schedule is acceptable.  The user interface is up to you.

The policy for office hours is comprised of a number of rules, such as:

For this assignment, each policy will be implemented as a method of a class PolicySet that takes the current schedule and instructor data as arguments and returns a class Status object, which contains a status field (using an boolean to indicate success or failure, and a String describing the reason for the failure (or null if the schedule passes the policy check).

Your program will use reflection to locate the policy methods and to invoke them.  You can use annotations to mark methods that are policy check methods.


Use a JTable to display the schedule.  The table could have one column for each day of the week, and a row for the time slots, in 15 minute blocks.  The instructor's name and status (full or part time) can be displayed in a heading in the first row or two.

Allow the user to enter schedule data by clicking cells and typing the name of the class, or the word "hours" to indicate office hours.

Add a menu bar with a "File" menu and possibly "Edit" and "Help" menus.  The File menu should have choices for exit and to print the schedule.  Note a JTable has printing support so that adding a print menu choice is almost trivial in this case.

You can ask your instructor for help anytime. 

I'll add some if I think of any more.

To be turned in:

Email to me a single, runnable jar file that I can double-click to run your application.  The jar file should also contain all your source code, under a /src directory.

Send your project to .  Please use a subject such as "Java II Project 1" or "Java II Office Hours Project", so I can tell which emails are submitted projects.  Send project questions to .  Please use a subject such as "Java II Project 1 Questions" so I can tell which emails are questions about the project.

Late projects generally will not be accepted.  In the event a student submits more than one project, I will ignore all but the last one received up to the deadline.  Projects submitted after the deadline will not count toward your grade without the prior express approval of your instructor.

Other Requirements and Grading

If you work in a group, the entire group must submit a single email with the attached project.  That email should name all members of that group.  In addition, each member of a group is required to submit a separate email, describing the contribution that was made by each group member including themselves.  All members of the group will receive a grade based on the quality of the project and the amount of participation they did, based on the reported participation by all members of that group.

The project must meet all the requirements from the description and requirements sections above.  If the project includes any creative extras, be sure the program still works as described above.  Creative extras are extras:  You are not free to modify the project requirements.

A non-working project can score quite well (so don't be afraid to turn one in).  Also a fully working project may not score 100%.  The criteria for grading are as follows:

Projects are graded according to their design (25%), how well they compile and run (20%), how well they meets the requirements specifications (20%), the coding style (15%), the amount (and quality) of comments(10%), and creativity in extending the project usefully, or an innovative design that uses the features taught in class well, etc. (10%).

Please review Submitting Assignments and Project Grading Criteria from your class syllabus for further details.