AGENDA Introduction Course Content Course Objectives Course Evaluation
AGENDA • • Introduction Course Content Course Objectives Course Evaluation Course Policies. Tentative Calendar Lecture setup Concepts of Object Oriented Language. (Java)
Introduction • Introduction – Name – E-Mail Address – Programming Experience – Time Schedule – Classes in Block 1 & 2 – Your expectations from this course & any comments
Course Content Text Book(s) The Unified Software Development Process Ivar Jacobson, Randy Booch & James Rumbaugh Visual Modeling with Rational Rose 2000 and UML Terry Quatrani
Course Content Chapters Chapter 1 to Chapter 11 Mid Term Test – Chapters 1 to 8 Final Test – Chapters 5 to 11 (Take Home ? ? ? ) Chapters 1 – Chapter 12 PROJECT
Course Objectives • Object Oriented concepts • Data Abstraction • Inheritance • Polymorphism • The Unified Software Development Process • Core Work Flows • Working with Rational Rose
Course Evaluation • Quiz (10%) 08 -13 -2001 on OOPS. 08 -23 -2001 on UML. (Chap 1 to 5) • Mid Term Test (25%). 09 -01 -2001(? ) Chapters 1 to 8. • Final Test (25%) Submit By (10/01/2001) Chapters 5 to 11 • Project (40%) Documentation (20%) Implementation in Rational Rose (10%) Presentation (10%) (09 -27 -2001)
Course Policies • • Honor Code Attendance Assignments Class – Interactive/Responsive. – Make sure that you know every thing that is said in the class before you leave. – Feel free to ask when in doubt.
Calendar (Tentative)
Calendar (Tentative)
Lecture Setup • Slide will contain the chapters and subsections which is being presented if available. • Slides will be made available once the class is over. • Slides may be downloaded from the following URL. http: //www. shishir. net/catawba/is 3502
Lecture Setup • Feel free to ask questions • Student’s participation is desired during the course of lecture and while solving problems. • Attendance is mandatory. Extra credits may be given during the final grading. • Lecture time (6: 00 - 6: 50, 7: 00 – 7: 50) (8: 00 - 8: 50, 9: 00 – 9: 50)
Importance of this Course RDBMS UNIX V-BASIC JAVA SOFTWARE ENGINEERING HTTP TCPIP CORBA HTML
Desired Knowledge DESIGN PATTERNS OO SYSTEM SOFTWARE ENGINEERING PROGRAMMING LANGUAGES RELATIONAL DATABASE SYSTEM
OBJECT-ORIENTED CONCEPTS Ø Understanding the course Ø Quiz
Why Objected Oriented? • Cost of fixing a problem during different phase of software construction. • Approach to the problem. – Instead of molding the problem into something familiar to the computer, adapt the computer to the problem. • Ease of REUSE of existing code. • Cohesion and Coupling.
Cohesion: a design unit has high cohesion if all its elements are strongly related • • • coincidental: multiple, completely unrelated actions logical: series of related actions selected by parameter temporal: series of actions related in time procedural: series of actions sharing sequence of steps communicational: procedural cohesion but on the same data • informational: series of independent actions on the same data • functional: exactly one action
Coupling: a decomposition has low coupling if the design units are not strongly dependent on each other • content: one directly references content of another • common: both have access to same global data • control: one passes an element of control to another • stamp: one passes a data structure to another, which only uses part • data: one passes only homogeneous data items
Objected Oriented Paradigm • “A large-scale and generalized model that provides a viewpoint from which the real world may be investigated” • “New way of Conceptualizing Software Development and as such stands in contrast to the alternative programming paradigm which are predominantly procedural, logical and functional. ”
AGENDA (2 nd Lecture) • Objected Oriented Concepts. – Abstraction, Inheritance, Polymorphism • Object Relationships – Aggregation, Composition, Multiplicity, Dependency, Association, Generalization. • Chapter 1 – The Unified Process.
Objected Oriented Paradigm • Synergistic embodiment of essentially 3 concepts – ENCAPSULATION & INFORMATION HIDING – CLASSIFICATION & ABSTRACT DATA TYPES – POLYMORPHISM THROUGH INHERITANCE.
Encapsulation & Information Hiding • All related to the notation of a closely bound piece of code related to an identifiable thing. • Code and data is encapsulated together into an object. • Not all data is visible outside the object. The state of the object only changes through well defined interfaces.
Data Abstraction • Abstract Data Type (ADT) : Allows user to define his/her own data type and use them as they were a basic language type. This user defined type can be anything e. g. TABLE, CHAIRS etc. • Programmers define their own type and provide a full set of operation with each type. • Thinking in terms of types one wants, an object is just not data & functionality bundled together in any fashion, but it is tightly related to the idea of ADT: a user defined type.
Classification • Build on the notion of abstraction. • Classification is the idea of grouping software ideas into classes of things. • When we say “dog”, we mean dogs in general, a collection of all dogs we have met. • The use of single model throughout the life cycle of the software means that you can use the same words as you are handling the same basic idea throughout.
Inheritance • Defines the relationship between the base type and the derived type. • It is a conceptual relationship between 2 types which reflect the same relationship in the problem space. e. g. If the base class can receive a message, any message one sends to the object derived from the base class should generate an appropriate response.
Polymorphism • Deriving a class from the base class means that a new type is being created. Any message that can be sent to the base class can also be sent to the derived class. The proper response to the message or behavior of a derived class object when treated as a base class object is referred to as polymorphism.
Encapsulation, Abstract Data Type & Information Hiding
Inheritance Example
Polymorphism Example
More Examples - 1 SHAPE Draw() UPCASTING Erase() DOWNCASTING CIRCLE SQUARE TRIANGLE Draw() Erase()
More Examples - 2 USEFUL MOREUSEFUL class Useful { class More. Useful extends Useful{ public void f() { System. out. print(F); } public void g() { System. out. print(G); } } public void u() { System. out. print(U); } public void v() { System. out. print(V); } public void w() { System. out. print(W); } }
More Examples - 3 public class RTTI () { public static void main (String[] args) { Useful[] x = { new Useful(), new More. Useful()}; x[0]. f(); x[1]. g(); x[1]. u(); ((More. Useful)x[1]). u(); //Downcasting RTTI ((More. Useful)x[0]). u(); } }
Relationship among Objects • Reusing the implementation – Inheritance – Aggregation – Composition • • Multiplicity Association Stereotyping Dependency
Inheritance • Is-a Relationship – Derived class is exactly same as the base class. • Is-like-a Relationship – Derived class has the interface of the old type and it also contains more functions. BASE DERIVED
Aggregation • Composing a class from existing classes. • Whole-Part (Has-a) Relationship without specific consequence for navigation between the classes involved and their mutual existence. CAR WHEEL • If the Whole is destroyed the part can still live on • A part can belong to several Whole.
Composition • • Part-Whole relationship. The Whole is the owner of the parts. Part cannot live without the whole. Whole is responsible for creation and destruction of the part(s). • They live together and die together with the whole instance. HOSPITAL CLINICS
Multiplicity & Association EMPLOYEE 1. . * Works Under 0. . 1 Manages MANAGER • 1 or more Employees work under 0 or more manager. • 0 or 1 managers manage 1 or more employees. Y 2. . 3 A 2. . 5 Z • An instance of ‘Y’ is associate by ‘A’ to 2. . 5 ‘Z’s and ‘Y’ knows it. • An instance of ‘Z’ associated by ‘A’ to 2. . 3 ‘Y’ but ‘Z’ doesn’t know it.
Stereotype • Defines a new syntactic Component. <<NAME>> ATM <<ACTOR>>
Dependency OPEN Act. CLOSE Act GEN STMT Manager DEPOSIT WITHDRAW Customer
Example 1. . * UNIVERSITY STUDENT DEPARTMENT COURSE 1 * LECTURER
- Slides: 40