0% found this document useful (0 votes)
2 views

Assignment_Task_Breakdown

The document outlines a three-part assignment for developing an online shopping system, including class diagram design, application implementation, and unit testing. Task 1 involves creating a UML class diagram with defined classes and relationships, while Task 2 focuses on building a C# console application that implements the diagram's functionality. Task 3 requires developing unit tests to validate the application's reliability, documenting results, and providing a structured approach to testing each class and method.

Uploaded by

Slopzi ϟ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment_Task_Breakdown

The document outlines a three-part assignment for developing an online shopping system, including class diagram design, application implementation, and unit testing. Task 1 involves creating a UML class diagram with defined classes and relationships, while Task 2 focuses on building a C# console application that implements the diagram's functionality. Task 3 requires developing unit tests to validate the application's reliability, documenting results, and providing a structured approach to testing each class and method.

Uploaded by

Slopzi ϟ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment Task Breakdown

Task 1: Class Diagram Design

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.

4. File Structure and Organization:


- Separate classes into individual files within a single project.
- Maintain code clarity with comments, and structure methods, variables, and classes using
consistent naming conventions.

Task 3: Unit Testing


1. Objective: Create unit tests to validate the functionality and reliability of each class and method in
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.

You might also like