Object Oriented Programming B.Sc. Multimedia ComputingMultimedia Authoring.

Slides:



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

When is Orientated Programming NOT? Mike Fitzpatrick.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Classes & Objects Computer Science I Last updated 9/30/10.
1 CIS601: Object-Oriented Programming in C++ Note: CIS 601 notes were originally developed by H. Zhu for NJIT DL Program. The notes were subsequently revised.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object Oriented Programming A brief review of what you should know about OOP.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object Oriented System Development with VB .NET
B.Sc. Multimedia ComputingMultimedia Authoring Introduction to ActionScript.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Class Structures and Methods B.Sc. Multimedia ComputingMultimedia Authoring.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
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 Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
Representing Systems Sixth Meeting. Modeling Systems Models block-diagram Used throughout engineering Represents behavior and structure of systems. Only.
C++ fundamentals.
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
BACS 287 Basics of Object-Oriented Programming 1.
Object Oriented Programming
CPT 140 Programming Constructs1 OBJECT ORIENTED TECHNOLOGY Terminology and Basic Concepts.
What is Object-Oriented Programming?. Objects – Variables and Logic inside "Objects", not standalone code – Objects contain related variables and functions.
TCU CoSc Introduction to Programming (with Java) Getting to Know Java.
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Introduction to Object-oriented programming and software development Lecture 1.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
BCS 2143 Introduction to Object Oriented and Software Development.
An Object-Oriented Approach to Programming Logic and Design
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Unified Modeling Language, Version 2.0
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Object Oriented Programming Concepts. Object Oriented Programming Type of programming whereby the programmer defines the data types of a data structure.
Object Oriented Programming B.Sc. Digital MediaMultimedia Studio.
S.Ducasse Stéphane Ducasse 1 Object-Oriented Programming.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Chapter 10 Classes and Objects In-Depth. Chapter 10 A class provides the foundation for creating specific objects, each of which shares the general attributes,
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
© 2007 Lawrenceville Press Slide 1 Chapter 8 Objects  A variable of a data type that is a class. Also called an instance of a class.  Stores data  Can.
1 Unified Modeling Language, Version 2.0 Chapter 2.
OOP Review CS 124.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Chapter 2 Principles of Programming and Software Engineering.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Object Oriented Paradigm OOP’s. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Chapter 11 An introduction to object-oriented design.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
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.
Programming Paradigms
The Movement To Objects
CHAPTER 5 GENERAL OOP CONCEPTS.
OOP What is problem? Solution? OOP
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
3 Fundamentals of Object-Oriented Programming
Week 3 Object-based Programming: Classes and Objects
Object-Oriented Programming
CPS120: Introduction to Computer Science
Presentation transcript:

Object Oriented Programming B.Sc. Multimedia ComputingMultimedia Authoring

Agenda Procedural Programming v OOP Software Objects Classes and Methods The Object Oriented Paradigm B.Sc. Multimedia ComputingMultimedia Authoring

Object Oriented Programming Object-Oriented Programming is a way of describing and structuring software systems that features objects that contain functionality and data Early program structure techniques kept program functionality and data separate - so called “procedural programming” B.Sc. Multimedia ComputingMultimedia Authoring

Procedural Programming 10 readln(sum) 20 sum = sum + x 30 writeln(“The answer is” ), sum). 60 GOSUB readln(answer). 300 return B.Sc. Multimedia ComputingMultimedia Authoring

Object Oriented Programming OOP places the data and functionality inside a software object - the data is siad to be encapsulated within the object B.Sc. Multimedia ComputingMultimedia Authoring Software object data and functionality

Object Oriented Programming Software objects communicate with other software objects to carry out the overall function of a software system by sending messages to each other B.Sc. Multimedia ComputingMultimedia Authoring Software object data and functionality Software object data and functionality

Transport System To model vehicles and drivers as an OOP software system think about the various objects, properties and functions of such a system: Vehicles - Type, Make, Model, Value, Registration Number Drivers - Name, Age, Date of Birth, License Type B.Sc. Multimedia ComputingMultimedia Authoring

Transport System: Vehicle Object: Vehicles Properties (attributes) Type Make Model Value Registration Number Functions (methods) Create an object of type Vehicle Set the Make of vehicle Get the make of vehilce Set the value of the vehicle B.Sc. Multimedia ComputingMultimedia Authoring

Transport System: Driver Object: Driver Properties (attributes) Name Date of Birth License Type Value Functions (methods) Create an object of type Driver Set the Name of a driver Get the name of a driver Set the type of license Get the type of license B.Sc. Multimedia ComputingMultimedia Authoring

Driver Object B.Sc. Multimedia ComputingMultimedia Authoring Driver Properties: Name Date of Birth License Type Set Name Get Name Set Date of Birth Get Date of Birth Functions (methods) to communicate with a Driver object

Vehicle Object B.Sc. Multimedia ComputingMultimedia Authoring Vehicle Properties: Make Model Registration No. Value Set Make Get Make Set Registration No. Get Registration No. Functions (methods) to communicate with a Vehicle object

Class Definition for a Vehicle B.Sc. Multimedia ComputingMultimedia Authoring public class Vehicle { // constructor // public function Vehicle(){ } // end constructor // properties // var regNo:String; var make:String; var model:String; var saleValue:int;

Set Method Definition B.Sc. Multimedia ComputingMultimedia Authoring // set the registration number // public function setRegNumber(aRegNumber:String):void { this.regNo = aRegNumber; } // end setRegNumber

Get Method Definition B.Sc. Multimedia ComputingMultimedia Authoring // get the registration number // public function getRegNumber():String { var aRegNumber:String; aRegNumber = this.regNo; return aRegNumber; } // end getRegNumber

Class Instantiation and Method References B.Sc. Multimedia ComputingMultimedia Authoring var aCar:Vehicle = new Vehicle(); var reg:String; var make:String; aCar.setRegNumber("BKD 1"); aCar.setMake("Ferrari"); make = aCar.getMake(); reg = aCar.getRegNumber();

ActionScript 3.0 Implementation Details B.Sc. Multimedia ComputingMultimedia Authoring import uk.ac.uwe.multimedia.transport.Vehicle; var aCar:Vehicle = new Vehicle(); var reg:String; var make:String; aCar.setRegNumber("BKD 1"); aCar.setMake("Ferrari"); make = aCar.getMake(); reg = aCar.getRegNumber(); trace(make); trace(reg);

ActionScript 3.0 Implementation Details B.Sc. Multimedia ComputingMultimedia Authoring import uk.ac.uwe.multimedia.transport.Vehicle; var aCar:Vehicle = new Vehicle(); var reg:String; var make:String; aCar.setRegNumber("BKD 1"); aCar.setMake("Ferrari"); make = aCar.getMake(); reg = aCar.getRegNumber(); trace(make); trace(reg);

Object Oriented Programming Features Classes are templates for objects, classes define properties and methods which dictate the state and behavior of the resulting software object Data and related functions are contained within the same object space - encapsulation Classes can be extended by creating subclasses which have similar properties and behaviors - inheritance Inherited behaviors can be modified (overridden) to change the way an object responds to common messages- polymorphism These three characteristics of OOP are often referred to as the “Object Oriented Paradigm” B.Sc. Multimedia ComputingMultimedia Authoring