-
Notifications
You must be signed in to change notification settings - Fork 1
/
Project Idea.txt
23 lines (9 loc) · 2.28 KB
/
Project Idea.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
deliverIT
deliverIT is a simple delivery game. The characters involved in this game include Cab, Customers and Packages. The objective of the game is to deliver the given packages to the given destinations within the given time frame, using the available cabs. Each customer will be given an specific amount of money, a certain number of packages and a limited time. He needs to pick out the best combination of cabs available.
There will be three different types of cabs available, namely Big, Medium, and Small. All the above mentioned cabs will have their own rate and cost of delivery. The packages are classified as Big packages, Medium packages and Small ones. The Big package can only fit the Big cab. The Medium package can fit the Big and Medium cab. The Small package can fit three types of cab. At a moment, for those cabs available, the bigger a cab is, the higher priority that cab is chosen for delivering the package. Therefore, the user needs to pick the right combinations for the right moment. Winning or losing the game depends upon how well the user utilized his resources to deliver all the packages to the destination.
The project has scope for implementing 6 patterns, Decorator, Composite, Factory, State, Observer and Chain-of-Responsibility namely. There is a scope for a lot more patterns but for now we will stick to these patterns. The implementation of these patterns is given below:
* Decorator And Composite Pattern: Showing the final receipt to the customer, which includes the list of deliveries ordered, their individual rates and the final cost incurred.
* Factory: Assigning the proper cab to the proper package. If a request is for a small package then a small cab is assigned.
* State: Cabs will have a limit to carry, so will have different states like empty, half filled and full filled etc.
* Observer: The Customer will be notified of the state changes of the Cabs.
* Chain-of-responsibility: used to assign the responsibility of pick up to the cabs. Whenever a customer requests a package pickup the request will go through all cabs and the cab with the availability of pickup will respond or, if no cab is available then a not available response is generated.