DOC PREVIEW
UIC IDS 505 - Unified Modeling Language UML

This preview shows page 1-2-3-26-27-28 out of 28 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Unified Modeling Language (UML)Benefits of O-O modelingPowerPoint PresentationSlide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Object Behavior Analysis: some guidelinesGuidelines [contd]Evaluating Object-behavior designEvaluating Object-behavior design [contd.]Slide 25USE CASE MODELLINGSlide 27Slide 28Unified Modeling Language (UML)“ a language for specifying, visualizing, and constructing the artifacts of software systems, as well as for business modeling”•unification of Booch, Jackobson and Rumbaugh modeling approaches •graphical depiction of O-O analysis and design models–Use cases: functional reqts. (what)–Class diagrams: static structure of objects, their data and operations–State diagrams: dynamic models of objects change their state in response to events–Sequence diagrams: dynamic models of interaction between objectsBenefits of O-O modeling•Increased consistency among models developed for analysis, design and programming•Improved communication among users, analysts, designers, programmers•Explicit representation of commonality among system components•Reusability of analysis, design and programming results•Robustness of systems•Ability to tackle more challenging problem domainsFurnitureCostWeightColorLocationbuy()sell()weigh()move(to) ChairCostWeightColorLocationCapacityArm restbuy()sell()weigh()move(to)remove-arm-rest()Inherits all attributes & behaviorsObject Oriented Concepts:Table u() e, fDesk s(), w() i,jChair s(), x() e,gFurniture s(), t() a,b,cChableU() e,fCH1: Chable s(),t(), x(),u(),z() a,b,ce,f,gkAn object Instance of CHABLEInstances of TABLEAnatomy of a Class :Operations methodsAttributesEncapsulation:All information is packaged under one name, and can be re-used as one specification or program componentInformation Hiding:Attributes of a class can be accessed only through the class operations /methods/services (external interface for a class)•reduced impact of side effects of changes•more cohesive methods•class is de-coupled from other parts of systemStudentnamedateOfBirthyearaddressphonecalc_age()calc_gpa()register(course) CoursecodedepttitlecreditHoursenrollment()prereqs() :Coursecode=IDS405dept=IDStitle=blah_blahcreditHours=3 J.Daniels:Studentname=Jack DanielsdateOfBirth=01/01/99year=seniorState of an object: values for attributes, and links to other objectsObject identityOperations(service provided by an object to its client)•Constructor: creates a new instance of an object-class•Query: does not change state of object, no side-effects. -no need to explicitly show operation like get_name() -target object is always an implicit argument•Update: alters the state of an objectCustomerOrder ProductProduct LinePlacesRequestsIncludes1** 1..*1..*1Class Diagram (ORD) : object-class associationsObject Diagram: instance diagram - graph of instances that is compatible with a given class diagram.StudentCoursetutorpupilTutors**beginDatenumHourstermgradeRegistrationCheckEligibility()acctNumpasswordserverSpaceAccountIssues* **0..1SoftwareStudentCourse LogbeginDateexpirydatehoursLoggedestimateUsage()tooluser forum***StudentNamessndateOfBirth/ageCourse OfferingtermsectionCourse/participantsregistrantsRegisters-for* *Scheduled-for* 1..***CodetitlecrdHours{age = currentDate - dateOfBirth}Derived attribute, associationStudent {abstract}NamessndateOfBirthCourse OfferingtermsectionCourseregistrantsRegisters-for* *Scheduled-for* 1..*CodetitlecrdHoursregister-for(class)calc_tuition()Grad-StudentugMajorgreScoretuition=300Calc_tuition()UG-StudentsatScoreactScoretuition=250Calc_tuition()• Abstract class• Concrete class• Abstract operation polymorphismenrollment()enrollment()UniversityAdmn.UnitSchoolDepartmentBuildingRoom11..* 1..*1*1 1120..*AggregationCompositionComposition: part belongs to only a single whole, and dies with the wholeObject Communication Through Message Passing:Message: request sent by an object for the services/assistance of a second object. Receiving object responds by choosing appropriate method, executing it and returning control to caller. E.g.: Customer wants to check status of an orderCustomerOrderO#ODateO-Status...AddOrder()ModifyOrder()DisplayStatus()...Message requestDisplay Statusof order#1267•Polymorphism–same operation may apply to two or more classes in different ways [e.g. enrollment()]•Overriding–replacing a method of a subclass by a more specific implementation for the subclass–Note: attributes can be augmented by subclassPOLYMORPHISM:Same named behavior may be completed differently for different object classesBank AccountPassbookAccountSaving InvstAccountSaving AccountCheckingAccountCustomerWithdraw()Withdraw()Withdraw()Withdraw()Withdraw()Bank Acct XX: Withdraw()Rental Order LineDue-DateRental CategoryRental TapeTapeNameRental Order RO#Object Behavior design•Assign methods to classes•Method Determine DueDate ----- Which Class ?Assigning Methods to Classes :–try to assign method to class that knows the required attributes–assign method to class that is logically expected t perform the methodRental CustomerAuthorized UserRental customer can exist without be associated with Authorized User, but not vice-versa.So, method AddAuthorizedUser() should be assigned to Rental Customer (the controlling class)Two classes: Account and Payment. A method reportStatus(..) returns values “overdue” or “paid”. Which class should contain this method?ExampleExampleExampleA method calcExtendedPrice(..) multiplies the quantity of a line item by the price of the line item. Quantity is an attribute of LINE-ITEM and price is an attribute PRODUCT. Should this method be assigned to LINE-ITEM or PRODUCT?ExampleMethod addAccount() creates a relationship between a Customer instance and an Account instance. Each customer can be related to zero or many Accounts objects, but each Account object must be related to exactly one Customer object.Which class should this method be assigned to?Object Behavior Analysis: some guidelines•Methods should be distributed fairly evenly among classes, so that you avoid having a few “control” objects and many “data” objects•When possible, assign method to class that knows the attributes needed to perform the method–when no single class knows all the attributes needed, assign method to the class that would be logically expected to perform the


View Full Document

UIC IDS 505 - Unified Modeling Language UML

Download Unified Modeling Language UML
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Unified Modeling Language UML and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Unified Modeling Language UML 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?