Copyright ©2005  Department of Computer & Information Science Object Based JavaScript.

Slides:



Advertisements
Similar presentations
BITS Pilani Avinash Gautam Department of Computer Science and Information Systems.
Advertisements

Systems Analysis and Design 8th Edition
Fall 2006AE6382 Design Computing1 Object Oriented Programming in Matlab Intro to Object- Oriented Programming (OOP) An example that creates a ASSET class.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Object-Based Design/Programming An Informal Introduction and Overview CS340100, NTHU Yoshi.
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 Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Object Oriented System Development with VB .NET
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
Object-oriented Programming Concepts
Chapter 13: Object-Oriented Programming
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
CSCI N201: Programming Concepts Copyright ©2005  Department of Computer & Information Science Introducing Object-Oriented Programming (OOP)
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Object Oriented Programming
CSCI N341: Client-Side Web Programming Copyright ©2004  Department of Computer & Information Science "Object-Oriented" JavaScript.
CPT 140 Programming Constructs1 OBJECT ORIENTED TECHNOLOGY Terminology and Basic Concepts.
A First Program Using C#
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to Object-oriented programming and software development Lecture 1.
Object Oriented Programming Lecturer: Andreas P. Adi
An Object-Oriented Approach to Programming Logic and Design
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Enhancing JavaScript Using Application Programming Interfaces (APIs)
Introduction to Objects Adapted from “TEN STEPS TO OBJECT-SPEAK” a CPT Tech Talk by Joy Starks September 17, 1999.
Unified Modeling Language, Version 2.0
JavaScript, Fourth Edition
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Systems Analysis & Design 7 th Edition Chapter 5.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Chapter 12 Object-oriented design for more than one class.
Slide 1 Object-Oriented Analysis and Design Attempts to balance emphasis on data and process Uses Unified Modeling Language (UML) for diagramming Use-case.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 11 Object-Oriented.
Java Software Solutions Lewis and Loftus Chapter 9 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Enhanced Class Design -- Introduction.
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)
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Learning OOP in PHP. What is OOP? OOP stands for Object Oriented Programming. OOP is a programming paradigm wherein you create “objects” to work with.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
 By the end of this lecture, you should …  Understand the three pillars of Object- Oriented Programming: Inheritance, Encapsulation and Polymorphism.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Copyright ©2005  Department of Computer & Information Science Object Oriented Concepts.
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 Programming
JAVA By Waqas.
The Movement To Objects
Sections Basic Concepts of Programming
Systems Analysis and Design With UML 2
Chapter 11 Object-Oriented Design
Systems Analysis and Design With UML 2
Lecture 2 of Computer Science II
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
OBJECT-ORIENTED PROGRAMMING
Chapter 5.
Object Oriented Programming(OOP)
Presentation transcript:

Copyright ©2005  Department of Computer & Information Science Object Based JavaScript

Copyright ©2005  Department of Computer & Information Science Goals By the end of this lecture you should …

Copyright ©2005  Department of Computer & Information Science REVIEW: What is an object? An object is a unique programming entity that has attributes to describe it and methods to retrieve/set attribute values.An object is a unique programming entity that has attributes to describe it and methods to retrieve/set attribute values. We can create a blueprint of an object called a class.We can create a blueprint of an object called a class. We can create a usable instance of a class through instantiation.We can create a usable instance of a class through instantiation.

Copyright ©2005  Department of Computer & Information Science REVIEW: Encapsulation Data and the ways to get at that data are wrapped in a single package, a class. The only way to access such data is through that package. This idea translates to information hiding.Data and the ways to get at that data are wrapped in a single package, a class. The only way to access such data is through that package. This idea translates to information hiding.

Copyright ©2005  Department of Computer & Information Science REVIEW: Inheritance Inheritance allows programmers to create new classes from existing ones.Inheritance allows programmers to create new classes from existing ones. A child class inherits its properties and attributes from its parents, which programmers can change.A child class inherits its properties and attributes from its parents, which programmers can change.

Copyright ©2005  Department of Computer & Information Science REVIEW: Polymorphism Polymorphism describes how programmers write methods to do some general purpose function.Polymorphism describes how programmers write methods to do some general purpose function. Different objects might perform polymorphic methods differently.Different objects might perform polymorphic methods differently.

Copyright ©2005  Department of Computer & Information Science Is JavaScript “Object-Oriented?” Well, not really. We’ll call it “Object- Based” instead …Well, not really. We’ll call it “Object- Based” instead … JavaScript uses objects by way of supporting inheritance and encapsulation, but it doesn't really provide support for polymorphism.JavaScript uses objects by way of supporting inheritance and encapsulation, but it doesn't really provide support for polymorphism.

Copyright ©2005  Department of Computer & Information Science Object-Based JavaScript We can create new, custom, re-usable objects in JavaScript that include their own methods, properties and events.We can create new, custom, re-usable objects in JavaScript that include their own methods, properties and events. Consider the following problem: “I want to record the color, brand, horsepower and price of several cars.”Consider the following problem: “I want to record the color, brand, horsepower and price of several cars.”

Copyright ©2005  Department of Computer & Information Science Solution Without Objects One solution to our problem is to rely on parallel arrays.One solution to our problem is to rely on parallel arrays. However this can be confusing, as it can be difficult to track with attribute belongs to which car …However this can be confusing, as it can be difficult to track with attribute belongs to which car …

Copyright ©2005  Department of Computer & Information Science Open the file called objectBasedProg_01.html

Copyright ©2005  Department of Computer & Information Science What is an API? API stands for Application Programming Interface.API stands for Application Programming Interface. APIs allow programmers to extend the current language to included customized, re-usable components.APIs allow programmers to extend the current language to included customized, re-usable components. Most modern languages incorporate APIs.Most modern languages incorporate APIs.

Copyright ©2005  Department of Computer & Information Science Open the files called objectBasedProg_02.html & carLib.js

Copyright ©2005  Department of Computer & Information Science Summary