C++.

Slides:



Advertisements
Similar presentations
When is Orientated Programming NOT? Mike Fitzpatrick.
Advertisements

Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
CS-2135 Object Oriented Programming
Object Oriented System Development with VB .NET
Object-oriented Programming Concepts
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
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?
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Object Oriented Programming
Object Oriented Software Development
OOP- OBJECT OBJECT PROGRAMMING By KRATI SHARMA 02 XI-B ✏✏✏✏ ☺☻☺☻☺☻☺ ✏✏✏✏
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Introduction to Object-oriented programming and software development Lecture 1.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
BCS 2143 Introduction to Object Oriented and Software Development.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
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.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 7 Objects and Classes 1 Fall 2012 CS2302: Programming Principles.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Object Oriented Programming with C++/ Session 1/ 1 of 50 Basic Object Oriented Concepts Session 1.
MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE PRESENTATIONONC++PRESENTATIONONC++
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Chapter -1 CONCEPT OF OBJECT ORIENTED PROGRAMMING It’s Need & Requirement :- There are many programming languages before Object Oriented Programming language.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Object-Oriented Programming. Objectives Distinguish between object-oriented and procedure-oriented design. Define the terms class and object. Distinguish.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
Classes, Interfaces and Packages
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Object Oriented Programming Session # 03.  Abstraction: Process of forming of general and relevant information from a complex scenarios.  Encapsulation:
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
Computer Programming II Lecture 5. Introduction to Object Oriented Programming (OOP) - There are two common programming methods : procedural programming.
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.
Object-Oriented Programming Concepts
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
Programming Logic and Design Seventh Edition
JAVA By Waqas.
CHAPTER 5 GENERAL OOP CONCEPTS.
Classes and OOP.
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Introduction to C++ Introduced by Bjarne Stroustrup of AT&T’s Bell Laboratories in mid-1980’s Based on C C++ extended C to support object-oriented programming.
OBJECT ORIENTED PROGRAMMING overview
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Object Oriented Analysis and Design
Basic Object Oriented Approach
Introduction to C++ Introduced by Bjarne Stroustrup of AT&T’s Bell Laboratories in mid-1980’s Based on C C++ extended C to support object-oriented programming.
Principles of object – oriented programming UNIT-1 Chapter-1.
CPS120: Introduction to Computer Science
Workshop for Programming And Systems Management Teachers
Object-Oriented PHP (1)
CPS120: Introduction to Computer Science
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
C++ Object Oriented 1.
Presentation transcript:

C++

CHAPTER 1 INTRODUCTION

Session Objectives Introduction to Objects Define Class & Objects Characteristics of OOPS History of C++ Difference Between C & C++ C++ Programming Structure

All around us in the real world are objects. Each object has certain characteristics and exhibits certain behaviour

Object Oriented Programming Based On OOP's Concept Object Oriented Programming

OBJECT Data Color : Black Year : 2008 Actions Start Stop Accelerate

The Object-Oriented Approach - III Sales Accounts Personnel The real world around is full of objects .We can consider both living beings as well as things as objects.For example,the different departments in a company are objects.

Why OOP’s Concept are Used? The drawbacks of Traditional Programming approach are Unmanageable Programs Code Reusability not Optimum Problems in Modification of Data Difficulty in Implementation

Object – Oriented Programming Here the application has to implement the entities as they are seen in real life and associate actions and attributes with each. Accounts Data Employee details Salary statements Bills Vouchers Reciepts Functions Calculate salary Pay salary Pay bills Tally accounts Transact with banks

Benefits of Object Oriented Programming approach are - OOP offers better implementation OOP offers better data security OOP offers better code reusability OOP offers more flexibility OOP offers better manageable programs Large complexity in the software development can be easily managed User defined datatypes can be easily constructed

Object Oriented Approach Problem Identification Analysis Maintenance Design Implementation Development Testing

APPLICATIONS OF OOP's Data acquisition Systems Client/Server Computing Object –Oriented Database applications Artificial Intelligence and expert systems systems such as process control, temperature control etc. GUI based system such as Windows Applications Computer Aided Design and manufacturing Systems

Characteristics of Oops Encapsulation Data Abstraction Inheritance Polymorphism Class

Encapsulation Grouping of data and methods into a single entity is known as Data Encapsulation It is a technical name for information hiding. (i.e data hiding or data security)

Encapsulation Class Private Not accessible from outside class Public

Abstraction Data abstraction enhances security as use of data is restricted to certain functions only. Abstraction is more used where you want only a certain number of functions/methods are accessing data.

For Example Class Attributes Methods Data abstraction is a process of identifying properties and methods related much to a particular entity as relevant to the application Class Attributes Methods

It is the process of creating a new class from an existing class Inheritance It is the process of creating a new class from an existing class

Reusability can be achieved through inheritance Animals Insects Mammals Reptiles Amphibians Humans Non-Humans

Reusability Programs can be broken into reusable objects Shape Existing classes can be used with additional features Shape

Benefits of Inheritance Software Reuse Code Sharing Improved Reliability Rapid Prototyping

Polymorphism polymorphism allows a programmer to purse a course of action by sending a message to an object without concerning about how the software system is to implement the action Simply defined as “Same thing can behave different ones”

Class - Artiste Dancer Poet Sculptor Class : Shape Methods : Draw Move Initialize Subclasses

Classes A class is what defines all the data members and the methods that an object should have. The class defines the characteristics that the object will possess; it could also be referred to as a blueprint of the object.

Properties Vertices Border Color Fill Color Methods Draw Erase Move For Example Polygon objects Polygon class Properties Vertices Border Color Fill Color Abstract Methods Draw Erase Move into

CLASS + DATA FUNCTION Simply defined as a structure that combines the objects with some attributes (data structure) and some behavior (operation)

Access Specifiers of a Class Not accessible from outside the class Private Data or functions Public Accessible from outside the class Data or functions

To access the member data and member function defined inside the class C++ OBJECT To access the member data and member function defined inside the class

Object Oriented Languages Some of the leading object oriented languages are: C++ Smalltalk Eiffel CLOS Java

HISTORY OF C++ Author of C++ is Bjarne stroustrup He invented this language in 1980's at AT&T Bell Laboratories All the C programs can be run successfully using C++ compiler

ORIGIN OF C++ C++ was designed using two languages such as “C” Language which gives the low-level feature and “Simula67” provides the class concept.

DIFFRERENCE BETWEEN C & C++ C Language C++ Language Procedural Programming Language Object Oriented Programming Language Headerfile : #include<stdio.h> #include<iostream.h> “\n” is used to go to the next line we can use endl statement Function prototypes are optional All Functions must be protyped Local variables declared only the start of a C program It can be declared anywhere in a program, before they are used Return type for a function is optional Return type must be specified Do not permit data Hiding They permit data hiding Bydefault structure members are public class members are private We can call a main() function within a program This is not allowed

Summary Each class specification starts with the keyword “class” The Class Specification must always end with a semicolon (;) Data abstraction is the ability to create user-defined data types for modeling real world objects using built-in data types. Classes are used for data abstraction by hiding the implementation of a type in the “private” part. Polymorphism in Greek word means “Many Forms”

Summary A class is an enhanced structure that provides Object-Oriented Features of C++ An object is an instance of a class which combines both data and functions together. Encapsulation is the process of combining member functions and the data it manipulates and keeps them safe from outside interferrence The three access specifiers in a class are private,public,protected By default all members declared inside a class are private to that class C++ provides two pre-defined objects cin and cout for handling input and output

EXERCISES Describe the Basic concepts of OOPS? List the various applications of Object oriented Programming? Explain briefly Classes & Objects? State the use of #include directive in C++? List the various benefits of Object Oriented Programming?