Classes and Objects: The Building Blocks of the Object-Oriented Paradigm Presented by Tara Struble.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

Software Engineering Key design concepts Design heuristics Design practices.
Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
1 SWE Introduction to Software Engineering Lecture 13 – System Modeling.
Stéphane Ducasse«ChapterNr».1 Arthur Riel Design Heuristics from Object-Oriented Design Heuristics by Arthur Riel Read the Heuristics… –Find reasons why.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
THE OBJECT-ORIENTED DESIGN WORKFLOW Interfaces & Subsystems.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
The Relationships Between Classes & Objects Presented by Tim Sweeney.
16/22/2015 2:54 PM6/22/2015 2:54 PM6/22/2015 2:54 PMObject-Oriented Development Concept originated with simulating objects and their interactions. Adapted.
Chapter 1 Principles of Programming and Software Engineering.
Lecture 13: Object- Oriented Concepts Anita S. Malik Adapted from Schach (2004) Chapter 7.
Chapter 10 Classes Continued
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
BACS 287 Basics of Object-Oriented Programming 1.
The chapter will address the following questions:
1 CSE 403 Object-Oriented Design Reading: Object Oriented Design Heuristics Ch. 2-3, by Authur Riel These lecture slides are copyright (C) Marty Stepp,
Object Oriented Programming Key Features of OO Approach Data encapsulation –data and methods are contained in a single unit, object –promotes internal.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
1 CSE 331 Object-Oriented Design Heuristics slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
S.Ducasse Stéphane Ducasse 1 Design Heuristics.
Object-Oriented Programming. An object is anything that can be represented by data in a computer’s memory and manipulated by a computer program.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Chapter 12 Support for Object oriented Programming.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
CSCI-383 Object-Oriented Programming & Design Lecture 18.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
Relationships Relationships between objects and between classes.
CSE 341, S. Tanimoto Java brief review - 1 Java Brief Review Java’s strengths Object-oriented terminology Inheritance Interfaces An example with inheritance.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Introduction to Java Chapter 7 - Classes & Object-oriented Programming1 Chapter 7 Classes and Object-Oriented Programming.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
1 TCSS 360, Spring 2005 Lecture Notes Design Guidelines 2 Relevant Reading: Object-Oriented Design Heuristics Arthur Riel.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Principles Applications to Programming.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
OOP Review CS 124.
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
1 TCSS 360, Spring 2005 Lecture Notes Design Guidelines Relevant Reading: Object-Oriented Design Heuristics Arthur Riel.
Ch 7: From Modules to Objects (Part Two) CSCI 4320.
Design CS 470 – Software Engineering I Sheldon X. Liang, PH.D.
Lecture 12 Implementation Issues with Polymorphism.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Basic Characteristics of Object-Oriented Systems
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
UNIT-IV Designing Classes – Access Layer ‐ Object Storage ‐ Object Interoperability.
Sections Inheritance and Abstract Classes
CHAPTER 5 GENERAL OOP CONCEPTS.
Interfaces.
TIM 58 Chapter 8: Class and Method Design
Software Design AITI GP John Paul Vergara.
Packages.
Producing Production Quality Software
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Object Oriented Analysis and Design
The Object Paradigm Classes – Templates for creating objects
CS 501: Software Engineering
Presentation transcript:

Classes and Objects: The Building Blocks of the Object-Oriented Paradigm Presented by Tara Struble

Introduction to Classes and Objects All implementation details should be hidden from users behind a consistent public interface. All implementation details should be hidden from users behind a consistent public interface. Allows designer to change implementation whenever necessary. Allows designer to change implementation whenever necessary. Greatly simplifies maintenance. Greatly simplifies maintenance.

Messages and Methods Message  name of an object behavior. Message  name of an object behavior. Method  implementation of a message. Method  implementation of a message. Protocol  list of messages to which an object can respond. Protocol  list of messages to which an object can respond.

Users of a class must be dependent on its public interface, but a class should not be dependent on its users. Users of a class must be dependent on its public interface, but a class should not be dependent on its users. Minimize the number of messages in the protocol of a class. Minimize the number of messages in the protocol of a class. Implement a minimal public interface that all classes understand. Implement a minimal public interface that all classes understand. (operations such as copy, equality testing, printing, parsing from an ASCII description) (operations such as copy, equality testing, printing, parsing from an ASCII description)

Do not put implementation details such as common-code private functions into the public interface of a class. Do not put implementation details such as common-code private functions into the public interface of a class. Do not clutter the public interface of a class with items that users of that class are not able to use or are not interested in using. Do not clutter the public interface of a class with items that users of that class are not able to use or are not interested in using.

Class Coupling and Cohesion The goal is tight cohesion within classes and loose coupling between classes. The goal is tight cohesion within classes and loose coupling between classes. Tight cohesion implies that the code making up the function is closely related. Tight cohesion implies that the code making up the function is closely related. Loose coupling implies that when one function wishes to use another, it should enter and exit the function from one point. Loose coupling implies that when one function wishes to use another, it should enter and exit the function from one point.

Basic forms of coupling Nil coupling  two classes that have no dependency on each other. Nil coupling  two classes that have no dependency on each other. Export coupling  one class is dependent on the public interface of the other. Export coupling  one class is dependent on the public interface of the other. Overt coupling  one class uses the implementation details of another class with permission. Overt coupling  one class uses the implementation details of another class with permission. Covert coupling  same as overt coupling, except that no permissions are granted. Covert coupling  same as overt coupling, except that no permissions are granted.

Classes should only exhibit nil or export coupling with other classes. Classes should only exhibit nil or export coupling with other classes. A class should capture one and only one key abstraction. A class should capture one and only one key abstraction. Keep related data and behavior in one place. Keep related data and behavior in one place. Spin off non-related information into another class. Spin off non-related information into another class.

Dynamic Semantics Collection of all possible states of a class’s objects, as well as the legal transitions between them. Collection of all possible states of a class’s objects, as well as the legal transitions between them. Allows an object to respond differently to the same message sent at different times. Allows an object to respond differently to the same message sent at different times.

Abstract Classes Do not know how to instantiate objects. Do not know how to instantiate objects. Used primarily for inheritance hierarchies. Used primarily for inheritance hierarchies.

Roles Versus Classes Be sure the abstractions that you model are classes and not simply the roles objects play. Be sure the abstractions that you model are classes and not simply the roles objects play. The distinction is based on differing behavior. The distinction is based on differing behavior.