Due - Sunday, September 22, 2024
This is a group project of 2 or 3 students per group. The groups can be found in the document Assignment1_Groups.docx.
You have been given code for generating a tool box as well as filling a grocery bag. For each, the user is prompted for information, then the appropriate object is created. In the end the customer will have a shopping cart of tools and groceries. These tools and groceries are purchased at a retail store, which would like to keep statistics about purchasing preferences.
You must decide if you are going to use one of the standard design patterns that you have
learned so far, or create a custom one. Either way, you must provide a UML diagram of your
implementation.
You can write your code in one of the following four languages: C++, C#, Java or Python.
Explain your choice, keeping in mind the principles of software engineering regarding
reusability and extensibility. Also keep in mind that at least one of your assignments
has to be written in Java and at least one in C#.
The shopping cart contains an assortment of tools and groceries. Code for generating tools is given in
four languages:
C++: Toolbox.cpp.
C#: Toolbox.cs.
Java: Toolbox.java.
Python: Toolbox.py.
Note that each tool has a name and a cost. Note that the above code limits the number of tools you
can purchase to 2 and limits the types of tools to the Hammer and Screwdriver.
Note that tools are taxable with GST=14%.
Code for generating groceries is given in four languages:
C++: GroceryBag.cpp.
C#: GroceryBag.cs.
Java: GroceryBagMain.java.
Python: GroceryBag.py.
Note that each grocery item has a name, cost and calories. Note that the above code limits the number
of groceries you can purchase to 2 and limits the types of groceries to the Apple and
Orange. Note that groceries are not taxable.
The customer has a shopping cart as well as a name, cash and a pointer to a retail store (because the customer can only visit one retail store at a time). The customer can fill the shopping cart, spend cash, and add cash.
The retail store has a collection of customers who visit the store. For each purchase, the retail store will calculate and report the cost, adding GST where necessary. The retail store displays everything that is in the shopping cart once the customer's purchase is complete. The retail store wishes to keep the following statistics:
Create a test program to run the above. You can modify the existing code if you wish. Run the test program for three customers. Be sure to display each customer's order, including the total. After the three customers have finished their purchasing, calculate and display statistics for the retail store.
You will be marked out of 10 according to the following:
Does not meet expectations | Satisfactory | Good | Exceeds Expectations | |
---|---|---|---|---|
UML Diagram (2 marks) | Does not meet requirements | Meets the most important requirements | Meets all requirements with minor errors | Meets all requirements with no errors |
Shopping cart (2 marks) | Does not meet requirements | Meets the most important requirements | Meets all requirements with minor errors | Meets all requirements with no errors |
Customer (1 mark) | Does not meet requirements | Meets the most important requirements | Meets all requirements with minor errors | Meets all requirements with no errors |
Retail Store (2 marks) | Does not meet requirements | Meets the most important requirements | Meets all requirements with minor errors | Meets all requirements with no errors |
Code Documentation (1 mark) | Does not contain documentation | Contains header documentation for either all files or for all functions within each file | Contains header documentation for all files and for most functions within each file | Contains header documentation for all files and for all functions within each file. Documents unclear code. |
Questions (2 marks) | Answers no question correctly | Answers some questions correctly | Answers most questions correctly | Answers all Questions correctly |
Please email all source code and answers to questions to: miguel.watler@senecapolytechnic.ca
Your answers to questions can be submitted in a separate document or embedded within your source code.
You will be docked 10% if your assignment is submitted 1-2 days late.
You will be docked 20% if your assignment is submitted 3-4 days late.
You will be docked 30% if your assignment is submitted 5-6 days late.
You will be docked 40% if your assignment is submitted 7 days late.
You will be docked 50% if your assignment is submitted over 7 days late.