Pages:
5 pages (1375 words) Double spaced

Type of paper:
Other (Class and State Diagrams) Undergraduate (yrs. 1-2)

Discipline:
Technology

Title:
ENTD321 Week 2—Class and State Diagrams Purpose

Sources to be cited:
0

Paper format:
Other: Summative Format with Assignment1ChrisSinfuego located in Additional materials.

Paper instructions:
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 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.

Directions

1.Read and review the Quick Resources at the end of this Assignment. (Located below directions)

2.Class Diagram. Create a UML class diagram with attributes, associations, multiplicity constraints, and operations using your CASE tool. Add your name and course number directly on your diagram.You must use the CASE tool to create your UML models!

The following sections apply to creating a class diagram and provides examples. Read through them (2.1 – 2.3) before you start.

2.1 Section 4.3 Lists of Classes with Definitions, Attributes, and Operations.Update your list of classes , attributes, operations, and requirements with any classes you omitted from the following list:Account, Administrator, CourseAdministrator, Book, Certificate, Course, CourseHistory, CourseSchedule, CreditCard, Customer, Instructor, Order, Payment, Product, ScheduleAdministrator, ScheduledCourse, SelfPacedCourse, ShoppingCart, ShoppingCartItem, User (username, password, status), Video, etc

2.2 Class Diagram. 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 also want to use a composition relationship in your diagram from Customer to Account, from Order to Account, and from Account to ShoppingCart .You will need to add other relationships. You will benefit from viewing the example online shopping domain UML diagram listed in the next paragraph.

2.2.1Attributes. Add attributes for each class and relationships between classes.Attributes are properties of classes, have names, and also have data types indicating the type of data expected like text, numbers, etc..For example, a name attribute would be text type data. Relationships establish some linkage between classes and can include associations, generalization, aggregation, and composition .Associations are the most common relationships and are named with verb phrases. See the example class diagram for our case study in Sample UML Class Diagrams for ITOT Classesandhttp://www.uml-diagrams.org/examples/online-shopping-domain-uml-diagram-example.html for an example of a ShoppingCart class diagram similar to our model.

2.2.2 Operations. You will also need to add operations for each of your classes.A class may have its own special operations.For example a Circle class will have draw() operation.So your classes will also have their own special operations.There are also general categories of operations like the CRUD (Create Read Update Delete) operations that apply to classes and their attributes.You will want to Create() and instance of a class, read (get) the values of its attributes, update (set) the values of a class’s attributes as well. We won’t worry about Delete at this point in our analysis–this occurs in design.You CASE tool will help here.As you add a class using the CASE tool, if you right click on the class and choose the option to” Add attributes with getter and setter methods”.Your CASE tool will automatically add getter/setter as methods for each attribute.This saves considerable time and effort. Getter/get operations are similar to read and produce values of attributes.Setter/set operations change values of attributes.

2.2.3Relationships. Class Diagram. Section 4.1. 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.

Identify the relationships among the classes.Associations are bidirectional and so we must consider them in both directions with multiplicity constraints as well.Using a table for the initial analysis will make it easier to create a class diagram.For each class ask the question “What other classes is the class related to?” or “What is the relationship between these two classes?” Once you identify the classes, then for each class pair ask “What is the relationship?” Multiplicity constraints are needed on both ends of the association and may be zero or one (0..1), one and only (1), zero or more (0..*), or many (*) ,etc.As you can see below there are two sentences with the multiplicity constraints describing the association in both directions. In this example the two classes are Instructor and Course.The relationship is “teaches”.On our diagrams we usually only show the relationship name in one direction and mentally reverse the verb phrase in the other direction. See Figures 3.12 and 3.15 in your textbook for an example of a class diagram with named associations and multiplicity constraints.

2.2.3.1Section 4.1.Add multiplicity constraints that you identified in the Class and Relationship Analysis table to each end of a relationship between classes.UML multiplicity constraints include the pairs 1..1, 1..*, *..*, 0..1, as well as others.

2.3 Section 4.1 Place your completed class diagram in Section 4.1.

2.4Section 4.1.Make certain that you continue from your Assignment 1 submission.Each week we will add to the Analysis Specification document until we finally complete it.So just take your previous assignment and add this assignment to it.

2.5Section 4. Complete Section 4 of the Analysis Specification with a brief introduction to the contents of the section. You can now include this since you have completed your class diagram.

2.6Sections 4.1, 4.2 and 4.3. These sections should be consistent. Make any necessary adjustments from Assignment 1 and the list of classes provided above.Update your discussion in Section 4.3.1 to reflect the new classes.

2.7Section 4.4.Complete Section 4.4 of the Analysis Specification with a discussion of your class diagram.

3. 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.

3.1Sections 5.1 and 5.2. Add your UML state diagram along with a discussion to Sections 5.1 and 5.2 of your Analysis Specification.See the article,ENTD321 Lesson 2 State How to Create a State Diagram.pdf,below on creating a state transition diagram before you start your diagram.

3.2 Section 5.Complete Section 5 of your Analysis Specification with an introduction the section contents.

******************************Quick Resources*********************************

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 http://www.agilemodeling.com/artifacts/classDiagram.htm,This providesexamples of a class diagrams.

2.See Ambler, Scott (n.d.). UML2 Class Diagramming Guidelines.Retrieved from http://agilemodeling.com/style/classDiagram.htm.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 http://utd.edu/~chung/SP/applying-uml-and-patterns.pdf. 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 or our Case Study.

Using a CASE Tool for Class Diagrams

1.See the fileCreating Project and Class Diagrams with a CASE Toolfor 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 articleon “How to draw a class diagram” at https://www.visual-paradigm.com/support/documents/vpuserguide/94/2576/7190_drawingclass.html

State Diagrams

1. See ENTD321 Lesson 2 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 http://www.agilemodeling.com/artifacts/stateMachineDiagram.htm

3. Ambler, Scott (n.d.). UML2 State Machine Diagramming Guidelines. Retrieved from http://agilemodeling.com/style/stateChartDiagram.htm. 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” at https://www.visual-paradigm.com/support/documents/vpuserguide/94/2579/6714_creatingstat.html

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 https://www.youtube.com/watch?v=UzUUZRK_Q6Y

Comments from Customer
Discipline: Object Oriented Programming and UML


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"