CS 1400 Chapter 1 Introduction and Background www.cs.usu.edu/~scott.

Slides:



Advertisements
Similar presentations
CS107: Introduction to Computer Science Lecture 2 Jan 29th.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Introduction to C Programming
CS 1400 Course Reader Introduction. What is Programming? Designing an appropriate algorithm Coding that algorithm in a computer language.
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
COMP 4—Power Tools for the Mind1 PowerTools What’s in the Box? Turing 1: An Introduction to Programming You will learn elementary computer programming.
Three types of computer languages
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
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.
Chapter 3 Planning Your Solution
Programming Logic and Design Fourth Edition, Introductory
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Introduction to Computers and Programming
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to computer: storing instructions and information.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
COMPUTER SCIENCE I C++ INTRODUCTION
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
CSE 1340 Introduction to Computing Concepts Class 2.
INTRODUCTION TO COMPUTING
Programming.
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
Introduction to Programming Using C Introduction to Computer Programming.
Input, Output, and Processing
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 2 Chapter 2 - Introduction to C Programming.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Copyright © 2011 Pearson Addison-Wesley What is a Program Made Of? Keywords (Reserved Words) – Words with special meaning that make up a high-level programming.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Problem Solving Techniques Using Pascal Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan 30043, ROC
CSC 1010 Programming for All Lecture 3 Useful Python Elements for Designing Programs Some material based on material from Marty Stepp, Instructor, University.
Chapter1: Basic Concepts in Information Technology Chapter2: Hardware Chapter3: Memory, Storage and Performance Chapter4: Software.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Chapter 1: Introduction to Computers and Programming.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1: Introduction to Computers and Programming
BASIC PROGRAMMING C SCP1103 (02)
Engineering Problem Solving With C An Object Based Approach
1-1 Logic and Syntax A computer program is a solution to a problem.
BASIC PROGRAMMING C SCP1103 (02)
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1. Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Programming Right from the Start with Visual Basic .NET 1/e
Chapter 1 Introduction(1.1)
Programming Logic and Design Eighth Edition
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

CS 1400 Chapter 1 Introduction and Background

What is a program? Def: A logical sequence of instructions to a computer that leads to a solution of a problem. important points: –logical sequence of instructions instructions are to be carried out in the order given –instructions to a computer while a program may produce instructions to a user, the program itself contains instructions to the computer –leads to a solution a solution may be a number, a decision, an action, etc.

Designing a program… Issues: –logical flow of instructions –mathematics and formulas –appearance of the display screen and how information is presented to the user –operation and “user friendliness” –documentation

Computers are not smart! While instructions to a friend may assume implied understanding and intelligence, instructions to a computer need to be simple, specific, and detailed. The computer will not attempt to determine the purpose of your instructions – it will only blindly carry them out.

Hardware CPU memory input devices output devices storage

What is memory? Memory can be thought of as a collection of mailboxes –Each mailbox has a unique address contents –A CPU may store something into a box retrieve the current contents of a box

Mailbox analogy limitations… A memory box or cell –may only contain one item storing a new item into a box causes the older contents to be overwritten –always contains one item before a program stores an item into a box, it will contain something (garbage) left over from the previous use

Memory (continued)… A memory cell may contain… –a number –a program instruction (more to be learned later) A memory cell address is a word assigned by a program –begins with a letter –contains only letters, digits, and underscore

Some memory cell addresses… Valid cost time age_of_the_oldest_person payrate_as_of_2007 Invalid time of day 9th_of_July $profit

Software We will use three types of software –operating system (Windows, Vista, Linux, etc) controls hardware during execution of other software –tools (Visual C++, Explorer, Word, etc) previously written programs to do common jobs –user programs custom designed new programs for special jobs

Visual C++, Visual.NET A useful software tool to help in the development of C++ user programs Contains capabilities for: –text editing –compiling –linking –debugging and execution –and more…

What is C++? C++ is a programming language –Like English: requires proper use –syntax (grammar) –semantics (meaning) –Unlike English: unambiguous context free

Components of a user program key words operators punctuation memory cell names statements or instructions

Computers can… Get a number from an input device and store it to memory Retrieve numbers from memory and perform calculations, and place the result back into memory Retrieve a number from memory and display it on an output device Display a message on an output device

Pseudocode Example: “Write a program to calculate the volume of a box, using dimensions provided by the user.” Create memory cells height, width, depth, and volume Print “Enter height, width, and depth of box:” Get height from user Get width from user Get depth from user volume = height * width * depth Print “Volume is: “ Print volume