Fall 2007ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:

Slides:



Advertisements
Similar presentations
4. Object-Oriented Programming Procedural programming Structs and objects Object-oriented programming Concepts and terminology Related keywords.
Advertisements

CS320n –Visual Programming Class-level Methods and Inheritance – Part 1 Mike Scott (Slides 4-3-1) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger.
Class-level Methods Alice. World / Class Method World method A general method that may refer to multiple objects; not closely associated with any particular.
Class-level Methods and Inheritance Part 1 Alice.
Class-level Methods and Inheritance Alice. Class-level Methods Some actions are naturally associated with a specific class of objects. Examples A person.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Systems Analysis and Design 8th Edition
Classes & Objects Computer Science I Last updated 9/30/10.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
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
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
HST 952 Computing for Biomedical Scientists Lecture 2.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Object-oriented Programming Concepts
Fall 2007ACS-1805 Ron McFadyen1 Chapter 4 OO Programming Concepts.
Fall 2008ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Representing Systems Sixth Meeting. Modeling Systems Models block-diagram Used throughout engineering Represents behavior and structure of systems. Only.
Inheritance. © 2004 Pearson Addison-Wesley. All rights reserved 8-2 Inheritance Inheritance is a fundamental object-oriented design technique used to.
BACS 287 Basics of Object-Oriented Programming 1.
CPT 140 Programming Constructs1 OBJECT ORIENTED TECHNOLOGY Terminology and Basic Concepts.
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
BCS 2143 Introduction to Object Oriented and Software Development.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
An Object-Oriented Approach to Programming Logic and Design
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
Class-level Methods Chapter 6 part 1. Classes and Objects Classes o In Alice, classes are predefined as 3D models Objects o An object is an instance of.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Advanced Object- Oriented Programming Programming Right from the Start with Visual Basic.NET 1/e 14.
Systems Analysis & Design 7 th Edition Chapter 5.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
Object-Oriented Programming. Objectives Distinguish between object-oriented and procedure-oriented design. Define the terms class and object. Distinguish.
Database Design – Lecture 12 Object Oriented Database Design cont’d.
Chapter 12 Object-oriented design for more than one class.
ISBN Object-Oriented Programming Chapter Chapter
Class-level Methods and Inheritance Alice. Class-level Methods Some actions are naturally associated with a specific class of objects. Examples A person.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
CompSci 4 Chap 4 Sec 3 Sept 23, 2010 Prof. Susan Rodger.
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.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Chapter 11 An introduction to object-oriented design.
Class-level Methods and Inheritance Alice. Class-level Methods Some actions are naturally associated with a specific class of objects. Examples A person.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
OOP - Object Oriented Programming
Object-Oriented Design
Object-Oriented Programming Concepts
CHAPTER 5 GENERAL OOP CONCEPTS.
OOP What is problem? Solution? OOP
Table of Contents Class Objects.
Object-Oriented Programming
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Types of Programming Languages
Object Oriented Concepts
3 Fundamentals of Object-Oriented Programming
Object Oriented Analysis and Design
CS320n –Visual Programming
Object Oriented Analysis and Design
Object-Oriented Programming
Class-level Methods and Inheritance Part 2
Presentation transcript:

Fall 2007ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires: Classes Objects Methods World-level Class-level Parameters Inheritance

Fall 2007ACS-1805 Ron McFadyen2 Classes Wikipedia entry for object oriented: Fundamental concepts: Class Object Method Message passing Inheritance Encapsulation Abstraction Polymorphism

Fall 2007ACS-1805 Ron McFadyen3 Class A class defines the abstract characteristics of a thing (object), including the thing's characteristics (its attributes) and the thing's behaviors (the things it can do, i.e. methods). Object A particular instance of a class. The set of values of the attributes of a particular object is called its state. The object consists of state and the behaviour that's defined in the object's class. Method An object's abilities. Message passing (aside) The process by which an object sends data to another object or asks the other object to invoke a method. Fundamental OO Concepts

Fall 2007ACS-1805 Ron McFadyen4 Inheritance "Subclasses" are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own. Each subclass can alter its inherited traits. With Alice we can create new classes that are “subclasses” of others. However, if we modify the “parent” class those changes are not reflected in the subclass. Encapsulation (aside) Encapsulation conceals the functional details of a class from objects that send messages to it. This is supported by Alice, but not enforced Fundamental OO Concepts

Fall 2007ACS-1805 Ron McFadyen5 Abstraction Abstraction is simplifying complex reality by modeling classes and methods appropriate to the problem Polymorphism (aside) Polymorphism allows you to treat derived class members just like their parent class's members. More precisely, Polymorphism in object-oriented programming is the ability of objects belonging to different data types to respond to method calls of methods of the same name, each one according to an appropriate type-specific behavior. Not supported in Alice Fundamental OO Concepts

Fall 2007ACS-1805 Ron McFadyen6 4-3 Class-level methods and inheritance If we modify some object by adding properties or methods, we can then save the object as a new 3D model. Subsequently we can import the model into a world (just as we add objects from a gallery.

Fall 2007ACS-1805 Ron McFadyen7 4-3 Class-level methods and inheritance Text example involves the IceSkater class and the subsequent creation of the CleverSkater subclass. CleverSkater inherits all the properties, methods and functions of IceSkater and also has other methods that distinguish the subclass from the super class (aka child class… parent class). CleverSkater can then be imported into any other world where a clever skater is needed, saving the time and effort of redeveloping the code IceSkater CleverSkater

Fall 2007ACS-1805 Ron McFadyen8 4-3 Class-level methods and inheritance Advantages of subclassing (creating new 3d models from others): Reuse of code – write once, reuse often Simplifying large projects  many developers where each can take on a small component and then their works are brought together (imported) as needed. IceSkater CleverSkater

Fall 2007ACS-1805 Ron McFadyen9 4-3 Class-level methods and inheritance Guidelines: Use many class-level methods Use sound in a class-level method if the sound was imported for the object and not the world Do not call world-level methods as this creates dependencies Do not use instructions (actions, methods) for other objects as this creates dependencies (But treating them as object parameters in methods would be ok)