For this project, you are to use Java-RMI to redo the application from HW1 with a few differences.
There will be two forms of clients for this project. A Manager Client and an Agent Client. The Agent Client is the simplier of the two. It will allow the following operations:
This command will request from the server and display for the user all of the current events on the system. For each event, it is to display:
When making a reservation, a valid Event Number is entered along with the amount of space requested and the name of the person making the reservation. The server must verify that the Event Number is valid and has the available amount of space. If so, a unique confirmation number is generated as a reply. If not, an error message is generated as a reply.
When deleting a reservation, a valid Event Number and the Valid Confirmation Number for an existing reservation is given to the server. If both are valid, the server replies with Person's name, amount of space reserved and an "Are you sure you want to delete this reservation?" prompt. When the user answers "yes", the reservation will be deleted.
The Client must have some way to stop its execution.
The Manager Client will be able to perform all of the tasks done by the Agetn Client plus:
The user will need to specify the description and the total amount of available space. The server will generate a unique Event Number for the event.
The user will need to specify a valid Event Number and must answer an "Are you sure?" prompt, before removing the event. Once removed, all information about the event will be lost.
When given a valid event, the server will respond with Event Description, number of Available spaces and for each reservation make, the person name, the confirmation number and the amount of space reserved.
When ever a client makes or deletes a reservation, an message is to be displayed showing the Event Number, the amount of space reserved/made available and the total amount of space available.
Note that there may be multiple Manager and Agent Clients running at any particular time. You may assume that the server use a known port number which may be hardcoded into your code. A good port number to use is the result of adding 10,000 to the last 4 digits of your UIN.
Your project is to be turned in electronically via turnin to the CS 441 instructor account using the project name of "hw2". Each student is to work independently on this project. You are also to write up a README file that discusses how to compile and run the project, the form of how the the reservation data is stored by the server and the communication protocol used between the server and the clients. Also, there will be some points for the project awarded based on programming style used in your project.
How to turn in your work
Turnin your program electronically using the "turnin" command from your CS account as follows:
where the [your project directory] is the directory name under which you have all your files related to this programming problem. The turnin command will automatically compress the data under your directory, so there is no need to do the compression by yourself. This also assumes that you are in the parent directory of the project directory when executing the command.
turnin -c cs441 -p hw2 [your project directory]
Notice you can only invoke turnin command on the Linux machines in the lab or after logging into the server machine oscar.cs.uic.edu.
If you want to verify that your project was turned in, look in the turnin directory for a file with your userid. For instance for this project, from your CS account you would type:
turnin -c cs441 -p hw2 -v
Note that you can execute turnin as many times as you would like, up until the program deadline when turnin will be disabled for this project. Each time you execute turnin for a project, you overwrite all of what you had turned in previously for that project.It does not work in an incremental way.