PROGRAMMING WITH C ++.

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

Introduction to Programming in C++ John Galletly.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 1 Introduction to Computers and C++ Programming.
Three types of computer languages
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X 1 Chapter 1 Introduction to Computers, Programs,
 2007 Pearson Education, Inc. All rights reserved C++ as a Better C; Introducing Object Technology.
C++ fundamentals.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Computer Science 210 Computer Organization Introduction to C.
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANCI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Programming Design Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Introduction to Computers and C++ Programming.
Introduction of C++ language. C++ Predecessors Early high level languages or programming languages were written to address a particular kind of computing.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
CSCI 171 Presentation 1. Computer Software System Software –Operating systems –Utility programs –Language compilers Application Software.
CSCI 130 Chapter 1. History of C Bell Telephone Laboratories (1972) Dennis Ritchie (also created UNIX) A - B - C.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Copyright © 2015 Pearson Education, Ltd.. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Introduction to Computers and C++ Programming.
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Chapter 1 Introduction to Computer and C++ Programming.
Copyright © 2015 Pearson Education, Ltd.. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Mohamed Iqbal Pallipurath Slide 1. Mohamed Iqbal Pallipurath Slide 2 Basics Introduction to Computers and C++ Programming.
Rossella Lau Lecture 1, DCO10105, Semester B, DCO10105 Object-Oriented Programming and Design  Lecture 1: Introduction What this course is about:
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 24P. 1Winter Quarter C++ Lecture 24.
Course Title: Introduction to C++ Course Instructor: ADEEL ANJUM Chapter No: 01 1 BY ADEEL ANJUM (MCS, CCNA,WEB DEVELOPER)
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
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.
Copyright © 2012 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 1 Introduction to Computers and C++ Programming.
Learners Support Publications Introduction to C++
Course Title Object Oriented Programming with C++ instructor ADEEL ANJUM Chapter No: 03 Conditional statement 1 BY ADEEL ANJUM (MSc-cs, CCNA,WEB DEVELOPER)
Introduction to C Programming Language. History of C  C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s  Successor of: ALGOL.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. Chapter 2 C++ Basics.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
Fundamentals of Programming C++ Programming Language CS 1400 Dennis A. Fairclough Version 1.1 C++ Programming Language CS 1400 Dennis A. Fairclough Version.
Introduction to computer programming
Software Engineering Algorithms, Compilers, & Lifecycle.
C++ Programming Chapter 1 Programming & Programs.
Structured programming 1 st stage By Heba.A Raheem Assist Lecturer College of Sciences/Computer Sciences Department.
Unit -1 Objectives: Exposure to basics of object oriented mode, C++ programming and I/O in C++ INTRODUCTION: Differences Between C and C++, The Object.
Basic concepts of C++ Presented by Prof. Satyajit De
Introduction to Computers and C++ Programming
Introduction to Computers and C++ Programming
Introduction to Computers and C++ Programming
C Programming Hardik H. Maheta.
C Language By Sra Sontisirikit
History of ‘C’ Root of the morden language is ALGOL It’s first
Overview of C.
Introduction to C Programming Language
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
Welcome In The World Of ‘C’.  TEXT BOOK: Programming in ANSI ‘C By: E Balagurusamy. TMH  Reference Books: 1) The ‘C Programming Language By: Kernighan.
Computer science By/ Midhat Mohiey. Introduction to Programming using C ++ 2.
جامعة البحر الاحمر كلية العلوم التطبيقية قسم الفيزياء التطبيقية الفصل الداسي الثاني IIالمقرر: حاسوب د. خالد عثمان العالم.
សេចក្តីផ្តើមពី Programming
جامعة البحر الاحمر كلية العلوم التطبيقية قسمي الحاسوب وتقنية المعلومات الفصل الداسي الثاني المقرر: اساليب برمجة 1 محاضرة رقم 1 د. خالد عثمان العالم.
The Programming Process
Principles of object – oriented programming UNIT-1 Chapter-1.
Overview of Programming Paradigms
C Programming Language
CPP Programming Language
Lecture 8 Object Oriented Programming (OOP)
Presentation transcript:

PROGRAMMING WITH C ++

WHAT IS A LANGUAGE & WHY WE NEED

PROGRAMMING LANGUAGES: BASIC COBOL PYTHON FORTRAN LISP PASCAL ADA PERL RUBY PROLOG SCIENTIFIC & ENGINEERING PURPOSE

ANSI----->AMERICAN NATIONAL STANDARD INSTITUTE ALGOL-60 CPL BCPL----> MARTIN RICHARDS B---> KEN THOMPSON C LANGUAGE

INTRODUCTION TO C , C++ C LANGUAGE WAS DESIGNED BY “DENNIS RITCHIE IN 1972 at AT & T BELL LABORATORIES C IS A STRUCTURED PROGRAMMING LANGUAGES IT IS USED TO DESIGN DIFFERENT APPLICATIONS C ++ IS AN EXTENSION OF C LANGUAGE C ++ WAS DESIGNED BY “BJARNE STROUSTRUP” IN 1980

IT IS MACHINE DEPENDENT LANGUAGE C++ IS 00PS( S---> SYSTEM) DENNIS RITCHIE BJARNE STROUSTRUP

APPLICATIONS OF C ++ WHEN ANY NEW FEATURE IS NEEDED TO IMPLEMENT, VERY EASY TO ADD TO EXISTING STRUCTURE C ++ WILL REPLACE C-LANGUAGE IN FUTURE

FEATURES OF OOPS

OBJECT AN OBJECT WHICH EXISTS PHYSICALLY IN THE WORLD AN OBJECT WILL HAVE BEHAVIOUR BEHAVIOUR IS REPRESENTED BY PROPERTIES & ACTIONS EX: human NAME, AGE GENDER PROPERTIES WALK, TALK, DANCE, SING ACTIONS

CLASS A CLASS IS A MODEL OR A PLAN TO CREATE AN OBJECT A CLASS IS A BLUE PRINT OF AN OBJECT

CLASS & OBJECT

INHERITANCE CREATING A NEW CLASS FROM AN EXISTING CLASS. TEACHER EMPLOYEE PRINCIPAL DEAN INCHARGE

DATA ABSTRACTION DATA ENCAPSULATION HIDING UNNECESSARY INFORMATION FROM THE USER & GIVING RELEVANT DATA. DISPLAYS THE INFORMATION WHEN THE USER REQUESTS. DATA ENCAPSULATION

ABSTRACTION & ENCAPSULATION

POLYMORPHISM IT IS CAME FROM 2 GREEK WORDS WHICH MEANS “ MANY FORMS ”.

DYNAMIC BINDING IT MEANS A BLOCK OF CODE WILL BE EXECUTED WHENEVER A USER CALLS. IT IS ALSO CALLED AS “dynamic-dispacth”, “late binding”, “runtime binding”.

STRUCTURE OF C++ DOCUMENTATION SECTION //-------------------- /*--------------------*/ LINKING SECTION----------->HEADER FILES DEFINITION SECTION--->TO DECLARE SYMBOLS MAIN FUNCTION-------> LOGIC TO GIVE COMMENTS

WORKING WITH C++ TO WORK WITH C++ WE NEED AN EDITOR: TURBO C++ We need an editor to type, save, open, compile & to run a program Double click this icon on desktop To start c + + programming

WE WILL SEE two small PROGRAMs IN C++

AFTER WRITING THE PROGRAM WE HAVE TO COMPILE THE PROGRAM TO CHECK ERRORS. AFTER COMPILATION WE NEED TO RUN THE PROGRAM FOR OUTPUT. RUN----------> ALT + F9 ALT + F5 CTRL + F9

#INCLUDE<IOSTREAM.H>: #--------> PREPOSESSOR INCLUDE-----> INCLUDING IOSTREAM FILE IOSTREAM------> IOSTREAM IS AN HEADER FILE THAT CONTAINS FILES LIKE: INPUT & OUTPUT STATEMENTS. EVERY C++ PROGRAM SHOULD HAVE ONE HEADER FILE. MAIN(): EVERY C++ PROGRAM SHOULD HAVE ONE MAIN(), THE PROGRAM EXECUTION STARTS FROM MAIN().

OUTPUT OPERATOR: COUT----->TO PRINT << -------> INSERTION OR PUT TO OPERATOR. INPUT OPERATOR: CIN---> TO TAKE INPUT >>-----> EXTRACTION OPERATOR

RETURN TYPE: EVERY C++ PROGRAM SHOULD END WITH RETURN 0 RETURN TYPE: EVERY C++ PROGRAM SHOULD END WITH RETURN 0. OTHERWISE, IT GIVES YOU A WARNING. CASCADING I/O OPERATOR: WE CAN USE THE INSERTION OPERATOR (<<) TWO TIMES IN A SINGLE STATEMENT.