| Home Page |
| Course Page |
Overview
Geographic Package System
Software Requirements
Submission Requirements
Grading Criteria
Late Projects
Plagiarism
Resubmission
Write a distributed system in Java for a package tracking system called Geographic Package Service (GPS). The GPS system will include distributed objects and client programs, residing in multiple processes, running on different host computers, and communicating with each other using Java remote method invocation (RMI).
The GPS Company provides customers with a package delivery service. GPS delivers a package to a destination specified by geographic coordinates (longitude and latitude, or X and Y), not postal addresses. GPS uses an experimental version of Star Trek's transporter technology to beam a package to its destination. Because the transporter has a limited range (it's still experimental, after all), GPS cannot necessarily beam a package directly to its final destination. Instead, the service works like this:
The GPS distributed system consists of the following components:
Any number of GPS office objects and any number of clients may be running simultaneously. Only one Registry Server is running. It is assumed that the Registry Server does not fail.
GPS Office Object
java Start GPSOffice <host> <port> <name> <X> <Y>
Note: This means that the GPS office object's class must be named GPSOffice, this class must not be in a package, and this class must define the appropriate constructor for the Start program.
Note: The Registry Server is an instance of class edu.rit.ds.registry.RegistryServer.
Customer Client Program
java Customer <host> <port> <name> <X> <Y>
Note: This means that the client program's class must be named Customer, and this class must not be in a package.
Note: The Customer program is a client program, not a distributed object.
Note: The Registry Server is an instance of class edu.rit.ds.registry.RegistryServer.
Package number <tracknum> arrived at <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office at which the package arrived.
Package number <tracknum> departed from <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office from which the package departed.
Package number <tracknum> lost by <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office from which the package departed.
Package number <tracknum> delivered from <name> office to (<X>,<Y>)where <tracknum> is replaced by the package's tracking number, <name> is replaced by the city name of the GPS office that delivered the package, <X> is replaced by the X coordinate of the package's destination, and <Y> is replaced by the Y coordinate of the package's destination.
Headquarters Client Program
java Headquarters <host> <port>
Note: This means that the client program's class must be named Headquarters, and this class must not be in a package.
Note: The Headquarters program is a client program, not a distributed object.
Note: The Registry Server is an instance of class edu.rit.ds.registry.RegistryServer.
Package number <tracknum> arrived at <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office at which the package arrived.
Package number <tracknum> departed from <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office from which the package departed.
Package number <tracknum> lost by <name> officewhere <tracknum> is replaced by the package's tracking number and <name> is replaced by the city name of the GPS office from which the package departed.
Package number <tracknum> delivered from <name> office to (<X>,<Y>)where <tracknum> is replaced by the package's tracking number, <name> is replaced by the city name of the GPS office that delivered the package, <X> is replaced by the X coordinate of the package's destination, and <Y> is replaced by the Y coordinate of the package's destination.
General Requirements
Design Restrictions
Hint: Consider utilizing a thread pool from package java.util.concurrent.
Your project submission will consist of a Java archive (JAR) file containing the Java source files for your client program.
See my Java source files which we studied in class for the style of Javadoc comments I'm looking for.
Put all the source files into a JAR file named "<username>.jar", replacing <username> with the user name from your Computer Science Department account. The command is:
jar cvf <username>.jar *.java
If your program uses classes or interfaces from the Computer Science Course Library without changes, then you do not need to include these classes' or interfaces' source files in your JAR file. If your program uses classes or interfaces from the Computer Science Course Library with changes, then you do need to include these classes' or interfaces' source files in your JAR file.
Send your JAR file to me by email at ark@cs.rit.edu. Include your full name and your computer account name in the email message, and include the JAR file as an attachment.
When I get your email message, I will extract the contents of your JAR file into a directory. However, I will not replace any of the source files in the Computer Science Course Library with your source files; your project must compile and run with your files in their own separate directory. (You can do this project without needing to replace any source files in the Computer Science Course Library.) I will set my Java class path to include the directory where I extracted your files and the directory where the Computer Science Course Library is installed. I will compile all the source files using the JDK 1.6.0 compiler. I will then send you a reply message acknowledging I received your project and stating whether I was able to compile all the source files. If you have not received a reply within one business day (i.e., not counting weekends), please contact me. Your project is not successfully submitted until I have sent you an acknowledgment stating I was able to compile all the source files.
The submission deadline is Tuesday, April 2, 2013 at 11:59pm. The date/time when your email message arrives in my inbox (not when you sent the message) will determine whether your project meets the deadline.
You may submit your project multiple times before the deadline. I will keep and grade only your most recent submission that arrived before the deadline. There is no penalty for multiple submissions.
If you submit your project before the deadline, but I do not accept it (e.g. I can't compile all the source files), and you cannot or do not submit your project again before the deadline, the project will be late (see Late Submissions below). I strongly advise you to submit the project several days before the deadline, so there will be time to deal with any problems that may arise in the submission process.
Your project will be graded as follows:
I will evaluate the design of your interfaces and implementations as documented in the Javadoc and as implemented in the source code. Your project should:
Each portion of the design will be graded as follows:
I will run test cases on your project to determine whether all the Software Requirements were correctly implemented. The test cases will be graded as follows:
If any of the objects or programs cannot be run using the command lines specified in the above Software Requirements, you will receive 0 points for the test cases portion of your grade, and I will not test your project further.
If there is any deviation from the requirements, no matter how small, you will receive 10 points for the test cases portion of your grade, and I will not test your project further. This includes errors in the output formatting, such as misspellings, incorrect number of spaces, incorrect capitalization, incorrect punctuation, missing characters, or extraneous characters. The requirements state exactly what the output is supposed to be, and there is no excuse for outputting anything different. If any requirement is unclear, please ask for clarification.
I may run the Registry Server, distributed objects, and client programs on the same computer or on separate computers.
When I run the Registry Server, the Java classpath will point only to the directory where the Computer Science Course Library is installed. There is no need for the Registry Server classpath to point to the directory with your compiled class files because you are not changing the implementation of the Registry Server.
When I run your distributed objects and client programs, the Java classpath will point first to the directory with your compiled class files, followed by the directory where the Computer Science Course Library is installed.
After grading your project I will put your grade and any comments I have in your encrypted grade file. For further information, see the Course Grading and Policies and the Encrypted Grades.
If I have not received a successful submission of your project by the deadline, your project will be late and will receive a grade of zero. You may request an extension for the project. There is no penalty for an extension. See the Course Policies for my policy on extensions.
Programming Project 1 must be entirely your own individual work. Programming Project 1 is not to be done as a team effort. I will not tolerate plagiarism. If in my judgment the project is not entirely your own work, you will automatically receive, as a minimum, a grade of zero for the assignment. See the Course Policies for my policy on plagiarism.
If you so choose, you may submit a revised version of your project after you have received the grade for the original version. You are allowed to make one and only one resubmission of the project. However, if the original project was not successfully submitted by the (possibly extended) deadline or was not entirely your own work (i.e., plagiarized), you are not allowed to submit a revised version. Submit the revised version via email in the same way as the original version. I will accept a resubmission up until 11:59pm Saturday 20-Apr-2013. I will grade the revised version using the same criteria as the original version, then I will subtract 4 points as a resubmission penalty. The revised grade will replace the original grade, even if the revised grade is less than the original grade.
| Course Page |
| Home Page |