78

profileGman 21$

 

Week 2 Assignment: Classes and State Diagrams

Purpose

The purpose of this assignment is to continue building our ITOT case study models by using the classes and their properties from Assignment 1 (but you should revise this based on the list of classes given below) and creating a Class Diagram and Class and Relationship Analysis table for the relationships among classes. In addition, we will build a state diagram for the ShoppingCart class.

Course Objective(s): 

CO2: Explain advanced class modeling concepts and the state model.
CO9: Apply your knowledge of object oriented and UML concepts by designing and developing UML models.

Assignment Instructions

In this assignment you will create a class diagram using the Class and Relationship Analysis table for all of the classes you identified in Assignment 1 (but you should revise this based on the list of classes given below) and a state diagram for your ShoppingCart class. Make certain that you include all of the classes and any additional classes or corrections to your Assignment 1.

For the Analysis Specification you will add detail to Sections 4 and 5.

Directions

Complete the following:

Section 4.1. 

Use your CASE tool to create a UML class diagram that includes the following classes: Customer, Account, ShoppingCart, ShoppingCartItem, Product, Video, Book, Course, Payment, and Order.

Each class must have attributes, operations, and relationships to other classes. It is helpful to do a rough sketch of the diagram on paper before you create your diagram in the CASE tool. Note that Product forms a generalization hierarchy with Video, Book, and Course. You will benefit from viewing the example online shopping domain UML diagram listed in the next paragraph.

Section 4.2: Class and Relationship Analysis

Include at least 9 named relationships with multiplicity constraints on associations to other classes. Names and multiplicity constraints are required on all associations. The shape of the line used indicates the type of relationship for generalization, aggregation, and composition relationships so you do not need names here. Association names are often verb phrases like "purchases" from "A Customer purchases a ScheduledCourse". To determine the associations, you can also use the same technique as the noun analysis, but do verb analysis instead. Review Section 2.2 above for some pointers on relationships. To help you discover the associations and multiplicity constraints, complete the Class and Relationship Analysis table below and add it to Section 4.2 . The class and Relationship Analysis table is already included in Section 4.2 of your specification.

Example:

Class and Relationship Analysis

Relationship with Multiplicity

Class Name 2

An Account is connected to one (1) User

A User is can only be connected to (1) Account

User

Section 4.3: List of Classes With Definitions

List the classes with their definition, attributes, operations, and requirements number.

Example:

Classes, Attributes, Operations, Requirement

Class

Name

Class Definition

Attributes

Operations

Requirement

Number

Account

A Account is a file of a User with credentials to access the ITOT system

AccountID: string

Is_Closed: Boolean

Open: date

Closed: date

REQF3.1

Section 4.4: Discussion

Complete Section 4.4 of the Analysis Specification with a discussion of your class diagram (100 to 125 words).

Section 5.1: ShoppingCart State Diagram and Discussion

Create a UML state diagram for the ShoppingCart class with your CASE tool. Add your name and course number directly on your diagram. Make certain that you name the transitions and add guards as necessary. States are named using gerunds (ing verb form), past participle, prepositional phrases, or attributes. A state diagram is not an activity diagram! For example, for a pizza you might order online the states might be building, assembling, baking, quality checking, delivering, and delivered.

Submission Instructions

1. Submit your updated Analysis Specification as a Word file.

2. When you submit your Word file, use your name as part of the file name, e.g., ENTD321Assignment2_FirstNameLastName. Also make certain that your name and course number is at the top of your document.

Your assignment will be graded in the following manner:

  1. Completion of a UML class diagram with attributes, associations, multiplicity constraints, and operations (15 points)
  2. Completion of Section 4.1; using CASE to create a UML class diagram that includes the following classes Customer, Account, ShoppingCart, ShoppingCartItem, Product, Video, Book, Course, Payment, and Order (15 points)
  3. Completion of Section 4.3, List of Classes with Definitions, Attributes, and Operations. Update your list of classes, attributes, operations, and requirements with any classes you omitted, etc. (15 points)
  4. Completion of Section 4.4 of the Analysis Specification with a discussion of the class diagram (15 points)
  5. Completion of the UML state diagram for the ShoppingCart class with the CASE tool, complete with transitions and guards. States are named with gerunds (-ing verb ending) (15 points)
  6. Complete Section 5:Complete an introduction to the section comments and add UML state diagram to section 5.1 (15 points)
  7. Sources/Formatting: Use APA 7th edition style formatting and correct grammar (10 points)

Former Student Shared:

Visual Paradigm is a great tool. I was my own worst enemy using it though. In week 2 I jumped into creating a class diagram without reading the resources provided to make it easier to create the diagram and got pretty frustrated that I did not touch the project for two days. Once I regrouped and read the resources provided, I found that the tool would make it easier to create the relationships in the diagram. The application is something I would like to devote more time to in the future.  

My favorite part of this course was learning about UML models, particularly class and sequence diagrams. This aspect of the course appealed to me because it provided a visual and systematic approach to understanding and designing complex software systems. The ability to visually represent and analyze the components of a system has not only enhanced my design skills but also improved my ability to communicate ideas effectively with peers and stakeholders.

The most significant takeaway from this course is the comprehensive understanding of OOP principles and their practical implementation using UML. This knowledge is crucial in my journey as a computer science student and a future software developer. I anticipate that these skills will be fundamental in my ability to design and develop robust and efficient software solutions, thereby advancing my career in technology.

Quick Resources

Using a CASE Tool for Class Diagrams

1. See the file Creating Project and Class Diagrams with a CASE Tool for step by step instructions on creating a project and class diagram using a CASE tool.

2. See step by step instructions for drawing class diagram from the VP User Guide article on "How to draw a class diagram"

State Diagrams

1. See  State How to Create a State Diagram.pdf for a detailed example on how to create a state diagram.

2. Ambler, Scott (n.d.). UML2 State Machine Diagrams: An Agile Introduction. Retrieved from here.

3. Ambler, Scott (n.d.). UML2 State Machine Diagramming Guidelines. Retrieved from here. This style guide provides guidelines for general issues, state, substates, transitions and actions, and guards.

Using a CASE Tool for State Diagrams

1. See step by step guidelines for creating state machine diagrams with Visual Paradigm in the VP User Guide article "How to draw State machine Diagrams".

2. See the video for drawing state diagrams with VP at Visual Paradigm. (2011 November 4). 5 Steps to Draw a State Machine Diagram. Retrieved from here.

Use the following for examples and guidelines for class and state diagrams but make certain that you put names on your associations.

Classes and Class Diagrams

1. See Ambler, Scott (n.d.). UML2 Class Diagrams: An Agile Introduction. Retrieved from here, This provides examples of a class diagrams.

2. See Ambler, Scott (n.d.). UML2 Class Diagramming Guidelines. Retrieved from here. This style guide includes the guidelines for drawing and naming for class diagrams including general guidelines, class style guidelines, interfaces, relationships, inheritance, aggregation and composition.

3. Download the following book (you will need it for readings later):

Larman, Craig. (2001). Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process. Second Edition. Retrieved from here. There is also a third edition available. 45. See Chapter Larman 11 Domain Model: Adding Associations, p. 163. Review sections 11.1 – 11.8. Pay particular attention to multiplicity constraints (Figure 11.4), and naming (Figures 11.6) and multiple associations between two classes (Figure 11.7). Use these examples as guidelines for naming associations in your class diagram.

4. Sample UML Class Diagrams for ITOT Classes has a partial class diagram for the Instructor, Course, and ExpertiseArea classes for our Case Study.  ExpertiseArea was added since it was determined that it would be necessary to keep a record of the expertise areas for Instructors.  At times during development, new classes will be discovered.

    • 8 months ago
    • 20