UML Diagram

Anonymous
timer Asked: Nov 11th, 2016

Question description

A software Engineering class its a UML project i already uploaded all the guidelines i only WANT PROJECT 3 but i attached 1 and 2 guidelines so the tutor understand and do it correct also its all related.

Project 1 Software Engineering CSIT at UDC Introduction  What is UML?  Why should I bother?  Do people really use UML?  What is a UML class diagram?  What kind of information goes into it?  How do I create it?  When should I create it? 2 1 Design phase design: specifying the structure of how a software system will be written and function, without actually writing the complete implementation a transition from "what" the system must do, to "how" the system will do it  What classes will we need to implement a system that meets our requirements?  What fields and methods will each class have?  How will the classes interact with each other? 3 How do we design classes?  class identification from project spec / requirements  nouns are potential classes, objects, fields  verbs are potential methods or responsibilities of a class  CRC card exercises  write down classes' names on index cards  next to each class, list the following: • responsibilities: problems to be solved; short verb phrases • collaborators: other classes that are sent messages by this class (asymmetric)  UML diagrams 4  class diagrams (today)  sequence diagrams  ... 2 Introduction to UML  UML: pictures of an OO system  programming languages are not abstract enough for OO design  UML is an open standard; lots of companies use it  What is legal UML?  a descriptive language: rigid formal syntax (like programming)  a prescriptive language: shaped by usage and convention  it's okay to omit things from UML diagrams if they aren't needed by team/supervisor/instructor 5 Uses for UML  as a sketch: to communicate aspects of system  forward design: doing UML before coding  backward design: doing UML after coding as documentation  often done on whiteboard or paper  used to get rough selective ideas  as a blueprint: a complete design to be implemented  sometimes done with CASE (Computer-Aided Software Engineering) tools  as a programming language: with the right tools, code can be auto-generated and executed from UML  only good if this is faster than coding in a "real" language 6 3 UML class diagrams  What is a UML class diagram?  UML class diagram: a picture of the classes in an OO system, their fields and methods, and connections between the classes that interact or inherit from each other  What are some things that are not represented in a UML class diagram?   details of how the classes interact with each other algorithmic details; how a particular behavior is implemented 7 Diagram of one class  class name in top of box  write <> on top of interfaces' names  use italics for an abstract class name  attributes (optional)  should include all fields of the object  operations / methods (optional)  may omit trivial (get/set) methods • but don't omit any methods from an interface!  should not include inherited methods 8 4 Class attributes  attributes (fields, instance variables)  visibility name : type [count] = default_value  visibility: + # ~ / public protected private package (default) derived  underline static attributes  derived attribute: not stored, but can be computed from other attribute values 9  attribute example: - balance : double = 0.00 Class operations / methods  operations / methods  visibility name (parameters) : return_type  visibility: + # ~ public protected private package (default)  underline static methods  parameter types listed as (name: type)  omit return_type on constructors and when return type is void  method example: + distance(p1: Point, p2: Point): double 10 5 Comments  represented as a folded note, attached to the appropriate class/method/etc by a dashed line 11 Relationships btwn. classes  generalization: an inheritance relationship  inheritance between classes  interface implementation  association: a usage relationship  dependency  aggregation  composition 12 6 Generalization relationships  generalization (inheritance) relationships  hierarchies drawn top-down with arrows pointing upward to parent  line/arrow styles differ, based on whether parent is a(n): • class: solid line, black arrow • abstract class: solid line, white arrow • interface: dashed line, white arrow  we often don't draw trivial / obvious generalization relationships, such as drawing the Object class as a parent 13 Associational relationships  associational (usage) relationships 1. multiplicity (how many are used) 2. name (what relationship the objects have) • • • • * 1 2..4 3..*  0, 1, or more  1 exactly  between 2 and 4, inclusive  3 or more 3. navigability (direction) 14 7 Multiplicity of associations  one-to-one  one-to-many   each student must carry exactly one ID card one rectangle list can contain many rectangles 15 Car Association types 1 1  aggregation: "is part of" Engine  symbolized by a clear white diamond  composition: "is entirely made of" composition  stronger version of aggregation  the parts live and die with the whole  symbolized by a black diamond Book 1 * Page  dependency: "uses temporarily"  symbolized by dotted line  often is an implementation detail, not an intrinsic part of that object's state 16 aggregation dependency Lottery Ticket Random 8 Class diagram example 1 17 Class diagram example 2 Multiplicity Class Customer 1 Simple Aggregation Rental Invoice Abstract Class Rental Item 1 0..1 Composition Generalization DVD Movie 1..* VHS Movie Video Game Simple Association Checkout Screen 18 9 Class diagram example 3 Class + main (args : String[]) Address 1 100 Student - firstName : String - lastName : String - homeAddress : Address - schoolAddress : Address + toString() : String - streetAddress : String - city : String - state : String - zipCode : long + toString() : String 19 CLASS DIAGRAM IN ECLIPSE INSTALL JDK 8 BEFORE YOU START http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Chapter 2 Software Processes 20 10 Install Papyrus Chapter 1 Introduction 21 (1) File => New => Others (2) Choose Papyrus Project Chapter 1 Introduction 22 11 23 Click Class Diagram Chapter 1 Introduction 24 12 Palette 25 Define a class name here 26 13 Chapter 1 Introduction Add elements 27 To add elements Chapter 1 Introduction 28 14 Your UML Attribute Operation Chapter 1 Introduction 29 Chapter 1 Introduction 30 Project 1 15 Submission (two screenshots and your uml file – generated by papyrus) Submission button 31 16
Project 1 - Class Diagram Software Engineering CSIT at UDC 1 SPECIFICATION 1 2 1 3 All Vehicles have some common attributes (speed and color) and common members (turnLeft, turnRight with a parameter). 4 2 Bicycle and MotorVehicle are both kinds of Vehicle and are therefore shown to inherit from Vehicle 5 MotorVehicles is the base class of both MotorBike and Car, therefore these classes not only inherit the speed and color properties from Vehicle, but also the additional attributes and members from MotorVehicle 6 3 SPECIFICATION 2 7 Each Course maintains a list of the students on that course and the lecturer who has been assigned to teach that course 8 4 9 The Person class will have a getName and getEmailAddress methods. Both Lecturer and Student are shown to be types of Person. 10 5
Project 2 Software Engineering CSIT at UDC Data Type  Types provide context for operations  a+b  what kind of addition?  pointer p = new object  how much space?  Limit valid set of operations  int a = “string”  know error before run time 2 1 Example  Also known as ‘structs’ and ‘types’.  C struct resident { char initials[2]; int ss_number; bool married; };  fields – the components of a record, usually referred to using dot notation. 3 Project 2 (Design Class Diagram)  Due: Sep. 30, 2016  Enhance the class diagram of specification 2 that you designed in Project 1  An “Assessment” data type is declared in the course class  Course_assessment is defined as an attribute (20%)  Midterm and Final exams are defined in the Assessment data type. (20%)  Students can take maximum 10 courses (20%)  An ID attribute is defined in People and used for Student and Lecturer (20%)  An “Enroll” operation is defined in Student with the Course class parameter. (20%) 4 2 5 6 3 7 8 4 Assessment data type 9 10 5 Note that this is NOT Project 2 GENERATING A CODE 11 12 6 13 14 7 Chapter 1 Introduction 15 8
Solution of Project 2 Software Engineering CSIT at UDC 1 Project 2 Chapter 8 Software testing 2 Project 2 Chapter 8 Software testing 3
Project 3 - Sequence Diagram Software Engineering CSIT at UDC 1 UML sequence diagrams  sequence diagram: an "interaction diagram" that models a single scenario executing in the system  perhaps 2nd most used UML diagram (behind class diagram)  relation of UML diagrams to other exercises:  CRC cards -> class diagram  use cases -> sequence diagrams 2 1 Key parts of a sequence diag.  participant: an object or entity that acts in the sequence diagram  sequence diagram starts with an unattached "found message" arrow  message: communication between participant objects  the axes in a sequence diagram:  horizontal: which object/participant is acting  vertical: time (down -> forward in time) 3 Sequence dg. from use case 4 2 Representing objects  Squares with object type, optionally preceded by object name and colon  write object's name if it clarifies the diagram  object's "life line" represented by dashed vert. line 5 Messages between objects message (method call) indicated by horizontal arrow to other object  write message name and arguments above arrow 6 3 Messages, continued message (method call) indicated by horizontal arrow to other object  dashed arrow back indicates return  different arrowheads for normal / concurrent (asynchronous) methods 7 Lifetime of objects  creation: arrow with 'new' written above it  notice that an object created after the start of the scenario appears lower than the others  deletion: an X at bottom of object's lifeline  Java doesn't explicitly delete objects; they fall out of scope and are garbage-collected 8 4 Indicating method calls  activation: thick box over object's life line; drawn when object's method is on the stack  either that object is running its code, or it is on the stack waiting for another object's method to finish  nest to indicate recursion Activation Nesting 9 Indicating selection and loops  frame: box around part of a sequence diagram to indicate selection or loop  if -> (opt) [condition]  if/else -> (alt) [condition], separated by horizontal dashed line  loop -> (loop) [condition or items to loop over] 10 5 linking sequence diagrams  if one sequence diagram is too large or refers to another diagram, indicate it with either:  an unfinished arrow and comment  a "ref" frame that names the other diagram  when would this occur in our system? 11 Example sequence diagram 12 6 Forms of system control  What can you say about the control flow of each of the following systems?  Is it centralized?  Is it distributed? 13 Specification of Project 3 14 7 CLASS DIAGRAM 15 You have to add class diagrams here. UI Appointment Calendar Project 1 16 8 SEQUENCE DIAGRAM 17 Procedure to create a sequence diagram on your class diagram 2. Go to Model Explorer Chapter 8 Software testing 1. Open Your Class Diagram 18 9 3. Click mouse right button and select sequence diagram Chapter 8 Software testing 19 4. Put project’s name Chapter 8 Software testing 20 10 Node Edge Chapter 8 Software testing 21 Window for a sequence diagram Your class diagram Chapter 8 Software testing 22 11 Drag and Drop 23 Make sure you have to create operations in the UI class. This is your class diagram 24 12 Chapter 8 Software testing 25 26 13 How to execute operations? Life Time of an operation Chapter 8 Software testing 27 Return a value if you made an appointment Chapter 8 Software testing 28 14 WRONG CLASS & SEQUENCE DIAGRAMS 29 Wrong Diagram 30 15 Wrong Diagram 31 Wrong Diagram 32 16 Wrong Diagram 33 Wrong Diagram Chapter 8 Software testing 34 17 Wrong Diagram Chapter 8 Software testing 35 Chapter 8 Software testing 36 Wrong Diagram 18

Tutor Answer

(Top Tutor) Studypool Tutor
School: New York University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors