Description
Office Depo an office supply retailing companydonates its surpluses to colleges at the end of each year.Volunteers will help deliver packages of supplies to representativeof colleges (Recipient of supplies). Write an application to simulate delivering packages from the container of packages by the volunteers to recipients.
Concepts tested:
Generic Queue, co
Generic Stack,
Exception handling,
Data Elements
Volunteer-Holds therelevant information for a Volunteer: name
DonationPackage- Holds the information of the package to be donated:description, weight
Recipient- Holds the information of the recipients: name
Data Structures
- Createageneric queue class called MyQueue to implementthe queue of volunteers and recipients MyQueue will implement the QueueInterface given you.
- Create a generic stack class called MyStackto place the DonationPackage on a Container.MyStack will implement the Stack Interface given you.
There will be a VolunteerLineclass, a RecipientLine Class and a Containerclass The VolunteerLineclass will implement the VolunteerLineInterface, the RecipientLine class will implement the RecipientLineInterface class and the Container class will implement the ContainerInterface class
Limit the size of each collection to 5.
Data Manager
The DonationManager class will manage adding a new package to the container, a new volunteer to the volunteer queue line , a new recipient to the recipient queue and donating package by the volunteer to the recipient.DonationManager will implement the interface DonationManagerInterface.
You may add additional methods and attributes to your classes
GUI Driver
- Initially there is no package on the container, any volunteers and recipients on the queue.
- Allow the user to loadnew package to the container and add new volunteers to volunteer’s line and new recipient to recipients’ line.
- Do not allow packages heavier than 20lbs to be added to the container.
- Allow the user to simulate process of donating the package from the container by volunteer on the queue to the recipient on the queue. When a volunteer helps donating the package to the recipient, he/she will be back to the queue of volunteers to continue the process of donation.
- Provide three exception classes:
- RecipientException: If the user attempts to add new Recipient and the recipient line is full (5 recipients).
- VolunteerException – If the user attempts to add new Volunteer and the volunteer line is full (5volunteers).
- ContainerException – If the user attempts to add new Donation Package and the Container line is full (5 packages).
Examples:
At startup
After selecting “Stack New Package”
Pen(first) and Books (second).
After adding new Volunteers John (first), after adding new Recipient MC,
Nicole (second) Maryland
After selecting DonatePackageAfter selecting Donate Package Second time
First Time
After selecting Donate Package Third time
If the user tries to add a new volunteer:
Program Grade Sheet
Assignment #2
CMSC 204
Name _______________________________________________
DOCUMENTATION
CheckList for Assignment 2 is included and completed 1 pt _____
Class documentation – Javadoc for all user created classes 4 pt _____
Class Description, @author
Method description, @param, @return
Test Cases 6 pt_____
JUnit Test Class
Implement STUDENT test for DonationManagerTest
Create a MyQueueTest and MyStackTest
UML Diagram 4 pt_____
Lessons Learned 5 pt _____
In 3+ paragraphs, highlight your lessons learned and learning experience from working on this project. How did you do? What have you learned? What did you struggle with? How will you approach your next project differently?
PROGRAMMING
Internal class documentation (within source code) 6pts_____
Class description using Javadoc
Author’s Name, Class, Class Time, @author
Methods commented using Javadoc, @param, @return
Compiles and Runs without errors 6pts_____
Program user interface
Clear to user how data is to be entered 4pts_____
Output is easy to understand 4pts_____
Accuracy
Received correct output
- Public tests (given to you and those you wrote) 10 pts_____
- Private tests 10 pts_____
Program Details
Data Structures 10pts_____
- Stack class for Container
- Queue for volunteer line
- Queue for Recipient line
Data Elements–DonationPackage, Volunteer, Recipient
- Contains required attributes 6 pts_____
- Contains toStringany other necessary methods
Data Manager – DonationManager 10 pts_____
- Implements DonationManagerInterface
- Creates Volunteer, Recipient, and DonationPackage objects
- Donate Package implemented
- Correctly handles exceptions
GUI classes: 14pts_____
- Displays information for the volunteers, recipients and packages
Correctly as queue and stack.
- Provides buttons for user actions
Total 100 pts _____