









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Lecture 15 Object-Oriented Languages and Systems 1
[Skrien §1.1] What do we mean by program design?
Why do we worry about design when writing a program? Why isn’t it enough that the program works?
Outline for Lecture 15
I. UML method in overview
II. Example: Peer grader system
Requirements analysis Domain analysis Use-cases
Suppose the code is never intended to be read by anyone else, or used again?
Let’s name some reasons that design matters.
[Skrien §1.2] Good software should be …
The first of these deal with correctness.
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 2
The last deal with maintainability.
An object-oriented methodology is defined as the system of principles and procedures applied to object-oriented software development.
Just over ten years ago, there was no standard OOD methodology. Then, the proponents of three of the major methodologies—Grady Booch, James Rumbaugh, and Ivar Jacobson—joined forces to produce the Unified Modeling Language (UML).
The UML method in overview^1
The UML method is an iterative approach.
In the past, many software-development methods “insisted” on a rigid series of steps: analysis first, then design.
The UML method allows for the reality that the development of a system is an iterative process.
The design should allow for change and discovery as the development process continues.
The three steps of OOA/OOD:
(^1) This discussion is adapted from Using the Booch Method: A Rational Approach , by Iseult White, © 1994, Rational.
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 4
Requirements analysis
During requirements analysis , the analyst works with—
to enumerate the use cases that are key to the system’s operation.
Objective: Requirements analysis essentially forms a contract between the customer and the developers on what they system is to provide.
Deliverables:
Domain analysis
During domain analysis , an o-o model of the real-world system is developed.
This gives the developers enough knowledge to create a system carrying out the required functions.
Objective: Domain analysis identifies all major objects in the domain, including data and major operations.
The development of the model concentrates on resolving —
Good domain analysis also adds appropriate levels of abstraction.
Lecture 15 Object-Oriented Languages and Systems 5
This allows structures to be built that will be reusable in many other domains.
Deliverables:
System design
During system design , an effective and efficient implementation is defined.
Objective: Select appropriate computers, devices, software services, software units, and data storage strategies.
Deliverables:
Next time, we will cover the fundamentals of object orientation, and the UML methodology.
Example: Peer review in Expertiza
We will look at the peer-review functionality of the Expertiza system.
Lecture 15 Object-Oriented Languages and Systems 7
What does that tell us about submissions, and the relationship between submissions and reviews?
Another way to understand what the system is supposed to do is to take a look at some of its outputs:
Login screen
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 8
Create an assignment
Select an assignment
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 10
Fill out a rubric
View feedback and scores
Lecture 15 Object-Oriented Languages and Systems 11
Domain analysis
Domain analysis seeks to identify key abstractions —the classes and objects that are common to applications within a given domain. . The first step is discovering key classes. Start by underlining the nouns.
As candidate abstractions are discovered, they are added to the data dictionary.
Some of the abstractions will turn out to be—
Choosing class names. A good class name should be—
.
The inability to name a class simply and clearly is a symptom of an ill-defined abstraction. It can be a warning sign of—
Lecture 15 Object-Oriented Languages and Systems 13
Events: What events are relevant to the system?
Use-cases
A “use-case” is a narrative that describes the sequence of events when an actor (external to the system) uses the system to complete a process.
They are “stories” of how the system is used.
Based upon the events we have just listed, we can develop use- cases.
Use case: Create assignment Actors: Instructor Description: An instructor creates an assignment, specifying due dates, rubrics, penalties, etc.
Let us try one or two more use-cases. Use case: Actors: Description:
Use case: Actors:
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 14
Description:
To gain a deeper understanding of the processes and requirements for a system, an expanded use-case can be developed.
They are often done in a “conversational” style between the actors and the system.
Let us consider the use-case of reviewing a submission.
Use case: Review a submission Actors: Student Description: Student selects a submission to review, types in a review, and optionally a grade, then submits the review.
Typical course of events : Actor action System response
A student logs into the system. 2. The system presents a screen listing assignments to submit or review.
Student enters a review of the problem and, optionally, a grade, and submits it 6. The system updates its database of reviews and displays the new review to the student.
The use-cases in a system can be illustrated in a use-case diagram:
CSC/ECE 517 Lecture Notes © 2007 Edward F. Gehringer 16
The next step is to flesh out the analysis by deciding on the data attributes and operations that each class will have.
What attributes does course need to have?
What attributes does assignment need?
What attributes does student need?
How about submission?
When we proceed to design, we will also decide on methods for each.
Lecture 15 Object-Oriented Languages and Systems 17
Exercise: Requirements for the flight-reservation system
The mission is to allow round-trip airline tickets to be bought over the Web.
Each customer specifies an origination point, a destination, and dates for outbound and return flights.
The customer reserves one outbound flight and one return flight from a menu presented by the system.
Each choice that the system presents consists of one or more flight segments (there may be a change of planes).
The customer may buy tickets for one or more passengers.
No more tickets can be sold for a flight than there are seats on the plane.
Each passenger is assigned to a specific seat.
The system calculates the total cost of the tickets by adding the cost of the individual segments.
If dissatisfied with the cost, the customer may select alternate flights.
After a customer has bought a ticket, (s)he will be e-mailed a confirmation.