Download presentation
Presentation is loading. Please wait.
Published byAsher Harrison Modified over 9 years ago
1
MIS541AUniversity of Arizona Lecture 13 Object-Oriented Analysis -II
2
MIS541AUniversity of Arizona Topics Key ideas behind OO……… Use–cases..
3
MIS541AUniversity of Arizona Key ideas behind the Object Model.. Abstraction….. Encapsulation Modularity Hierarchy Typing Concurrency Persistence ALL OO MODELS MUST REFLECT THESE CHARACTERISTICS…
4
MIS541AUniversity of Arizona Focus on essential properties of the “real world” for the system…..Dependent on observer..Pick and choose..Objects capture those properties..Entity abstractions..Actions…etc….. ABSTRACTION
5
MIS541AUniversity of Arizona How an object is implemented is irrelevant..Users of the object only need to know what it does..and how it can be used..(not its internals..)..Reuse…….. ENCAPSULATION……..
6
MIS541AUniversity of Arizona Encapsulation/Hiding The object encapsulates both data and the logical procedures required to manipulate the data Achieves “information hiding” method # 1 data method # 2 method # 4 method # 5 method # 6 Access internals only via Methods…….. Controlled access
7
MIS541AUniversity of Arizona A collection of objects with some common theme or purpose…Easy for maintenance and use..Partitions into physical groups… MODULARITY
8
MIS541AUniversity of Arizona Helps in ordering and managing abstractions……. Single & Multiple inheritance.. Is-a versus part- of.. HIERARCHY……..
9
MIS541AUniversity of Arizona Type enforces physical rules…..of combining objects..substitution etc.. TYPING
10
MIS541AUniversity of Arizona Multiple processes running at the same time..I.e. multiple objects are active at the same time..things happen in parallel……(unless they need to access a common resource!) CONCURRENCY
11
MIS541AUniversity of Arizona Objects live through time……..and space… PERSISTENCE
12
MIS541AUniversity of Arizona OO Analysis The process of defining the classes and interactions…… Usually done using what is called UML – The Unified Modeling Language… provides a series of diagrams… OO Analysis can be quite complex – tends to combine both programmers/domain analyst perspective… We will focus on data modeling, process modeling and state modeling……..
13
MIS541AUniversity of Arizona Advantages & Disadvantages of OOP " Facilitates reuse " Allows for building complex systems " Perfomance issues - speed, memory " Managing large number of objects " May get very difficult to understand and debug " Notion of components - Encapsulated abstractions " Pluggability - a possibility - more work required
14
MIS541AUniversity of Arizona OO Languages & References Smalltalk, Eiffel, Python, C++, Java www.bruceeckel.comwww.bruceeckel.com – Thinking in Java Introduction to OOP – Timothy Budd – www.cs.orst.edu/~cs582/slides www.cs.orst.edu/~cs582/slides Many books on OO and OO SW development Java Development Environment/UML – www.togethersoft.com www.togethersoft.com www.argouml.org www.objecteering.com Forte – www.forte.com, Jbuilder – available at the Univ.www.forte.com
15
MIS541AUniversity of Arizona Learning OO – Some guidelines for 541A. Firstly, there are numerous aspects of OO, UML and variations on the same…I do not expect you to master the notation..You can always look up a book and see the notation..Focus on the underlying modeling idea…what is being said about the problem.. Develop skill to interpret somebody’s else diagrams..and also communicate your own notions.. Lectures are an overview of key ideas… Programming knowledge is not a reqmt..so I will stay away from those concepts…You can always take an OO programming course..
16
MIS541AUniversity of Arizona OOA- A Generic View define use cases (Requirements) extract candidate classes (Data modeling) establish basic class relationships define a class hierarchy (Data modeling) identify attributes for each class (Data modeling) specify methods that service the attributes (Process modeling) indicate how classes/objects are related (Process modeling) build a behavioral model – State diagrams (Behavioral modeling) Illustrate workflows with Activity Diagrams Iterate
17
MIS541AUniversity of Arizona Togethersoft – An Intro! Doing OO by hand can be cumbersome……….Good tools out there… Rational Rose/Togethersoft ArgoUML – not as sophisticated yet…….
18
MIS541AUniversity of Arizona UML Overview – Refer to the Textbook Language for " Visualizing systems " Specifying systems " Constructing systems " Documenting systems Features " Explicit model to facilitate communication " Graphical in nature " Well-define semantics - unambiguous " Supports both forward and reverse engineering - round trip engineering
19
MIS541AUniversity of Arizona Views in UML " Design view " Process view " Implementation view " Deployment view " Use case view Use case view Design view Process view Implementation view Deployment view Vocabulary Functionality System assembly Config. Mgmt Performance Scalability Throughput Topology Delivery Installaton Behavior Analysis Unified view for all stages of the software development lifecycle..
20
MIS541AUniversity of Arizona Unified Modeling Language (UML) User model view. This view represents the system (product) from the user’s (called “actors” in UML) perspective. Structural model view. Data and functionality is viewed from inside the system. That is, static structure (classes, objects, and relationships) is modeled. Behavioral model view. This part of the analysis model represents the dynamic or behavioral aspects of the system. Implementation model view. The structural and behavioral aspects of the system are represented as they are to be built. Environment model view. The structural and behavioral aspects of the environment in which the system is to be implemented are represented.
21
MIS541AUniversity of Arizona UML Overview (Contd) Building blocks Things Relationships Diagrams Structural Things Classes Interfaces Collaborations Use cases Active classes Component Node Behavioral Things Interactions (messages) (action sequences) (links) States & state machines Grouping Things Packages Frameworks Annotational Things Notes Adornments Dependency Association Generalization Realization Class diagrams Object diagrams Use case diagrams Sequence diagrams Collaboration diagram State charts Activity diagrams Component diagrams Deployment diagrams Italics denote implementational Design related..
22
MIS541AUniversity of Arizona HelloWorld Example Import java.awt.Graphics class Helloworld extends java.applet.Applet { public void paint (Graphics g) { g.drawString("Hello, World!",10,10); } Paint() HelloWorld g.drawstring ("Hello, World!",10,10)
23
MIS541AUniversity of Arizona Applet HelloWorld Paint() Graphics Object Component Container Panel Applet HelloWorld ImageObserver Inheritance Hierarchy Class Relationships
24
MIS541AUniversity of Arizona :Thread :Toolkit :ComponentPeer target:HelloWorld Paint HandleExpos e CallbackLoop Run Sequence diagram
25
MIS541AUniversity of Arizona HelloWorld Java Applet Awt Lang Packaging diagram Hello.html Hello.jpg HelloWorld.class hello.java Component diagram
26
MIS541AUniversity of Arizona Use Cases a scenario that describes a “thread of usage” for a system actors represent roles people or devices play as the system functions users can play a number of different roles for a given scenario
27
MIS541AUniversity of Arizona Banking System UseCase examples…………
28
MIS541AUniversity of Arizona Use cases " Describes a set of sequences in which each sequence represents the interaction of things outside the system (its actors) with system itself " Involves the interaction of actors with a coherent set of roles and the systems " Actors - human and non human - major beneficiaries " A use case can have many variants " A use case carries out some tangible amount of work
29
MIS541AUniversity of Arizona Developing a Use Case What are the main tasks or functions that are performed by the actor? What system information will the the actor acquire, produce or change? Will the actor have to inform the system about changes in the external environment? What information does the actor desire from the system? Does the actor wish to be informed about unexpected changes?
30
MIS541AUniversity of Arizona Use cases (Contd.) Use cases and scenarios (like class & instances) " Use cases - what a system should do - Flow of events - main flow and exceptions " Use cases implemented by a collaboration of classes - many objects participate to execute a use case
31
MIS541AUniversity of Arizona Use case organisation Use cases can be related via " Generalization " Inclusion " Extension Exhibit “relationships” similar to classes in general…..
32
MIS541AUniversity of Arizona Requirements & Use cases " Establish the context of the system by identifying actors that surround it " For each actor, consider the behavior that each expects or requires of the system " Name these common behaviors as use cases " Factor common behavior into new use cases, factor variants, organise use cases " Model these use cases in Use-case diagrams " Adorn with notes as necessary
33
MIS541AUniversity of Arizona UML: Use-Case Diagram
34
MIS541AUniversity of Arizona Use case diagrams A use case diagrams shows all the usecases and actors and their relationships > Place phone call Receive phone call Use scheduler Place conf. Call Receive additional call Cellular Network User
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.