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

Slides:



Advertisements
Similar presentations
By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
Advertisements

Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
Classes & Objects Computer Science I Last updated 9/30/10.
OBJECT-ORIENTED PROGRAMMING CONCEPTS (Review). What is an Object? What is an Object? Objects have states and behaviors. Example: A dog has states - color,
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
Classes and Objects in Java. What Is an Object?. An object is a software bundle of related state and behavior. Software objects are often used to model.
Object Oriented System Development with VB .NET
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
EEC-681/781 Distributed Computing Systems Java Tutorial Wenbing Zhao Cleveland State University
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
Object-oriented Programming Concepts
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
UML and Object Oriented Concepts
Object Oriented Programming
Introduction To System Analysis and design
Introduction to Classes, Objects, Methods and Attributes Lecture # 2.
Introduction to Object-oriented programming and software development Lecture 1.
Object Oriented Programming Lecturer: Andreas P. Adi
BCS 2143 Introduction to Object Oriented and Software Development.
An Object-Oriented Approach to Programming Logic and Design
Object Oriented Programming Concepts Fatih University Ceng-104-A Introduction to Object Oriented Programming Harun Reşit Zafer This is a slide version.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
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.
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Object Oriented Programming Concepts. Object ► An object is a software bundle of related state and behavior. ► Software objects are often used to model.
Lecture 12 March 16, The Scope of a Variable What if there are two variables with the same name? –A local or block-local variable can have the same.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
CS 3050 Object-Oriented Analysis and Design. Objectives What is “Object-Oriented?” Object-Oriented Approach Vs. Structured Approach How Has the Object-Oriented.
Abstraction ADTs, Information Hiding and Encapsulation.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
Java Fundamentals Usman Ependi UBD
JAVA Programming (Session 4) “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
By : Robert Apeldorn. What is OOP?  Object-oriented programming is a programming paradigm that uses “objects” to design applications and computer programs.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Basic Characteristics of Object-Oriented Systems
Object Oriented Programming in Java Habib Rostami Lecture 2.
Systems Analysis & Programming 10.1 Systems Development 10.2 Programming: A Five-Step Procedure Generations of Programming Languages 10.4 Programming.
MAITRAYEE MUKERJI Object Oriented Programming in C++
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object-Oriented Programming
Programming paradigms
What is an Object Objects are key to understanding object-oriented technology. An object can be considered a "thing" that can perform a set of related.
Object Oriented Programming
Tips on coding practices
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Object-oriented Design in Processing
Object-oriented Design in Processing
ITEC 3220A Using and Designing Database Systems
Object-oriented Design in Processing
Selenium WebDriver Web Test Tool Training
Object-Oriented Programming
Object-oriented Design in Processing
Presentation transcript:

BITS Pilani Avinash Gautam Department of Computer Science and Information Systems

By appointment through mail Object-Oriented Programming (CS/IS F213) Avinash Gautam avinash@pilani.bits-pilani.ac.in Chamber# 6121-Y, NAB Consultation Hour By appointment through mail

Lecture-1 [OOP Basics] Programming Paradigms OOP Concepts Structured programming Object oriented programming OOP Concepts What is an object? What is a Class? What is Inheritance? What is an Interface? 3

Programming Paradigms […1] High Level Languages (1960) Large complex programs difficult to manage and maintain Structured Programming (1970) Logically structure the program separate smaller more manageable components Significant problems persisted Understanding the systems we need to create Changing existing software as users requirement change Modular languages (1980) Modula2 and ADA, precursor to modern OO Languages

Programming Paradigms […2] Object Oriented Paradigm and Component Based Software Development (1990) Became the norm from 2000 onwards Lead to the development of software components where the operation of the software and the data it operates on are modeled together Lead to the development of reusable software components Save significant development time and cost Allow better software models to be produced which are more maintainable and easier to understand

OOP Concepts 6

What is an object? Look around you and identify some objects Real world objects share two characteristics They all have state They all have behavior Identifying the state and behavior for real-world objects is a great way to begin thinking in terms of object-oriented programming Two Questions What possible states can this object be in? What possible behavior can this object perform? Write down your observation Real world objects vary in complexity (Radio, Table Lamp) Objects may contain other objects These real world observations all translate into object oriented programming 7

What is an object? (Contd.) Software objects are conceptually similar to real world objects: they too consist of state and related behavior An object store its state in fields and exposes its behavior through methods Methods operate on objects internal state and serve as the primary mechanism for object-to-object communication Hiding internal state and requiring all interaction through an object’s method is known as data encapsulation - a fundamental principle of OOP 8

What is an object? (Contd.) Bicycle - By attributing state and providing methods for changing that state, the object remains in control of how the outside world is allowed to use it. For example, if the bicycle only has 6 gears, a method to change gears could reject any value that is less than 1 or greater than 6. Benefits of building code into individual software objects Modularity Information-hiding Code re-use Plug-ability and debugging ease 9

What is a Class? A class is a blueprint or prototype from which objects are created A class defines the general nature of a collection of objects of the same type The process creating an object from a class is called instantiation Every object is an instance of a particular class. There can be many instances of objects from the same class possible with different values for data 10

Example objects Object References redRose class Rose blueRose class 11

What is Inheritance? Different kinds of objects have a certain amount in common with each other For example mountain bikes, road bikes, and tandem Bikes all share the characteristics of bicycles (current speed, current pedal cadence, current gear) Yet each also defines additional features that make them different: tandem bicycles have two seats and two sets of handlebars; road bikes have drop handlebars etc Object-oriented programming allows classes to inherit commonly used state and behaviour from other classes 12

What is Inheritance? 13

What is a Interface? Objects define their interaction with the outside world through the methods that they expose Methods form the object's interface with the outside world The buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off 14

Questions Real-world objects contain _____ and ________ A software object's state is stored in its _____ A software object's behaviour is exposed through _______ Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data ___________ A blueprint for a software object is called a ____ Common behaviour can be defined in a _________ and inherited into a _______ state behaviour fields methods encapsulation class sub-class super-class 15

THANK YOU The material presented in these slides is used only for academic purpose Copyright © Oracle Sun Microsystems 16