Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:

Slides:



Advertisements
Similar presentations
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Advertisements

Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to Requirements Analysis Object Oriented.
Object Oriented System Development with VB .NET
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Basic OOP Concepts and Terms
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Object-Oriented Databases
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Object-oriented Programming Concepts
03/12/2001 © Bennett, McRobb and Farmer What Is Object-Orientation? Based on Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Object-Oriented Analysis: some basic principles. Objects “Objects have state, behaviour and identity.” Booch (1994) State: the condition of an object.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
BACS 287 Basics of Object-Oriented Programming 1.
Introduction To System Analysis and design
Object Oriented Software Development
Systems Analysis and Design in a Changing World, Fifth Edition
BCS 2143 Introduction to Object Oriented and Software Development.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Unified Modeling Language, Version 2.0
What Is Object-Orientation?
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Chapter 12 Support for Object oriented Programming.
CIS224 Software Projects: Software Engineering and Research Methods Lecture 1b Object concepts (Based on Stevens and Pooley (2006), Chapter 2) David Meredith.
Dr.Basem Alkazemi
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Object Oriented Software Development
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Programming Paradigms Different paradigms Procedural paradigm, e.g. Pascal Basic Functional paradigm, e.g. Lisp Declarative paradigm, e.g. Prolog Object-Oriented.
Object-Oriented Principals Dwight Deugo Nesa Matic
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
OBJECT-ORIENTED DESIGN JEAN SIMILIEN. WHAT IS OBJECT-ORIENTED DESIGN? Object-oriented design is the process of planning a system of interacting objects.
Basic Characteristics of Object-Oriented Systems
CSCE 240 – Intro to Software Engineering Lecture 3.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object-Oriented Modeling
The Movement To Objects
Course Outcomes of Object Oriented Modeling Design (17630,C604)
The Object-Oriented Thought Process Chapter 1
UML Class Diagrams: Basic Concepts
What Is Object-Orientation?
Basic OOP Concepts and Terms
Presentation transcript:

Solutions to Review Questions

4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class: a classifier that describes a set of objects that share the same specifications of features, semantics and constraints. Instance: an entity that has unique identity, a set of operations that can be applied to it, and state that stores the effect of the operations (also object instance).

4.2 What do you think is meant by ‘semantics’? Semantics is the study of meaning. In object-oriented development it is used to denote the meaning that an element has for the user. The semantics of an object include its purpose, description, relationships and behaviour seen from a user perspective.

4.3 How does the object-oriented concept of message passing help to hide the implementation of an object, including its data? Other parts of a system only see an object’s interface (services it can perform and operation signatures). Internal details including data are hidden and can only be accessed by a message that contains a valid signature.

4.4 What is polymorphism? Polymorphism means that when one message is sent to objects of different types, each has an appropriate, but different, implementation for its response. The object that sends the message need not know which type of object is addressed. One way of implementing polymorphism is through inheritance and overriding.

4.5 What’s the difference between generalization and specialization? Generalization and specialization are opposite sides of the same coin. As we look further up an inheritance hierarchy, the classes become more generalized in their application. As we look down the same hierarchy, they become more specialized. For example Employee is more generalized than HourlyPaidEmployee, while the latter is more specialized.

4.6 What rules describe the relationship between a subclass and its superclass? A subclass inherits all characteristics of its ancestors or superclasses (some superclass characteristics may be overridden, but are still technically inherited). Each subclass is different from its ancestor superclasses in at least one way.

4.7 What does it mean to say that an object- oriented system is highly modular? Objects are likely to be cohesive (that is, reasonably simple and having a single purpose), well- encapsulated and relatively weakly coupled to other objects in the system. This is equivalent to saying that they are highly modular. They may also be assembled into larger composition and component structures, which are themselves highly modular.

4.8 Why is it particularly hard for a designer to anticipate a user’s sequence of tasks when using a GUI application? The interface for a typical GUI application (for example, a word processor that runs in a windowing environment) consists of many buttons, tools and menu choices. The user can usually select any of these whenever she wishes, and the software designer must cater for this flexibility of use.

4.9 What does ‘object state’ mean? A condition in the life of an object during which it behaves in a particular way, e.g. waiting for some event or performing some activity. The state of an object also determines the way that it responds to events.

4.10 What is an operation signature? An operation signature gives the format of a valid message that will cause the operation to execute.

4.11 Distinguish between ‘encapsulation’ and ‘information hiding’ Encapsulation means that operations are located together with the data that they act upon. i.e. in the same object. Information hiding means that the implementation of an object’s data is hidden from all other objects, and can only be accessed by that object’s operations. Information hiding is a much stronger design principle, since some object-oriented languages allow encapsulation to be bypassed.