1 ooa2 Object-Oriented Software A model of the real world.
-
Upload
brice-malone -
Category
Documents
-
view
215 -
download
0
Transcript of 1 ooa2 Object-Oriented Software A model of the real world.
![Page 1: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/1.jpg)
1ooa2
Object-Oriented Software
A model of the real world
![Page 2: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/2.jpg)
2ooa2
Object-oriented
Objects encapsulate data and functions.
The world is modeled by the objects– each significant object in the world
has an object in the software
![Page 3: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/3.jpg)
3ooa2
Object/Class Model
object name
type dataname
ret-type fname(param)
![Page 4: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/4.jpg)
4ooa2
Why is OO useful?
Easier to understand Encourages re-use Easier to maintain Why? - because the objects in the software
relate to objects in the real world and are thus easier to understand, have cleaner interfaces, are more stable and are more likely to be needed again
![Page 5: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/5.jpg)
5ooa2
OO Requirements Analysis
Identify the entities/objects in the real world that need to be modeled in the software.
Many approaches– classic - draw object model– Ivar Jacobson - use case first
I suggest starting with the Noun-in-Text approach
![Page 6: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/6.jpg)
6ooa2
Identifying Entities
Starting with a textual description (e.g. an SOW) – list nouns
using domain knowledge– add other entities
abstract activities– levels of abstraction
![Page 7: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/7.jpg)
7ooa2
Active Task 1
Tom is starting a dental practice in a small town. He will have a dental assistant, a dental hygienist and a receptionist. He wants a system to manage the appointments. When a patient calls for an appointment, the receptionist will check the calendar and will try to schedule the patient as early as possible to fill in vacancies. if the patient is happy with the proposed appointment, the receptionist will enter the appointment with patient name and purpose of appointment.
L2S7 - TTYP – hardcopy with your names – no grade
![Page 8: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/8.jpg)
8ooa2
Active Task 2 – library – 8 min
Work with one other person and develop the list of objects and the object model (attributes, functions, multiplicities) for the following task. Put your names on the sheet and turn in.
The library has copies of books and patrons. Patrons can have up to 3 books borrowed at a time. Each book loan has a due date. Patrons can renew borrowed books once.
![Page 9: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/9.jpg)
9ooa2
Use Case Diagram
Draw important actors Add each action
![Page 10: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/10.jpg)
10ooa2
Scenarios
A description of a sequence of actions
![Page 11: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/11.jpg)
11ooa2
Draw Interaction Diagrams
Vertical lines for the classes Use scenario to put in function calls
![Page 12: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/12.jpg)
12ooa2
Existence Dependency
A class (parent) can be associated with a lower class (child) if– the lower (child) class only exists
when the upper (parent) class exists– each instance of the lower (child)
class is associated with exactly one instance of the upper (parent) class
![Page 13: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/13.jpg)
13ooa2
Measurement is important
Improvement requires knowledge
![Page 14: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/14.jpg)
14ooa2
Time Log - measuring what you do
Fields– start (clock time - min)– stop (clock time - min)– interruptions (min)– categories (reading, studying, etc)– units (e.g. pages of text)
See page in SOS
![Page 15: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/15.jpg)
15ooa2
Example time log
start stop int delta category units
8/21 16:40 17:30 5 45 reading 10 pages
8/21 21:05 21:30 25 studying
8/22 09:10 10:05 14 41 reading 20 pages
![Page 16: 1 ooa2 Object-Oriented Software A model of the real world.](https://reader036.fdocuments.net/reader036/viewer/2022082711/56649ec45503460f94bcf0cc/html5/thumbnails/16.jpg)
16ooa2
TL1 (time log) assignment
Start today Turn in Thursday, Sep 5 at start of class Name and lab time must be on page Include date, hours,min start and stop,
delta,interruptions, categories, units Determine your average pages/minute Pressman pp1-52, and any other course
related reading