C++ Programming Language Lecture 1 Introduction

Similar documents
Chapter 1 Introduction to Computers and C++ Programming

0 Introduction: Computer systems and program development

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

Fundamentals of Programming. Lecture 1: Introduction to C Programming

by Pearson Education, Inc. All Rights Reserved.

CS 241 Computer Programming. Introduction. Teacher Assistant. Hadeel Al-Ateeq

Introduction to C++ Programming. Adhi Harmoko S, M.Komp

Chapter 1 Introduction to Computers and C++ Programming

Basic Computer Programming for ISNE. Santi Phithakkitnukoon ผศ.ดร.ส นต พ ท กษ ก จน ก ร

INTRODUCTION TO THE COURSE

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved.

Chapter 1 Overview of Programming and Problem Solving By C.K. Liang

Chapter 1 Introduction to Computers and C++ Programming

Chapter 1: Introduction to Computers and Programming

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

(0) introduction to the course. how to learn a programming language. (0) course structure

INFS 214: Introduction to Computing

Internet and Visual Basic Pearson Education, Inc. All rights reserved.

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Introduction to Computers

Instructor. Mehmet Zeki COSKUN Assistant Professor at the Geodesy & Photogrammetry, Civil Eng. (212)

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

These all slide pages are selected from C How to Program, 5/e and 7/e Asst.Prof.Dr.Mahmut YALCIN

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

Module 1: Introduction

Chapter 1: Introduction

Module 1: Introduction. What is an Operating System?

Programming 1 - Honors

Software Concepts. It is a translator that converts high level language to machine level language.

IS 0020 Program Design and Software Tools

Computer Fundamentals

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Fundamentals of Programming Session 2

Structured Languages. Rahul Deodhar

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 1

Fundamentals of Programming (C)

Chapter 1 Introduction to Computers and Programming

Chapter 1: Why Program? Computers and Programming. Why Program?

Introduction to Programming

SCSP Programming Technique C

OPERATING SYSTEMS OVERVIEW

Computer Principles and Components 1

Introduction to Java Programming

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Introduction to Computing using C++ Biomedical applications WELCOME TO CIS 1.5. Introduction to the course. Course structure

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

last time in cs recitations. computer commands. today s topics.

Lecture 1: Preliminaries

Chapter 1: Introduction

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Part (04) Introduction to Programming

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

Welcome (back) to CS1007!

Fundamentals of Programming Session 1

Introduction. Arizona State University 1

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

Unit 2 : Computer and Operating System Structure

CHAPTER 1 Introduction to Computers and Java

Computer Fundamentals

Module 1: Introduction

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

Outline. Program development cycle. Algorithms development and representation. Examples.

Java and Software Design

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

CSI31 Introduction to Computer Programming I. Dr. Sharon Persinger Fall

Fundamentals of Programming Session 1

Computer Programming-1 CSC 111. Chapter 1 : Introduction

OPERATING SYSTEM. Functions of Operating System:

Object Oriented Design

Contents. Today's Topic: Introduction to Operating Systems

Introduction to Operating Systems (Part II)

Week 1 Introduction to Programming

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

St. Benedict s High School. Computing Science. Software Design & Development. (Part 2 Computer Architecture) National 5

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

Introduction to Computers, the Internet and the World Wide Web

CSC180: Lecture 2. Wael Aboulsaadat.

Low-Level Languages. Computer Programs and Programming Languages

Chapter 1 INTRODUCTION

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

OPERATING SYSTEMS. P. PRAVEEN Asst.Prof, CSE

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

C H A P T E R 1. Introduction to Computers and Programming

Introduction to Operating System

1. A folder inside a folder is called. a) Mini Directory b) Sub Directory c) Root Folder d) Child Folder e) None of these

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Lecture 1: CS2400 Introduction to Computer Science

ENT 189: COMPUTER PROGRAMMING. H/P: Home page:

Chapter 1: Introduction

CSC 453 Operating Systems

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

Transcription:

C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department

Introduction In this course you will learn C++ and the legacy C code. It is your first step in the software programming world. It will provide you with the needed tools and background to learn objectoriented programming. The Hashemite University 2

What is a Computer? Computer A device capable of performing computations and making logical decisions in a very fast manner. Computer programs Sets of instructions that control a computer s processing of data Hardware Various devices comprising a computer Examples: keyboard, screen, mouse, disks, memory, CD-ROM, and processing units Software Programs that run a computer The Hashemite University 3

Computer Organization Six logical units in every computer: Input unit Obtains information from input devices (keyboard, mouse) Output unit Outputs information (to screen, to printer, to control other devices) Memory unit Rapid access, low capacity, stores input information Arithmetic and logic unit (ALU) Performs arithmetic calculations and logic decisions Central processing unit (CPU) Supervises and coordinates the other sections of the computer Secondary storage unit Cheap, long-term, high-capacity storage, stores inactive programs The Hashemite University 4

Evolution of Operating Systems Batch processing Do only one job or task or program at a time while processing data in groups or batches. Operating systems Manage transitions between jobs. Increased throughput : Amount of work computers process. Still batch processing. Multiprogramming Many jobs or tasks sharing a computer s resources Timesharing Special case of multiprogramming. Access computer resources via terminals. Perform a small portion of one user s job then moves on to service the next user The Hashemite University 5

Types of Computing Personal computers Economical enough for individual Distributed computing Organizations computing is distributed over networks Client/server computing Sharing of information, across computer networks, between file servers and clients (personal computers) The Hashemite University 6

Programming Languages I Three types of programming languages Machine languages Strings of numbers giving machine specific instructions. Computers can only understand this language. Example: 10100011001001 11111111111111 00000001110100 Machine dependent: every machine has its own language. Hard to be understood by humans. Hard to be used in programming. Too slow and tedious. Error prone. The Hashemite University 7

Programming Languages II Assembly languages English-like abbreviations representing elementary computer operations so it is easier to be understood by humans. Translated or converted into machine language via assemblers. Also, it is slow and hard to be used in programming. Machine dependent. Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY The Hashemite University 8

Programming Languages III High-level languages Similar to everyday English, use mathematical notations. Translated into machine language via compilers (compile the whole program at once). Interpreters are used to execute high level languages without need to compile them into machine language and it execute single line at a time. Compiled programs are faster than the interpreted ones. Fast and easy for programming. Machine independent. Example: grosspay = basepay + overtimepay The Hashemite University 9

Example of High-level Languages Other high-level languages C and C++. Java Visual basic 6/.Net C#.Net FORTRAN Used in scientific and engineering applications COBOL Used to manipulate large amounts of data Pascal Used to teach structured programming The Hashemite University 10

History of C and C++ C++ evolved from C C evolved from two other programming languages, BCPL and B. ANSI C (American National Standard Institution) Established worldwide standards for C programming C++ spruces up C Provides capabilities for object-oriented programming Objects are reusable software components that model things in the real world Object-oriented programs are easy to understand, correct and modify The Hashemite University 11

C++ Standard Library C++ programs Built from pieces called classes and functions. C++ standard library Provides rich collections of existing classes and functions for all programmers to use. The Hashemite University 12

Basics of a Typical C++ Environment Editor Disk Program is created in the editor and stored on disk. Phases of C++ Programs: 1. Edit (create.h and.cpp files) 2. Preprocess 3. Compile 4. Link 5. Load 6. Execute Preprocessor Compiler Linker Loader Disk CPU Primary Memory Primary Memory Preprocessor program processes the code. Compiler creates object code and stores it on disk. Linker links the object code with the libraries, creates a.out and stores it on disk Loader puts program in memory. CPU takes each instruction and executes it, possibly storing new data values as the program executes. The Hashemite University. 13 Disk Disk Disk.....

Hardware Trends Every year or two computers approximately double The amount of memory they contain Memory used to execute programs The amount of secondary storage they contain Secondary storage (such as disk storage) is used to to hold programs and data over time Their processor speeds The speed at which computers execute their programs The Hashemite University 14

Memory Concepts Variable names Correspond to locations in the computer's memory Every variable has a name, a type, a size and a value Whenever a new value is placed into a variable, it replaces the previous value - it is destroyed Reading variables from memory does not change them A visual representation that we will always use: integer1 45 The Hashemite University 15

Additional Notes Check the Black Board to get your copy of the lecture. The lecture covers the following sections from the book: Section 1.1 1.15 and 1.23. The Hashemite University 16