Object-Oriented Design & Methodology CS 312
Object-Oriented Design & Methodology CS 312
Object-Oriented Design & Methodology CS 312
Introduction: form
Currently: -Software projects costs are going up and hardware costs are going down -Software development time is getting longer and maintenance costs are getting higher -Software error getting more frequent while hardware errors becomes almost rare. - Software is developed using a rigid structured process that is inflexible.
3 8 7 15 67
Any corporation decisions based on the output of incorrect software can threaten the ability of a business to be financially strong tomorrow
Success
16.2%
Projects
Challenged 52.7%
Impaired
31.1%
Challenged projects deliver, but less than full functionality, over-budget, and late
For 1995, the cost of challenged and impaired projects was $1400 billion in USA
Many projects are started with the wrong goals and find themselves having to start over again from the beginning. Starting over does not support delivering at the original deliver date. Standish Group found that for every 100 Projects that start, there are 94 restarts.
Approximately 28% of projects exhibit cost overruns of 150% to 200% of their original cost estimate.
A customer wants a software that is: Maintainable Developed within budgeted resources ( time/ space / people ) Designed with appropriate longevity in mind
Classical
Development
Object-Oriented
Course Aim
To look at how a software system is developed using an object orientated approach
Analysis
Design
Implementation Installation
How can the models produced be translated into code? What is needed to support clients and users and ensure that they can use the new system effectively?
Functional Decomposition
Functions and data separated Data accessible by several processes Major problem - data not protected
Ideally modules should be selfcontained Have well defined purpose Be independent Major problem interdependency between modules
System functionality is more likely to change than the data Over time the functionality is more unstable than the data
Inception Elaboration Construction Transition These indicate the state of the system at each phase NOT the activities involved at that point in development
Inception the initial work required to set up and agree terms for the project.
Inception Elaboration deals with putting the basic architecture of the system in place
All main project risks are identified
Construction
Transition
Transition
Inception Elaboration Construction Transition process involved in transferring the system to the clients and users
Workflows
The activities implied by the stages in a traditional structured modelling approach are referred to as Workflows in the objectorientated approach Workflows Requirements Analysis Design Implementation Testing
Workflows - activities
PHASES
Inception
WORKFLOWS
Requirement s Analysis
Elaboration
Construction
Design
Transition
Implementation
Elaboration
Construction
Transition
The Object
Basic building block Objects in the real world translate into objects in the software system
Physical (customers, products) Conceptual (orders, reservations Organisation (companies, departments) Implementation (GUI Windows)
Modelling
To capture the whole of a system we need to view it from different aspects Each diagram provides some but not all of the information abstraction Each model is an abstraction of the complete system System is broken down into small workable chunks - decomposition
A notation or language for development Not a development method Set of diagrammatic techniques Industry standard for modelling OO systems UML Creators Ivar Jacobson, Grady Booch, James Rumbaugh
Model
Deployment Diagram
Diagrams
Visualizing
explicit model facilitates communication some structures transcend (pass or more) what can be represented in programming language each symbol has well-defined semantics behind it
Specifying
The UML addresses the specification of all important analysis, design, and implementation decisions.
Constructing
things (business processes, system functions) things (C++/Java classes, database schemas, reusable software components)
concrete
In UML, we have a state diagram for dynamic behavior. The state diagram shows: -State -Transition -Event -Condition -Action
Syntax
interface
Syntax
Description
Syntax
a relationship between two or more classifiers that involves connections among their instances. A special form of association that aggregation specifies a whole-part relationship between the aggregate (whole) and the component part. Composition generalization a taxonomic relationship between a more general and a more specific element. a relationship between two modeling dependency elements, in which a change to one modeling element (the independent element) will affect the other modeling element (the dependent element).
(open arrow)
Description
a relationship between a specification and its implementation.
Syntax
(closed arrow)
Realization relationship connects a model element such as a class, to another model element, such as an interface that supplies its behavioral specification but not its structure or implementation. The client must support ( by inheritance or by direct declaration) at least all the operations that the supplier has.
A static model that shows the classes and relationships among classes that remain constant in the system over time
HW1: due date one week from today: Model the following using a class diagram: Your company writes student and course data management software for universities. You are writing a data management package for a university with several campuses. Employees in the administration office of each campus has to enter several student and class input parameters; these will be stored in a central database in the main campus. CORBA has been chosen to send this data. There will be two kinds of data: per student data, and per course data. For each student, the administration employee will enter a social security number, a 3 line home address, and the current semesters grades (the student will have taken at least one class, and no more than 5 classes). If the student is also a university employee, the administration employee will enter the students salary. For each course, the administration employee will enter the instructors name, the time of day the course meets, the days of the week the course meets, the date and time of the final exam, and the number of hours of the course. The administration employee will also enter a student name and social security number for each student in the course. The central database software will provide values in return. For each student, the students new GPA (based on existing plus new classes) will be returned, along with total number of courses the student has taken at the university. For each course, the central database software will provide the total number of courses the instructor is teaching this semester. If the final exam time entered does not match that stored in the central database, then the final exam time variable will be corrected
Further reading
Bennett, S., McRobb, S. and Farmer, R. Object-Oriented Systems Analysis and Design Using UML, 2nd Ed, London: McGraw-Hill, 2002. Brown, D. Object-Oriented Analysis: objects in plain English, New York: John Wiley, 1997. Fowler, M. UML Distilled: a brief guide to the standard object modeling language, 2nd Ed, Reading Massachusetts: AddisonWesley, 2000. Jacobson, I. Object-Oriented Software Engineering: A Use Case Driven Approach, Wokingham, England: Addison-Wesley, 1992.
Larman, C. Applying UML and patterns: an introduction to objectoriented analysis and design, New Jersey: Prentice Hall, 1998.
Stevens, P., with Pooley, R. Using UML. Software Engineering with Objects and Components Updated edition, Harlow: AddisonWesley, 2000.