Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 1: Getting Started by George Lamperti & BU Faculty.

Slides:



Advertisements
Similar presentations
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Advertisements

Lecture 1: Overview of Computers & Programming
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
The Analytical Engine Module 6 Program Translation.
Chapter 1 Introduction to Object- Oriented Programming and Problem Solving.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Computers: Tools for an Information Age
Programming Languages Structure
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 1: An Overview of Computers and Programming Languages
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Introduction Algorithms and Programming. Computer Programming  A form of problem solving  Or, more accurately, a way to solve problems  What we will.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
C++ Crash Course Class 1 What is programming?. What’s this course about? Goal: Be able to design, write and run simple programs in C++ on a UNIX machine.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1 An Overview of Computers and Programming Languages.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
CIS Computer Programming Logic
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Programming 1 1. Introduction to object oriented programming and problem-solving.
Lesson 1b: Computer Systems and Program Development CPS118.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Introduction to Computers and Programming.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 2.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1 An Overview of Computers and Programming Languages.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming using Fortran 77.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Chapter 1: Introduction to Computers and Programming.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Java Programming: From the Ground Up
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
Computer Programming.
Chapter 1: An Overview of Computers and Programming Languages
Presentation transcript:

Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 1: Getting Started by George Lamperti & BU Faculty

Today We Are Going To: Briefly discuss the origins of C++ Briefly discuss the origins of C++ Create a usable working environment Create a usable working environment Write a simple program Write a simple program Discuss some of the things that must happen in order for a program to execute Discuss some of the things that must happen in order for a program to execute

Topic C++ Background

Programming Computer: device used for calculation; represent numbers with electrical signals Computer: device used for calculation; represent numbers with electrical signals First machines: hard-wired for a specific kind of work First machines: hard-wired for a specific kind of work Ability to modify calculations based on software signals opened new horizons Ability to modify calculations based on software signals opened new horizons Have learned to represent ANYTHING mathematically → Universal Machines Have learned to represent ANYTHING mathematically → Universal Machines

Languages: Generations machine: binary codes ( ) machine: binary codes ( ) assembly: basically mnemonics for binary instructions (ADD X, Y) assembly: basically mnemonics for binary instructions (ADD X, Y) high-level languages: C, C++, Java high-level languages: C, C++, Java fourth-generation: Perl, VisualBasic, C#, Dot-Net Framework fourth-generation: Perl, VisualBasic, C#, Dot-Net Framework

Languages: Styles Interpreted: instructions associated with pre-compiled machine code; executed linearly at time of invocation Interpreted: instructions associated with pre-compiled machine code; executed linearly at time of invocation instructions are machine-independent instructions are machine-independent typically easier to read typically easier to read Compiled: instructions are translated into machine code as a unit Compiled: instructions are translated into machine code as a unit compiler optimizes machine code compiler optimizes machine code compiler catches SYNTAX errors compiler catches SYNTAX errors

Languages: Styles “Simple” programming: code executed linearly, variables created automatically “Simple” programming: code executed linearly, variables created automatically Basic, FORTRAN, COBOL (old style) Basic, FORTRAN, COBOL (old style) Structured programming: rules imposed on order of statements Structured programming: rules imposed on order of statements Pascal, C, Structure COBOL, PL/1 Pascal, C, Structure COBOL, PL/1 Object-oriented programming: structure includes concept of object definitions Object-oriented programming: structure includes concept of object definitions C++, Java, C#/Dot Net C++, Java, C#/Dot Net

What is C++? High-level, object-oriented language High-level, object-oriented language Compiled language Compiled language Represents an extension of C Represents an extension of C positive: still have access to C functions positive: still have access to C functions negative: still carries some of C “baggage” negative: still carries some of C “baggage”

Object Orientation Purpose of programming: create models of the real world that solve problems Purpose of programming: create models of the real world that solve problems Object Orientation: A set of rules imposed on a programming language. Object Orientation: A set of rules imposed on a programming language. Rules allow for better models. Rules allow for better models. OUR WORK will focus on the basics of the language, and will only touch on the rules of OO a little bit. OUR WORK will focus on the basics of the language, and will only touch on the rules of OO a little bit.

The Object Model (Terms) Class: C++ definition of a kind of object Class: C++ definition of a kind of object Object: a representation of something in the real world Object: a representation of something in the real world Instance: another term for object Instance: another term for object Property: a characteristic of an object Property: a characteristic of an object Method: something an object can do Method: something an object can do Example: What characterizes a tree? Example: What characterizes a tree?

The Object Model (Properties) A “property” is an object characteristic A “property” is an object characteristic The Class definition enumerates the properties (the ones to be modeled) The Class definition enumerates the properties (the ones to be modeled) When the Class is instantiated, values are assigned to those properties When the Class is instantiated, values are assigned to those properties Example: leaf color, leaf shape, bark texture, number of leaves, etc. Example: leaf color, leaf shape, bark texture, number of leaves, etc.

The Object Model (Methods) Methods are things that an object can do Methods are things that an object can do Again, the Class defines the actions Again, the Class defines the actions Often useful to think of asking an object to do something Often useful to think of asking an object to do something Example: dropLeaf(), changeLeafColor(), getLeafColor(), getBarkTexture() Example: dropLeaf(), changeLeafColor(), getLeafColor(), getBarkTexture()

Topic Problem-Solving with Computer Programs

The Steps Requirements: State the Problem Requirements: State the Problem Analysis: Define Data Input and Output Analysis: Define Data Input and Output Design: Specify Solution Algorithm Design: Specify Solution Algorithm Implementation: Writing the Code Implementation: Writing the Code Validation: Compiling and Testing Validation: Compiling and Testing Use and Maintainence Use and Maintainence

Topic Memory Handling

Memory Management A characteristic of C++ is that memory is handled explicitly A characteristic of C++ is that memory is handled explicitly (Go over components of computer) (Go over components of computer) RAM behaves as the “scratch paper” for the CPU as it does its work RAM behaves as the “scratch paper” for the CPU as it does its work

Levels of Memory Primary cache (L1; usually ~16K) Primary cache (L1; usually ~16K) Secondary cache (L2; usually ~256K) Secondary cache (L2; usually ~256K) Main memory (RAM; separate location; usually hundreds of MB) Main memory (RAM; separate location; usually hundreds of MB) Virtual memory (used as a backup for RAM; often a few GB) Virtual memory (used as a backup for RAM; often a few GB)

Memory Management Imagine memory as a bunch of cells each with one byte (eight bits) Imagine memory as a bunch of cells each with one byte (eight bits) Each memory location also has an address - the address is a number Each memory location also has an address - the address is a number The number of memory locations depends on the computer - the newest computers are talking about 64-bit addressing The number of memory locations depends on the computer - the newest computers are talking about 64-bit addressing

Topic Creating the Development Environment

Chaos Attempt to use Visual Studio.NET Attempt to use Visual Studio.NET If have trouble, we will fall back on Microsoft Visual C++ If have trouble, we will fall back on Microsoft Visual C++ There are also command-line tools, so we can go there if need be There are also command-line tools, so we can go there if need be