DOC PREVIEW
CORNELL CS 501 - Lecture Notes

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 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 43 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 43 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 43 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 43 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 43 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 43 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 43 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 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 501: Software EngineeringAdministrationActor and Use Case DiagramUse Cases and ActorsUse Cases for Borrowing BooksRelationships Between Use Cases: <<uses>>Relationships Between Use Cases: <<extends>>Use Cases in the Development CycleModeling Dynamic Aspects of SystemsNotation: StatesState DiagramA Quiz QuestionPowerPoint PresentationA Quiz Question: TransitionsA Quiz Question: State Transition TableSlide 16Notation for Classes and ObjectsNotation: Active ClassNotation: InteractionActions on ObjectsBouncing Ball DiagramsSequence Diagram: Borrow Copy of a BookSequence Diagram: Change in Cornell ProgramSequence Diagram: Painting MechanismOther Diagrams in UMLActivity Diagram: Process ModelingActivity Diagram: Parallel ActivitiesImplementation ModelingNotation: CollaborationNotation: Component & NodeComponent DiagramComponents and ClassesSlide 33Slide 34InterfacesApplication Programming Interface (API)Components and ReplaceabilityAn Exam Question: Object Oriented DesignExam Question: Noun IdentificationExam Question: Candidate ClassesExam Question: Observations about the Candidate ClassesExam Question: Attributes and OperationsExam Question: Class Diagram1CS 501 Spring 2003CS 501: Software EngineeringLecture 18Object Oriented Design II2CS 501 Spring 2003AdministrationNew syllabusQuiz 4 on Thursday, April 3 (no lecture)Lecture 23 on Wednesday April 16 (evening)Second presentation and report next weekSign up. Assignment will be posted shortlyQuiz 3Collect after classNo office hours next week3CS 501 Spring 2003Actor and Use Case Diagram• An actor is a user of a system in a particular role. An actor can be human or an external system.• A use case is a a task that an actor needs to perform with the help of the system.Borrow bookBookBorrower4CS 501 Spring 2003Use Cases and Actors• A scenario is an instance of a use case • Actor is role, not an individual(e.g., librarian can have many roles)• Actor must be a "beneficiary" of the use case(e.g., not librarian who processes book when borrowed)In UML, the system boundary is the set of use cases.5CS 501 Spring 2003Use Cases for Borrowing BooksBorrow copy of bookBookBorrowerReturn copy of bookReserve bookExtend loan6CS 501 Spring 2003Relationships Between Use Cases: <<uses>>BookBorrowerCheck for reservationExtend loan<<uses>><<uses>>Borrow copy of book7CS 501 Spring 2003Relationships Between Use Cases: <<extends>>Borrow copy of bookBookBorrowerRefuse loan<<extends>>8CS 501 Spring 2003Use Cases in the Development Cycle• Use cases are a tool in requirements analysis• Intuitive -- easy to discuss with clients• Use cases are often hard to translate into class models• Scenarios are useful to validate design9CS 501 Spring 2003Modeling Dynamic Aspects of SystemsInteraction diagrams: set of objects and their relationships including messages that may be dispatched among them• Sequence diagrams: time ordering of messages• Collaboration diagrams: structural organization of objects that send and receive messagesActivity diagram: flow chart showing flow of control from activity to activityStatechart diagram: models a state machine10CS 501 Spring 2003Notation: StatesWaitingA state machine is a behavior that specifies the sequence of states an object or an interaction goes through during its lifetime in response to events.11CS 501 Spring 2003State DiagramState diagram for class Booknot borrowablereturned()returned()borrowableborrowed()[not last copy]borrowed()[last copy]guard expression12CS 501 Spring 2003A Quiz QuestionA machine tool is controlled by a switch and two buttons: power Turn the power on/off (switch)start Start the machine (button)stop Stop the machine (button)There is also a blade guard. To change the blade, the power must be off and the blade guard removed.To run the machine, press the start button. The power must be turned on and the blade guard must be in place. The machine runs until the stop button is pressed. While the machine is running, the blade guard is locked in place.13CS 501 Spring 2003Power offGuard offrunA Quiz Question: StatesPower offGuard onPower onGuard onPower onGuard offreadysafechangedanger14CS 501 Spring 2003A Quiz Question: TransitionsTransitionspower onpower offstart stopguard onguard off15CS 501 Spring 2003A Quiz Question: State Transition Tablepoweronpoweroffstart stopguard onguard offsafechangedangerreadyrunrun dangersafereadychangedangerchangesafereadysafereadynot specified16CS 501 Spring 2003runA Quiz Question: State Transition Diagramreadysafechangedangerstartstoppower offguard offguard offguard onguard onpower offpower onpower on17CS 501 Spring 2003Notation for Classes and ObjectsClassesObjectsAnyClassattribute1attribute2operation1()operation2()AnyClassoranObject:AnyClass:AnyClassanObjectThe names of objects are underlined.oror18CS 501 Spring 2003Notation: Active ClassEventManagereventlistsuspend()flush()An active class is a class whose objects own one or more processes or threads and therefore can initiate control activity.19CS 501 Spring 2003Notation: InteractiondisplayAn interaction is a behavior that comprises a set of messages exchanged among a set of objects within a particular context to accomplish a specific purpose.20CS 501 Spring 2003Actions on ObjectscallreturnsendcreatedestroyreturnCopy(c)okToBorrow() localstatusnotifyReturn(b) asynchronous signal<<create>><<destroy>>stereotypes21CS 501 Spring 2003Bouncing Ball DiagramsExample: execution of http://www.cs.cornell.edu/Client Serversdomain name serviceTCP connectionHTTP get22CS 501 Spring 2003Sequence Diagram: Borrow Copy of a Book BookBorrowerlibMem: LibraryMembertheCopy:CopytheBook:Bookborrow(theCopy)okToBorrowborrowborrow23CS 501 Spring 2003Sequence Diagram: Change in Cornell ProgramCornellian:MEngStudent1 : getName()sequence numbers added to messages:PhDStudent1.1 : name2: new PhDStudent(name)3: <<destroy>>24CS 501 Spring 2003Sequence Diagram: Painting Mechanism:Thread :Toolkit :ComponentPeer target:HelloWorldrunrun callbackLoophandleExposepaint25CS 501 Spring 2003Other Diagrams in UML• Activity diagram is a statechart diagram that shows the flow from activity to activity within a system.• Component diagram shows the organization and dependencies among a set of components.• Deployment diagram shows the configuration of processing nodes and the components that live on them.26CS 501 Spring 2003Activity


View Full Document

CORNELL CS 501 - Lecture Notes

Documents in this Course
Quiz 2

Quiz 2

2 pages

Usability

Usability

31 pages

Quiz 1

Quiz 1

2 pages

Stulba;''

Stulba;''

33 pages

Load more
Download Lecture Notes
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 Lecture Notes 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 Lecture Notes 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?