Object-Oriented Design

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

Object-Oriented Design Keith T. Weber, GISP GIS Director, ISU.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
1 Generalizations Multiple Inheritance (finishing up Class Design) Class Design – Another Look – Part 11.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
1 Basic Object Oriented Concepts Overview l What is Object-Orientation about? l What is an Object? l What is a Class? l Constructing Objects from Classes.
IMS5024 Week 3 Semester 2, IMS 5024 Object orientation (1)
IMS5024 Week 61 IMS 5024 Object orientation (1). IMS5024 Week 62 Content Individual assignment date Group assignment What is object orientation? n Place.
Lecture 13: Object- Oriented Concepts Anita S. Malik Adapted from Schach (2004) Chapter 7.
C++ fundamentals.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
Introduction to Object Oriented Design. Topics Designing Your Own Classes Attributes and Behaviors Class Diagrams.
Programming Languages and Paradigms Object-Oriented Programming.
Module 7: Essentials of Object-Oriented Programming.
Introduction to Object-oriented programming and software development Lecture 1.
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.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
Object Orientation Yaodong Bi, Ph.D. Department of Computer Sciences University of Scranton October 18, 2015October 18, 2015October 18, 2015.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Object-Oriented Design Justin Callanan CS 597. Object-Oriented Basics ● Data is stored and processed in “objects” ● Objects represent generalized real.
Chapter 12 Object Oriented Design.  Complements top-down design  Data-centered view of design  Reliable  Cost-effective.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
OOP Review CS 124.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
GIS & Databases Ming-Chun Lee.
Chapter 12 – Object-Oriented Design
Business System Development
DATA REQIREMENT ANALYSIS
The Movement To Objects
Object-Oriented Analysis and Design
Objects as a programming concept
The Object-Oriented Thought Process Chapter 1
Chapter 11 Object-Oriented Design
Table of Contents Class Objects.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object Oriented Concepts
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object Orientation Yaodong Bi, Ph.D. Department of Computer Sciences
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Advanced Java Programming
Database Design Concepts and Practices
The Object-Oriented Thought Process Chapter 07
Object oriented vs procedural programming
Appendix A Object-Oriented Analysis and Design
Software Construction Lecture 2
ITEC 3220A Using and Designing Database Systems
Copyright 2007 Oxford Consulting, Ltd
Workshop for Programming And Systems Management Teachers
Inheritance and Polymorphism
Object Oriented Analysis and Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object-Oriented PHP (1)
Handout-2(a) Basic Object Oriented Concepts
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Object-Oriented Design
Introduction to Computer Science and Object-Oriented Programming
Presentation transcript:

Object-Oriented Design IT4GIS Keith T. Weber, GISP GIS Director ISU-GIS Training and Research Center

Topics During the balance of this semester, we will pursue and follow two learning threads Object-relational databases The Geo-Web These two threads are interwoven

To understand Object-Relational Databases… We need to understand both relational concepts and Object-oriented concepts (this week)

The Early Days… Computer programming from the caveman era The first PC’s did not have an OS. They had a BIOS and that is where the user (programmer) interfaced. Programs were small, difficult, and quirky. Because PC’s were not really capable of much (kind of a hobbyists toy…like a ham radio operator) programs were simple things. Like printing text on the screen for someone to read. Adding numbers together (a very expensive calculator which required hours of programming to even enable the calculator to work). Programs were written sequentially with line numbers. More complicated programs…those that could NOT be purely sequential because they involved decisions (do you want to add OR subtract) needed to use GOTO statements. Soon the simple sequential programs were bogged down with tons of GOTO’s and the flow was a messy (making them unstable). This programming style was later dubbed spaghetti programming.

The concept of encapsulation! Why…Object-Oriented A brief history of computer programming… The concept of encapsulation! As programs grew larger and more complex AND interacted with the OS and other apps more, the need was born to develop programs in re-usable modules or packets. Thereby reducing redundancy and the program footprint, while increasing the computer users learning curve through the development of common/similar tools (open, save, print, etc)

Today’s Goals We will dissect “Object-Oriented” to learn what it really is and how it relates to object-relational databases What is a class? What is an object? Enable you to identify inheritance, aggregation, and dependency relationships between classes Understand class attributes and object properties Become familiar with new terminology

What is a CLASS? A class is a computer construct representing a concept bound in a cohesive package Some are concrete (i.e., real world) Bank account Rental item Database item Pile Others are abstract Scanner Stream Math

Discovering CLASSES Simple Rule: Look for nouns in descriptions Obviously not all nouns are classes But at least this approach can allow one to create a list of candidate classes

What is an OBJECT An instance of a CLASS That contains meaningful data OBJECTS occupy memory space at runtime If not, they are CLASSES For example: data type vs. double Data type is a class. It exists as a concept and can be used by programmers and GIS analysts, but does not require computer resources until actually used such as when one declares a field as a double in a database table.

A little Quiz… #1 Class or Object? Dog Dog is a generalization of Scooby-Doo Scooby-Doo

A little Quiz (cont’d)… #2 Class or Object? Dog The concept of subclass! Animal Dog is a subclass of the Animal class Animal is a generalization of Dog Scooby-Doo

A little Quiz (cont’d)… #3 Class or Object? Animal The concept of polymorphism! Bird Dog

Questions so far… Give tour

Key Points Many classes already exist and are at our disposal when we design a database We use inheritance to add capabilities to our projects A subclass inherits from its superclass i.e., a child inherits from its parent

Inheritance in the Geodatabase

Defining a CLASS After a class has been identified we can define: The behavior of each class Methods (verbs) And the attributes of each class

Behavior

Relationships Between CLASSES We have learned about inheritance as one (1) relationship between classes There are three (3) important relationships Inheritance Aggregation Dependency

1- Inheritance Is-a relationship Relationship between a more general class (superclass) and a more specialized class (subclass) Every savings account is a bank account DVD rental is a rental

2- Aggregation Has-a relationship Each Dog has a Paw (dog is not a generalization of paw!) One class (Appendages) contains references to another class (Dog)

Inheritance vs. Aggregation Often confused Questions?

Example Car is a Vehicle – Inheritance Car has a set of Tires – Aggregation

3- Dependency Dependency occurs when a class uses or relies on another class This is a Uses relationship Example: an application may depend on the Scanner class to read input

What type of Method behaviors are these? Class Diagram What type of Method behaviors are these? Dependency…a deposit uses a bank account (cannot happen without it)

Attributes

Class Diagram Attributes help define a given class and instantiate it into an object Dependency…a deposit uses a bank account (cannot happen without it)

Dog example Name of the class = Methods= Dog Attributes? Example of inheritance Example of aggregation Example of dependence Attributes? Dog Brainstorm some methods. Inherited methods (is a) inherit from? Animal. What can it inherit from animal. Circulatory system, nervous system…etc. Maybe we need another superclass between animal and dog called mammal? Aggregated methods (has a) paw Dependency (uses) Bark needs a dog...dog class uses the bark class (superclass subclass structure) Health: height, weight, health, name (note, these attributes are not set as they would require memory and computer resources, so they have no state as a class)

Instantiate into an object Three features characterize objects: Identity: specific attribute (property) settings have been made for the class. This distinguishes it from all other objects. State: Describes the data stored in the object WHERE DID THIS COME FROM? Behavior: describes the method in the object's interface through which the object can be used (how do we make the dog bark?) Only an instantiated class (an object) can have a state. It is active and dynamic. If something has a state (status) then it is an object, not a class.

Instantiating the Dog CLASS CLASS (DOG) Attributes (Properties) NAME = Scooby-Doo HEIGHT = 36 WEIGHT = 145 Methods [Uses] bark- “Rooby roo” etc. Scooby-Doo Notice, the properties have a state. This is an object…an instantiation of the dog class.

Key Concepts Understand the difference between a CLASS and an OBJECT Understand new terms: Encapsulation, polymorphism, superclass, subclass, behavior, attributes, instantiation Understand --and be able to differentiate-- the three types of behaviors Inheritance, aggregation, dependency

Questions… Give tour