Prepared by: Elsy Torres Shajida Berry Siobhan Westby.

Slides:



Advertisements
Similar presentations
C++ Introduction.
Advertisements

Chapter 4 Computation Bjarne Stroustrup
Bjarne Stroustrup started work on C with Classes in 1979 at Bell Labs. In 1983 it was renamed C++.
CS0007: Introduction to Computer Programming Console Output, Variables, Literals, and Introduction to Type.
CS 211 Inheritance AAA.
Three types of computer languages
Compunet Corporation1 Programming with Visual Basic.NET Creating and Using Classes Lecture # 8 Tariq Ibn Aziz.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 15 - C++ As A "Better C" Outline 15.1Introduction.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
Chapter 13: Object-Oriented Programming
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Section 2 - More Basics. The char Data Type Data type of a single character Example char letter; letter = 'C';
A First Program Using C#
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Introduction to Object-oriented programming and software development Lecture 1.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
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.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 4: Continuing with C++ I/O Basics.
Introduction of C++ language. C++ Predecessors Early high level languages or programming languages were written to address a particular kind of computing.
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan Snd Term Nouf Aljaffan (C) CSC 1201 Course at KSU1.
CSC1201: PROGRAMMING LANGUAGE 2 Aseel Al Hadlaq 2nd Term
C++ Programming Basic Learning Prepared By The Smartpath Information systems
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
I Power Higher Computing Software Development Development Languages and Environments.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
WELCOME to III SEM Date: Class - ECE no of present : no of absent :
OOP using C Abstract data types How to accomplish the task??? Requirements Details Input, output, process Specify each task in terms of input.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
Program Organization Sequential Execution: One line done after the other Conditional Execution: If a test is true, one section is done, otherwise another.
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.
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
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:
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Course Title Object Oriented Programming with C++ instructor ADEEL ANJUM Chapter No: 03 Conditional statement 1 BY ADEEL ANJUM (MSc-cs, CCNA,WEB DEVELOPER)
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
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.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Fundamentals of Programming C++ Programming Language CS 1400 Dennis A. Fairclough Version 1.1 C++ Programming Language CS 1400 Dennis A. Fairclough Version.
Chapter 15 - C++ As A "Better C"
Introduction to C++ (Extensions to C)
Object-Orientated Programming
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.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
C++.
Object Oriented Analysis and Design
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
Procedural Programming
Object-Oriented Programming
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
Introduction to Computer Programming
Introduction to Data Structure
Presentation transcript:

Prepared by: Elsy Torres Shajida Berry Siobhan Westby

Basic Information Computer programmers have their own languages that pretty much make no sense to anybody else. C⁺⁺ being one of them. In 1980, Bjarne Stroustrup, from Bell labs, began the development of the C++ language, that would receive formally this name at the end of 1983, when its first manual was going to be published. In October 1985, the first commercial release of the language appeared as well as the first edition of the book "The C++ Programming Language" by Bjarne Stroustrup.

Basic Information During the 80s, the C++ language was being refined until it became a language with its own personality. All that with very few losses of compatibility with the code with C, and without resigning to its most important characteristics. In fact, the ANSI standard for the C language published in 1989 took good part of the contributions of C++ to structured programming.

Basic Features Like any other programming language, C++ uses data types to store values and information in. Here you can find a small list of the most used data types. Int (integer value) Float (decimal value) Char (a character, contains text) Bool (boolean, true or false)

Basic Features When you are coding and you want to store a value, you will have to know two things. First, what kind of data should the variable be able to handle? Second, what will the variable be called? This is how you declare those four data types. int ThisIsAIntegerValue; float ThisIsADecimalValue; char ThisIsACharacterVariable; bool ThisIsABoolean; As you can see you first write the data type, after that, it's name, and then you have to finish the declaring with a ";".

Basic Features C++ is a multiparadigm language. This allows developers to choose the programming style that is right for the task at hand. For example, a traditional procedural style may be appropriate for performing a simple task such as writing the code within a small member function. C++ software can be performance and memory efficient. For example, well-designed, object oriented software is normally comprehensible and therefore amenable to performance tuning. C++ is backward compatible with C. This is useful in very large legacy systems where the migration to C++ normally occurs a few subsystems at a time rather than all at once

Object-oriented programming languages: Objects: Object is the basic unit of object-oriented programming. Objects are identified by its unique name. An object represents a particular instance of a class. There can be more than one instance of an object. Each instance of an object can hold its own relevant data. An Object is a collection of data members and associated member functions also known as methods.

Classes: are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a Class. Thus a Class represent a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects becomes functions of the class and is referred to as Methods. No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.

Inheritance: is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, The new class that is formed is called derived class. Derived class is also known as a child class or sub class. It helps in reducing the overall code size of the program, which is an important concept in object-oriented programming

Data Abstraction: increases the power of programming language by creating user defined data types. It also represents the needed information in the program without presenting the details. Data Encapsulation: combines data and functions into a single unit called Class. When using it, data is not accessed directly; it is only accessible through the functions present inside the class. It enables the important concept of data hiding possible

Polymorphism: allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. It refers to a single function or multi-functioning operator performing in different ways. Overloading: is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an exiting operator or function begins to operate on new data type, or class, it is understood to be overloaded. Reusability: This term refers to the ability for multiple programmers to use the same written and debugged existing class of data. This is a time saving device and adds code efficiency to the language.

Advantages Because C++ is an object-oriented programming language, it is designed to allow the creation and manipulation of objects from the problem domain. allows programmers to operate at a higher level of abstraction. A good abstraction allows users to use an object in a relatively safe and predictable manner

Example Printing Hello World! The first line in main uses the std::cout object to print the string (sequence of characters) Hello World! and end the line: std::cout << "Hello World!\n"; Adding Intergers #include using namespace std; int main() { int a = 3, b = 5; cout << a << '+' << b << '=' << (a+b); return 0; }

Thank You