Assignment_Task_Breakdown
Assignment_Task_Breakdown
1. Objective: Create a class diagram representing the structure and relationships for the online
shopping system.
2. Steps:
- Analyze Requirements: Review the provided scenario carefully to identify necessary classes, their
attributes, and methods.
- Identify Classes: At minimum, create classes for Admin, Customer, Product, and Category.
Additional classes may be needed based on the application’s requirements.
- Define Relationships: Determine the interactions between classes:
- Use inheritance where appropriate (e.g., Admin and Customer classes might inherit from a base
User class).
- Show associations between classes (e.g., a Shopping Basket class might have a list of Product
objects).
- Design the Diagram:
- Use UML notation to detail the attributes, methods, and relationships.
- Ensure visibility (public/private access levels) and specify method names, parameter types, and
return types.
- Avoid overlapping lines in the diagram to maintain clarity.
3. Deliverables:
- Insert the completed diagram into the provided CW2_CLASS_DIAGRAM_TEMPLATE_TEAMX
template, along with a description explaining key features like relationships, inheritance, and key
methods/attributes.
4. Tools Suggested: UML diagramming tools like Lucidchart, Draw.io, or Microsoft Visio.
Task 2: Application Implementation
1. Objective: Develop a C# console application based on the class diagram, implementing all
specified functionality for both Admin and Customer users.
2. Steps:
- Build the Console Application: Use Visual Studio 2022 for development, and ensure the code
structure follows the class diagram.
- Implement Each Class: Each class should:
- Have constructors and methods as defined in the class diagram.
- Implement encapsulation by keeping private fields with public getters/setters as needed.
- Store attributes for each class, like Admin and Customer with necessary properties, and methods
for functionality (e.g., AddProduct for the Admin class).
- Create User Interface:
- Design menus for Admin and Customer roles.
- Implement a method called OnlineShop.cs to display a main menu and load sample users,
products, and categories when the application begins.
- Validate Admin credentials to restrict access to specific actions, such as adding/removing products
and updating customer status.
- Allow Customer users to browse, add products to a shopping basket, and proceed with purchases.
- Error Handling: Use try-catch blocks to handle errors gracefully and display meaningful messages
for user mistakes or system errors.
3. Deliverables:
- A zipped folder with the source code for the entire application, including all classes, constructors,
methods, and a detailed guide on running the application.
2. Steps:
- Develop Test Cases:
- Write unit tests in C# that cover a range of scenarios and edge cases (e.g., testing maximum and
minimum values for properties).
- Ensure each test is clearly named and commented to explain its purpose.
- Include tests for critical functions, such as:
- Admin actions (e.g., adding products, updating customer details).
- Customer actions (e.g., adding/removing products from the shopping basket).
- Class constructors and method outputs.
- Run Tests:
- Execute tests using Visual Studio’s test explorer to verify that all tests pass.
- Address any failures by debugging the code until all tests are successful.
- Document Results:
- Take a screenshot of the test explorer window showing the test results.
- Insert this screenshot into the CW2_UNIT_TESTING_TEMPLATE_TEAMX document from
Blackboard, explaining what each test checks and its expected outcome.
3. Deliverables:
- A separate C# project within the solution specifically for unit tests.
- A completed unit testing document with screenshots and comments describing each test.