Basic C++ lectures 1 and 2MSc Bioinformatics Basic C++

Slides:



Advertisements
Similar presentations
C++ Introduction.
Advertisements

C++ Language Fundamentals. 2 Contents 1. Introduction to C++ 2. Basic syntax rules 3. Declaring and using variables.
Introduction to Programming in C++ John Galletly.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Chapter 3: Beginning Problem Solving Concepts for the Computer Programming Computer Programming Skills /1436 Department of Computer Science.
Three types of computer languages
Advanced Object-Oriented Programming Features
1 ENERGY 211 / CME 211 Lecture 2 September 24, 2008.
 2003 Prentice Hall, Inc. All rights reserved. 1 Machine Languages, Assembly Languages, and High-level Languages Three types of computer languages 1.Machine.
Getting Started Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National.
C++ Training Datascope Lawrence D’Antonio Lecture 1 Quiz 1.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
 2007 Pearson Education, Inc. All rights reserved C++ as a Better C; Introducing Object Technology.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
CSE : Programming in C Instructor: Lei Wang Office: Dreese Lab 474 Office Hour: Friday.
Introduction to C. A Brief History Created by Dennis Ritchie at AT&T Labs in 1972 Originally created to design and support the Unix operating system.
Lecture 6: Polymorphism - The fourth pillar of OOP - 1.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Languages and tools. BY SA machine code.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Programming Languages and Paradigms Object-Oriented Programming.
Introduction to C Programming. A Brief History u Created by Dennis Ritchie at AT&T Labs in 1972 u Originally created to design and support the Unix operating.
Programming Design Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
COMPUTER PROGRAMMING. Data Types “Hello world” program Does it do a useful work? Writing several lines of code. Compiling the program. Executing the program.
Bjarne Stroustrup began work on "C with Classes" in The idea of creating a new language originated from Stroustrup's experience in programming for.
High-Level Programming Languages: C++
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction By: Dr. Javad Razjouyan. Programming Languages.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
CSE 2541 – Advanced C Programming Instructor: Yang Zhang
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
The Java Programming Language
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Computer Concepts 2014 Chapter 12 Computer Programming.
Introduction to C++ Programming Language
Java Programming, Second Edition Chapter One Creating Your First Java Program.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 24P. 1Winter Quarter C++ Lecture 24.
CSE 2541 – Advanced C Programming. Course info Prereq – CSE 2221 or CSE 222 Co-req – CSE 2231 Website
Introduction to Object Oriented Programming CMSC 331.
Introduction to C++ Shirley Moore
CS CS CS IA: Procedural Programming CS IB: Object-Oriented Programming.
Prepared by: Elsy Torres Shajida Berry Siobhan Westby.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory.
I Power Higher Computing Software Development Development Languages and Environments.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 05, 2005 Lecture Number: 4.
1 Lecture 6: Polymorphism - The fourth pillar of OOP -
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
1.
Principles of Object-Oriented Software Development The language C++
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
First Compilation Rudra Dutta CSC Spring 2007, Section 001.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
ISBN Chapter 12 Support for Object-Oriented Programming.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
C++ Programming Chapter 1 Programming & Programs.
Computer Programming II Lecture 5. Introduction to Object Oriented Programming (OOP) - There are two common programming methods : procedural programming.
KYC - Know your compiler Introduction to GCC
Before You Begin Nahla Abuel-ola /WIT.
Computer Programming Techniques Semester 1, 1998
جامعة البحر الاحمر كلية العلوم التطبيقية قسم الفيزياء التطبيقية الفصل الداسي الثاني IIالمقرر: حاسوب د. خالد عثمان العالم.
جامعة البحر الاحمر كلية العلوم التطبيقية قسمي الحاسوب وتقنية المعلومات الفصل الداسي الثاني المقرر: اساليب برمجة 1 محاضرة رقم 1 د. خالد عثمان العالم.
Lecture 6: Polymorphism
Presentation transcript:

Basic C++ lectures 1 and 2MSc Bioinformatics Basic C++

Basic C++ lectures 1 and 2MSc Bioinformatics Introduction Daniel Soto phone: address:Departament de Tecnologia Desp.374 Estació de França Passeig de Circumval·lació, Barcelona

Basic C++ lectures 1 and 2MSc Bioinformatics Introduction  Philosophy: learn to program with objects  Bibliography The C++ Programming Language, 3rd Edition by Bjarne Stroustrup. Addison Wesley Professional. “Aprenda C++ como si estuviera en primero” manualcpp.pdf

Basic C++ lectures 1 and 2MSc Bioinformatics Programming Languages Machine Languages Assembly Languages High-Level Languages LOAD A ADD B STORE C C=A+B

Basic C++ lectures 1 and 2MSc Bioinformatics Programming paradigms  Imperative  Declarative  Functional  Object-Oriented

Basic C++ lectures 1 and 2MSc Bioinformatics Evolution of High-Level Programming Languages  Functions and Methods  Libraries (packages, units, etc.)  Abstract Data Types  Objects

Basic C++ lectures 1 and 2MSc Bioinformatics C++ language  History  1980, creation of different flavours of “C with Classes”  1983, C++ evolution from C with inspiration in Simula67  1991, ANSI C++  C++ vs. C C was chosen as the base language for C++ because it:  is versatile, terse, and relatively low-level;  is adequate for most systems programming tasks;  runs everywhere and on everything; and  fits into the UNIX programming environment.

Basic C++ lectures 1 and 2MSc Bioinformatics C++ language  What is C++? C++ is a general-purpose programming language with a bias towards systems programming that:  is a better C,  supports data abstraction,  supports object-oriented programming, and  supports generic programming. C is retained as a subset inside C++ (this is not completely true!)

Basic C++ lectures 1 and 2MSc Bioinformatics C++ language  First program (C-style): #include int main() { printf("Hello world!\n"); } ;  First program (Pure C++-style): #include int main() { std::cout << "Hello world!\n"; } ;

Basic C++ lectures 1 and 2MSc Bioinformatics Compilation hello.o compile a.out a.exe hello.cpp C++ runtime Link Source FileObject FileExecutable Edit g++ hello.cpp

Basic C++ lectures 1 and 2MSc Bioinformatics C/C++ Compatibility  General:  C++ provides the // comments // a comment return a; // another comment  C Code that is not C++:  Functions in C++ have strict syntax main() {} // Valid in C, not valid in C++ int main() {;} // Valid in C++  Default types not assumed const a=7; // In C is type int, not in C++  Several new keywords in C++:  class, this, throw, public, protected, private, virtual, true, false, template, inline, friend, new …

Basic C++ lectures 1 and 2MSc Bioinformatics Summary  C++ is a evolution of C. We can continue to use C syntax. Formal variations exist. We need to use a different compiler and new file extension. A new programming paradigm is integrated into it.

Basic C++ lectures 1 and 2MSc Bioinformatics Summary  The paradigm of Object-Oriented Programming

Basic C++ lectures 1 and 2MSc Bioinformatics OOP: Objective  Say to a machine what it need to do (using objects).  In general this is programming

Basic C++ lectures 1 and 2MSc Bioinformatics OOP: approach  We can view a program as a “object”  This object is the medium to do work using a machine A

Basic C++ lectures 1 and 2MSc Bioinformatics OOP: approach  Is the Object-Oriented Programming a thing like…  Cooking programs with objects?

Basic C++ lectures 1 and 2MSc Bioinformatics OOP: approach  Create programs with pieces?  Work with programs?

Basic C++ lectures 1 and 2MSc Bioinformatics OOP: concepts  Object: a mix of data and procedures  Abstraction: view only a partial view of a thing  Message interchange: how to object delegates a task to other object  Class: the model of the object  Instance: one agent (the object)  Heritage: How to an object is a “derivate” from another object  Polymorphism: Different views of the same object