Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Informática II Prof. Dr. Gustavo Patiño MJ
Chapter 10 Introduction to Objects and Classess 1.
Ch 12: Object-Oriented Analysis
Introduction To System Analysis and Design
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
File Systems and Databases
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
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Simon Woodworth Object Oriented Design What is it? Why do it? Simon Woodworth, 19 August 2004.
C++ fundamentals.
CSC238 INTRODUCTION TO OOP Chapter 1.
BACS 287 Basics of Object-Oriented Programming 1.
Introduction To System Analysis and design
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Week 1 Lecture MSCD 600 Database Architecture Samuel ConnSamuel Conn, Asst. Professor Suggestions for using the Lecture Slides.
Introduction to Object-oriented programming and software development Lecture 1.
Object Oriented Programming Lecturer: Andreas P. Adi
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
An Object-Oriented Approach to Programming Logic and Design
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Introduction To System Analysis and Design
Downloaded From:  Objective of this course is to make students familiar with the concepts of object-oriented programming  Concepts.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Stephenson College DP 96 1 Object-Orientation by Derek Peacock.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
CSC241 Object-Oriented Programming (OOP) Lecture No. 1.
Abstraction CMPS Abstraction Abstraction mechanisms are techniques to deal with creating, understanding and managing complex systems Abstraction.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
Object-Oriented Programming (OOP) Lecture No. 2. Information Hiding ► Information is stored within the object ► It is hidden from the outside world ►
Object-Oriented Programming (OOP) Lecture No. 3 Downloaded From:
OOP Review CS 124.
Business Applications with Object-Oriented Paradigm (Modeling Concepts) Professor Chen School of Business Gonzaga University Spokane, WA
Object-Oriented Concepts Overview. Florida Community College at Jacksonville COP 2551 Object-Oriented Programming OO Concepts Overview Objective Overview.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
CSC241 Object-Oriented Programming (OOP) Lecture No. 2.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Object-Oriented Paradigm (OOP) Course Code: SE 101 Lecture No. 1.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Object-Oriented Programming (OOP) Lecture No. 1. Course Objective ► Objective of this course is to make students familiar with the concepts of object-oriented.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Object Oriented Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
Object-Oriented Programming (OOP) Lecture No. 1
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Object-Oriented Programming (OOP) Lecture No. 2
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object Oriented Analysis and Design
Object-Oriented Programming
Object Oriented Design & Analysis
WELCOME TO ALL STUDENTS IN MY CLASS: Hope You All Enjoyed C#
Object Oriented Programming(OOP)
Presentation transcript:

Object-Oriented Programming (OOP) CSC-2071 (3+1=4 Credits) Lecture No. 1 MBY

Course Objective Objective of this course is to make students familiar with the concepts of object-oriented programming Concepts will be reinforced by their implementation in Java Project: ( 1) GUI + Database (2) 3D Game design in Alice + Java (3) Android Phone Programming

Course Contents Object-Orientation Objects and Classes Information Hiding Encapsulation Abstraction Inheritance Polymorphism Overloading vs Overriding General Java Programming

Books  Java Advanced How to Program By Deitel & Deitel  Java 2--Complete Reference By Herbert Schildt  Object-Oriented Software Engineering By Jacobson, Christerson, Jonsson, Overgaard Lecture Notes

Object-Orientation (OO)

What is Object-Orientation? A technique for system modeling OO model consists of several interacting objects

OOP and POP Difference between object-oriented programming and procedure oriented programming pop is based on function and oops is based on classes and objects. Repeation of Code/ No data reusability No data hiding capability No clear readability

What is a Model? A model is an abstraction of something Purpose is to understand the product before developing it

Examples – Model Highway maps Architectural models Mechanical models

Example – OO Model

…Example – OO Model Objects – Ali – House – Car – Tree Interactions – Ali lives in the house – Ali drives the car Ali Car House Tree lives-in drives

Object-Orientation - Advantages People think in terms of objects OO models map to reality Therefore, OO models are – easy to develop – easy to understand

What is an Object? An object is Something tangible/Real (Ali, Car) Something that can be captured intelligently (Time, Date)

… What is an Object? An object has State (attributes) Well-defined behaviour (operations) Unique identity

What is the relationship between a class and an object? A class acts as a blue-print that defines the properties, states, and behaviors that are common to a number of objects.

Example – Ali is a Tangible/Real Object State (attributes) – Name – Age behaviour (operations) – Walks – Eats Identity – His name

Example – Car is a Tangible Object State (attributes) - Color - Model behaviour (operations) - Accelerate- Start Car - Change Gear Identity - Its registration number

Example – Time is an Object Apprehended Intellectually State (attributes) - Hours- Seconds - Minutes behaviour (operations) - Set Hours- Set Seconds - Set Minutes Identity - Would have a unique ID in the model

Example – Date is an Object Apprehended Intellectually State (attributes) -Year- Day -Month behaviour (operations) - Set Year- Set Day - Set Month Identity - Would have a unique ID in the model

Information Hiding Information is stored within the object It is hidden from the outside world It can only be manipulated by the object itself

Example – Information Hiding Ali’s name is stored within his brain We can’t access his name directly Rather we can ask him to tell his name

Information Hiding Advantages Simplifies the model by hiding implementation details It is a barrier against change propagation

Encapsulation Data and behaviour are tightly coupled inside an object Both the information structure and implementation details of its operations are hidden from the outer world

Example – Encapsulation Ali stores his personal information and knows how to translate it to the desired language We don’t know – How the data is stored – How Ali translates this information

Other Example – Encapsulation A Phone stores phone numbers in digital format and knows how to convert it into human-readable characters We don’t know – How the data is stored – How it is converted to human-readable characters

Encapsulation – Advantages Simplicity and clarity Low complexity Better understanding

Basic features of OOPs Abstraction - Refers to the process of exposing only the relevant and essential data to the users without showing unnecessary information. Polymorphism - Allows you to use an entity in multiple forms. Encapsulation - Prevents the data from unwanted access by binding of code and data in a single unit called object.

Basic features of OOPs Inheritance - Promotes the reusability of code and eliminates the use of redundant code. It is the property through which a child class obtains all the features defined in its parent class. Data reusability and Extensibility

Object has an Interface An object encapsulates data and behaviour So how objects interact with each other? Each object provides an interface (operations) Other objects communicate through this interface

Example – Interface of a Car Steer Wheels Accelerate Change Gear Apply Brakes Turn Lights On/Off

Example – Interface of a Phone Input Number Place Call Disconnect Call Add number to address book Remove number Update number

Implementation Provides services offered by the object interface This includes – Data structures to hold object state – Functionality that provides required services

Example – Implementation of Gear Box Data Structure – Mechanical structure of gear box Functionality – Mechanism to change gear

Example – Implementation of Address Book in a Phone Data Structure – SIM card Functionality – Read/write circuitry