Introduction to C++ Shirley Moore

Slides:



Advertisements
Similar presentations
1 l Inheritance Basics l Programming with Inheritance l Dynamic Binding and Polymorphism Inheritance.
Advertisements

CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Classes & Objects Computer Science I Last updated 9/30/10.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
ITEC200 – Week03 Inheritance and Class Hierarchies.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
1 Chapter 7 l Inheritance Basics l Programming with Inheritance l Dynamic Binding and Polymorphism Inheritance.
Advanced Object-Oriented Programming Features
The Object Oriented Programming Languages (OOPL). Done by: Tayeb El Alaoui Supervised by: Dr Driss Kettani.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
CS 2511 Fall  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance  Polymorphism.
© 2006 Pearson Addison-Wesley. All rights reserved9 A-1 Chapter 9 Advanced Java Topics CS102 Sections 51 and 52 Marc Smith and Jim Ten Eyck Spring 2007.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Introduction To System Analysis and design
Programming Languages and Paradigms Object-Oriented Programming.
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.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Bjarne Stroustrup began work on "C with Classes" in The idea of creating a new language originated from Stroustrup's experience in programming for.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
A class in Java is a software construct that includes fields (also called data fields or class scope variables) to provide data specification, and methods.
 OOPLs  Help companies reduce complexity  Increase competition in open markets  Speeds up development  Improves maintenance, resusability, modifiability.
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Inheritance in the Java programming language J. W. Rider.
SNPL1 Woochang Lim What (Variable) + How (Function) = Object Objects are the physical and conceptual things we find in the universe around us. Object-Oriented.
Prepared by: Elsy Torres Shajida Berry Siobhan Westby.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Chapter 12 Support for Object-Oriented Programming.
Object-Oriented Programming Chapter Chapter
Chapter 10: Introduction to Inheritance. Objectives Learn about the concept of inheritance Extend classes Override superclass methods Call constructors.
ISBN Object-Oriented Programming Chapter Chapter
Principles of programming languages 10: Object oriented languages Isao Sasano Department of Information Science and Engineering.
CS212: Object Oriented Analysis and Design Lecture 16: Runtime Polymorphism.
Topics Inheritance introduction
Interfaces F What is an Interface? F Creating an Interface F Implementing an Interface F What is Marker Interface?
Introduction to OOP CPS235: Introduction.
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.
Inheritance and Polymorphism. Superclass and Subclass Inheritance defines a relationship between objects that share characteristics. It is a mechanism.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
Recap Introduction to Inheritance Inheritance in C++ IS-A Relationship Polymorphism in Inheritance Classes in Inheritance Visibility Rules Constructor.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Modern Programming Tools And Techniques-I
Inheritance Chapter 7 Inheritance Basics Programming with Inheritance
CS212: Object Oriented Analysis and Design
Inheritance AKEEL AHMED.
Object-Orientated Programming
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Inheritance Chapter 7 Inheritance Basics Programming with Inheritance
Inheritance Basics Programming with Inheritance
Lecture 22 Inheritance Richard Gesick.
Advanced Java Topics Chapter 9
Computer Programming with JAVA
Java – Inheritance.
Fundaments of Game Design
CIS 199 Final Review.
Chapter 11 Class Inheritance
The Object Paradigm Classes – Templates for creating objects
C++ Object Oriented 1.
Computer Science II for Majors
Presentation transcript:

Introduction to C++ Shirley Moore http://www.cs.utep.edu/svmoore/ svmoore@utep.edu CPS 5401, Fall 2013 http://svmoore.pbworks.com/

History of C++ Reference: www.cplusplus.com/ History going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis Stroustrup was working with the Simula 67 language, regarded as the first language to support the object-oriented programming paradigm, but it was too slow to be of practical use. Goal was to add object-oriented programming into the C language without sacrificing speed or low-level functionality. His language included classes, basic inheritance, inlining, default function arguments, and strong type checking in addition to all the features of the C language. In 1983, the name of the language was changed from C with Classes to C++. New features included virtual functions and function overloading. In 1985, Stroustrup’s The C++ Programming Language was published. Also in 1985, C++ was implemented as a commercial product. In 1990, The Annotated C++ Reference Manual was pubslished and Borland's Turbo C++ compiler was released as a commercial product. In 1998, the C++ standards committee published the first international standard for C++ ISO/IEC 14882:1998, informally known as C++98. In mid-2011, the new C++ standard (dubbed C++11) was finished. New features included a standard threading library.

Features of C++ C++ ...is an open ISO-standardized language. ...is a compiled language. ...is a strongly-typed unsafe language. ...supports both manifest and inferred typing. ...supports both static and dynamic type checking. ...offers many paradigm choices. ...is portable. ...is upwards compatible with C. ...has vast library support.

Classes Object-oriented programming concept A class is a construct that is used to create instances of itself – referred to as class instances or objects A class defines members that enable its instances to have state and behavior. Data field members (member variables or instance variables) enable a class instance to maintain state. Methods enable the behavior of class instances. Classes support information encapsulation. Classes define the type of their instances.

Inheritance Inheritance is a mechanism of reusing and extending existing classes, thus producing hierarchical relationships between them. A new class is derived from the base class. Can add new data members and member functions to the derived class. Can modify the implementation of existing member functions or data by overriding base class member functions or data in the newly derived class. Multiple inheritance allows you to create a derived class that inherits properties from more than one base class.

Polymorphic Functioins Polymorphic functions are functions that can be applied to objects of more than one type. In C++, polymorphic functions are implemented in two ways: Overloaded functions are statically bound at compile time. A virtual function is a function that can be called for a number of different user-defined types that are related through derivation. Virtual functions are bound dynamically at run time.

HPC Codes Written in C++ MPQC computational chemistry code www.mpqc.org C++ development version of GAMESS LAMMPS molecular dynamics code lammps.sandia.gov NAMD molecular dynamics code www.ks.uiuc.edu/Research/namd/ Object-oriented math libraries (parts written in Fortran and/or C and/or using code generators) PETSc Trilinos Many others