Copyright 2005 Department of Computer & Information Science

Size: px
Start display at page:

Download "Copyright 2005 Department of Computer & Information Science"

Transcription

1 Introducing Programming Copyright 2005

2 Goals By the end of this lecture, you should Understand the different types of programming languages. Understand the basic procedures in a program as input, processing and output. Understand the importance of variables. Understand a basic map of the program development cycle.

3 Software Software is comprised of instructions that get a computer to perform a task. Application Software Word Processors Database s/w Spreadsheets Painting programs Web browsers, programs System Software Operating Systems Windows Macintosh OS Unix Linux Drivers

4 Programming Languages Programming languages allow programmers to code software. The three major families of languages are: Machine languages Assembly languages High-Level languages

5 Machine Languages Comprised of 1s and 0s The native language of a computer Difficult to program one misplaced 1 or 0 will cause the program to fail. Example of code:

6 Assembly Languages Assembly languages are a step towards easier programming. Assembly languages are comprised of a set of elemental commands which are tied to a specific processor. Assembly language code needs to be translated to machine language before the computer processes it. Example: ADD ,

7 High-Level Languages High-level languages represent a giant leap towards easier programming. The syntax of HL languages is similar to English. Historically, we divide HL languages into two groups: Procedural languages Object-Oriented Oriented languages (OOP)

8 Procedural Languages Early high-level languages are typically called procedural languages. Procedural languages are characterized by sequential sets of linear commands. The focus of such languages is on structure. Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript

9 Object-Oriented Oriented Languages Most object-oriented oriented languages are high- level languages. The focus of OOP languages is not on structure, but on modeling data. Programmers code using blueprints of data models called classes. Examples of OOP languages include C++, Visual Basic.NET and Java.

10 Compiling Regardless of the HL Language, all HL programs need to be translated to machine code so that a computer can process the program. Some programs are translated using a compiler.. When programs are compiled, they are translated all at once. Compiled programs typically execute more quickly than interpreted programs, but have a slower translation speed.

11 Interpreting Some programs are translated using an interpreter.. Such programs are translated line-by by-line instead of all at once (like compiled programs). Interpreted programs generally translate quicker than compiled programs, but have a slower execution speed.

12 Programming Example Simple programming problem: Convert a price from British pounds into Dollars. Pseudocode Input the price of the item, PoundPrice,, in pounds Compute the price of the item in dollars: Set DollarPrice = 1.62 * PoundPrice Write DollarPrice

13 Programming Example Translating to Basic: INPUT PoundPrice LET DollarPrice = 1.62 * PoundPrice PRINT DollarPrice END

14 Input & Variables Input operations get data into the programs A user is prompted to enter data: Write Enter the price in pounds Input PoundPrice Computer programs store data in named sections of memory called variables.. In the example above, the variable is named PoundPrice.. The value of a variable can, and often does, change throughout a program.

15 Numeric Data Types of Data Integer data, I.e., whole numbers, Floating point data have a decimal point 23.0, -5.0 Character data (alphanumeric) All the characters you can type at the keyboard Letters & numbers not used in calculations Boolean data TRUE/FALSE

16 Data Processing and Output Set DollarPrice = 1.62 * PoundPrice The above statement is a processing statement. Take the value in the variable PoundPrice, multiply by 1.62, and set the variable DollarPrice to the result of the multiplication. Write DollarPrice Output the value in DollarPrice to the monitor.

17 Assignment Operations Set counter = counter + 1 Assignment statements change the value in a variable Take the value of counter,, add 1, and store the result back in the same variable.

18 Arithmetic Operations Name Symbol Example Result Exponentiation ^ 4^2 16 Multiplication * 16*2 32 Division / 16/2 8 Addition Subtraction

19 Data Hierarchy 1. Parenthesis 2. Exponentiation 3. Multiplication/Division 4. Addition/Subtraction

20 Hierarchy of Operations Example 3 * (6 + 2) / 12 (7 5) ^ 2 * 3 ( ) first = 3 * 8 / 12 2 ^ 2 * 3 ^ next = 3 * 8 / 12 4 * 3 Mult/Div (L to R) = 24 / 12 4 * 3 Mult/Div (L to R) = 2 12 Add/Subtr = -10

21 Data Output Send information from the program to the screen, or printer, or disk file. Write DollarPrice The computer displays the value of the variable DollarPrice to the screen and the cursor goes to the next line.

22 Data Output Write The price in Dollars is, DollarPrice The output looks like this: The price in Dollars is 162 The text inside the is output to the user as is, and it is the value in the variable that is output.

23 2.1 The Program Development Cycle

24 Programming as Problem Solving Problem solving principles: 1. Completely understand the problem 2. Devise a plan to solve it 3. Carry out the plan 4. Review the results Developing a Program: 1. Analyze the problem 2. Design the program 3. Code the program 4. Test the program An example of programming as problem solving, Brewster s Thousands follows

25 1) Analyze the Problem Brewster s Thousands The problem: Brewster wants to invest money at a local bank. There are many options such as interest rates, terms of deposit, compounding frequencies. He needs a program to compute, for any given initial investment, the final maturity (value) of the deposit. What are the inputs? (given data) What are the outputs? (required data) How will we calculate the required outputs from the given inputs?

26 2) Design the Program Create an outline of the program An algorithm a step by step procedure that will provide the required results from the given inputs. Algorithm Examples: Instructions on how to make a cake, use the bank s ATM, etc.

27 3) Code the Program Once the design is completed, write the program code. Code is written in some programming language such as BASIC, Pascal, C++, Java, etc. In this course we write code in pseudo- code, developing the skills to be used when studying the specific languages.

28 4) Testing the program Locate any errors (bugs) Testing is done throughout the development cycle Desk-checking checking,, or code walkthrough is performed to locate errors in the code. Pretend you are the computer and execute your own code. Ultimate test is to run the program to see if the outputs are correct for the given inputs.

29 Modular Programming Determine the major tasks that the program must accomplish. Each of these tasks will be a module. Some modules will be complex themselves, and they will be broken into sub-modules, and those sub-modules may also be broken into even smaller modules. This is called top-down design

30 Mapping Modules Inputs Input Variables: Principal PercentageRate Term Frequency Processes Rate of Interest: Set Rate = PercentageRate/100 Final Value: Outputs Display: Write FinalValue Set FinalValue = Principal * (1 + Rate / Frequency) ^ (Frequency * Term)

31 Code Modules A module is an independent, self- contained section of code that performs a single task. The main module is the module that drives the application. It controls all other modules. Typically, the main module calls other modules in order to have them perform certain tasks.

32 Program Control & Modules When the main module calls another module, program control transfers to the called module. Program control cedes back to the main module when the called module finishes.

33 Main module Display program title and brief description of program Call Input Data Module Call Perform Calculations module Call Output Results Module End Program Input Data module Prompt for Principal, PercentageRate, Term, Frequency Input Principal, PercentageRate, Term, Frequency End module Perform Calculations module Set Rate = PercentageRate / 100 Set FinalValue = Principal * (1 + Rate / Frequency) ^ (Frequency * Term) End module Output Results Module Write Principal, PercentageRate, Term, Frequency Write FinalValue End module

34 Hierarchy Chart (HIPO Chart) A HIPO Chart ( Hierarchy of Inputs, Processes & Outputs ) is similar to an organization chart it shows what modules exist and how they are related. It s a good idea to keep modules short about 1 page per module. We will have very small modules while getting comfortable using these tools.

35 HIPO Chart for Brewster s Thousands Example Main Module Input Data Perform Calculations Output Results

36 Coding Coding is done in a specific programming language. In this part of the course, we will use pseudocode. Later, we ll adapt our pseudocode to write in JavaScript. Coding before finishing a solid algorithm is a lot like putting the cart before the horse and usually spells disaster. Time well-spent in the design phase will head off problems in coding!

37 Documentation Internal Documentation Comments explain to the reader the logic and decision processes of the programmer. Comments are ignored by an interpreter or compiler. Types of comments include code comments, documentation comments & module comments. External Documentation External documentation includes a user s guide and, typically, a more technical system administrator s guide.

38 Testing Most of the work should be done before the phase begins creating of a testing document. Two types of testing: Testing for errors Quality/Usability testing Two phases of testing: Alpha testing (Internal testing) Beta testing (Testing at the customer site w/ live data)

39 Types of Errors Syntax wrong grammar, i.e., breaking the rules of how to write the language Forgetting punctuation, misspelling keyword The program will not run at all with syntax errors Logic - the program runs, but does not produce the expected results. Using an incorrect formula, incorrect sequence of statements, etc.

40 Structured Programming A method for designing and coding programs in a systematic, organized manner. It combines the principles of top-down design, modularity and the use of the three accepted control structures of sequence, repetition and selection.

41 Control Structures Sequence in sequential order. The simplest of control structures start at the beginning and continue in sequential order. Selection selectively execute statements Called a branch,, it requires a condition to determine when to execute statements.

42 Control Structures Repetition repeat statements more than once Called a loop,, it needs a stop condition, I.e, the program will continue to loop until some condition is met.

43 Event-Driven Programming In an event-driven program, the flow of control is based on the user s clicking on menus and buttons, etc. These user actions are called events. Event-driven programming still uses the basic principles of structured programming program modules, control structures, good programming style, and program testing.

44 Resources Venit,, Stewart. Extended Prelude to Programming: Concepts and Design. Scott/Jones, Inc., 2002.

INFS 214: Introduction to Computing

INFS 214: Introduction to Computing INFS 214: Introduction to Computing Session 11 Principles of Programming Lecturer: Dr. Ebenezer Ankrah, Dept. of Information Studies Contact Information: eankrah@ug.edu.gh College of Education School of

More information

Chapter Twelve. Systems Design and Development

Chapter Twelve. Systems Design and Development Chapter Twelve Systems Design and Development After reading this chapter, you should be able to: Describe the process of designing, programming, and debugging a computer program Explain why there are many

More information

1. Introduction to Programming

1. Introduction to Programming Computer Science I CS 135 1. Introduction to Programming René Doursat Department of Computer Science & Engineering University of Nevada, Reno Fall 2005 Computer Science I CS 135 0. Course Presentation

More information

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

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 Course Web Site http://www.nps.navy.mil/cs/facultypages/squire/cs2900 All course related materials will be posted

More information

Week One: Introduction A SHORT INTRODUCTION TO HARDWARE, SOFTWARE, AND ALGORITHM DEVELOPMENT

Week One: Introduction A SHORT INTRODUCTION TO HARDWARE, SOFTWARE, AND ALGORITHM DEVELOPMENT Week One: Introduction A SHORT INTRODUCTION TO HARDWARE, SOFTWARE, AND ALGORITHM DEVELOPMENT Outline In this chapter you will learn: About computer hardware, software and programming How to write and execute

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

Unit II. (i) Computer Programming Languages

Unit II. (i) Computer Programming Languages Unit II. (i) Computer Programming Languages Need of a computer programming language: A programming language is an artificial language designed to communicate instructions to a computer. Thousands of different

More information

Programming Languages and Program Development

Programming Languages and Program Development Programming Languages and Program Development 1 Programming Languages and How They Work Programming o Process used to create software programs Programmers o People who use programming languages to create

More information

Discovering Computers Chapter 13 Programming Languages and Program Development

Discovering Computers Chapter 13 Programming Languages and Program Development Discovering Computers 2009 Chapter 13 Programming Languages and Program Development Chapter 13 Objectives Differentiate between machine and assembly languages Identify and discuss the purpose of procedural

More information

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University Introduction to Computers and Programming Languages CS 180 Sunil Prabhakar Department of Computer Science Purdue University 1 Objectives This week we will study: The notion of hardware and software Programming

More information

PEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI

PEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI PEMROGRAMAN BERORIENTASI OBJECT Indra Gunawan, ST., M.Kom., CEH., CHFI RANGE NILAI 95.00-100.00 A 90.00-94.99 A- 85.00-89.99 A/B 80.00-84.99 B+ 75.00-79.99 B 70.00-74.99 B- 65.00-69.99 B/C 60.00-64.99

More information

Computer Software: Introduction

Computer Software: Introduction Software: A collection of programs Computer Software: Introduction Program: Sequence of instructions for the computer to carry out Programs written using a programming language Types of languages: Machine

More information

S/W Programming & Languages

S/W Programming & Languages S/W Programming & Languages Overview Programming five steps Five generations High-level programming Object-oriented programming Internet programming 2 Programming What are the five steps of the programdevelopment

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University ITC213: STRUCTURED PROGRAMMING Bhaskar Shrestha National College of Computer Studies Tribhuvan University Lecture 03: Program Development Life Cycle Readings: Not Covered in Textbook Program Development

More information

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

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 1 Edgardo Molina Fall 2013 City College of New York 1 Introduction to Computing Lectures: Tuesday and Thursday s (2-2:50 pm) Location: NAC 1/202 Recitation:

More information

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102 Programming Languages and Program Development Life Cycle Fall 2016 Introduction to Information and Communication Technologies CSD 102 Outline The most common approaches to program design and development

More information

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

Outline. Program development cycle. Algorithms development and representation. Examples. Outline Program development cycle. Algorithms development and representation. Examples. 1 Program Development Cycle Program development cycle steps: Problem definition. Problem analysis (understanding).

More information

An Introduction to Python (TEJ3M & TEJ4M)

An Introduction to Python (TEJ3M & TEJ4M) An Introduction to Python (TEJ3M & TEJ4M) What is a Programming Language? A high-level language is a programming language that enables a programmer to write programs that are more or less independent of

More information

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1 Chapter 2 Input, Processing, and Output Fall 2016, CSUS Designing a Program Chapter 2.1 1 Algorithms They are the logic on how to do something how to compute the value of Pi how to delete a file how to

More information

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen Computer Programming Computers can t do anything without being told what to do. To make the computer do something useful, you must give it instructions. You can give a computer instructions in two ways:

More information

Special Section: Building Your Own Compiler

Special Section: Building Your Own Compiler cshtp6_19_datastructures_compiler.fm Page 1 Tuesday, February 14, 2017 10:31 AM 1 Chapter 19 Special Section: Building Your Own Compiler In Exercises8.31 8.33, we introduced Simpletron Machine Language

More information

Chapter 1: An Overview of Computers and Logic

Chapter 1: An Overview of Computers and Logic Chapter 1: An Overview of Computers and Logic Programming Logic and Design, Third Edition Comprehensive Objectives After studying Chapter 1, you should be able to: Understand computer components and operations

More information

In this chapter you ll learn:

In this chapter you ll learn: Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd Will you walk a little faster? said a whiting to a snail, There s a porpoise close behind us, and he s treading on

More information

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

Problem Solving and Program Design - Chapter 1. Cory L. Strope Problem Solving and Program Design - Chapter 1 Cory L. Strope Overview of Computers and Programming Computer Hardware Computer Software Software Development (Problem Solving) Pseudocode Flowchart Intro.

More information

Lesson 3: Basic Programming Concepts

Lesson 3: Basic Programming Concepts 3 ICT Gaming Essentials Lesson 3: Basic Programming Concepts LESSON SKILLS After completing this lesson, you will be able to: Explain the types and uses of variables and operators in game programming.

More information

Introduction to Programming: Variables and Objects. HORT Lecture 7 Instructor: Kranthi Varala

Introduction to Programming: Variables and Objects. HORT Lecture 7 Instructor: Kranthi Varala Introduction to Programming: Variables and Objects HORT 59000 Lecture 7 Instructor: Kranthi Varala What is a program? A set of instructions to the computer that perform a specified task in a specified

More information

National 5 Computing Science Software Design & Development

National 5 Computing Science Software Design & Development National 5 Computing Science Software Design & Development 1 Stages of Development 2 Analysis 3 Design 4 Implementation 5 Testing 6 Documentation 7 Evaluation 8 Maintenance 9 Data Types & Structures 10

More information

Low-Level Languages. Computer Programs and Programming Languages

Low-Level Languages. Computer Programs and Programming Languages Computer Programs and Programming Languages What is a computer program? Set of instructions that directs computer to perform tasks Programming used to write instructions 1 Computer Programs and Programming

More information

Chapter 1 INTRODUCTION

Chapter 1 INTRODUCTION Chapter 1 INTRODUCTION A digital computer system consists of hardware and software: The hardware consists of the physical components of the system. The software is the collection of programs that a computer

More information

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

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 Learning Outcomes At the end of this lecture, you should be able to: tell the purpose of computer programs. describe

More information

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development Technology In Action, Complete, 14e (Evans et al.) Chapter 10 Behind the Scenes: Software Programming 1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem

More information

Chapter 3 Developing a Program

Chapter 3 Developing a Program Chapter 3 Developing a Program THE SUCCESS TRICK 3.1 The Program Development Cycle Problem solving principles Completely understand the problem Devise a plan to solve it Carry out the plan Review the results

More information

Chapter 2: Programming Concepts

Chapter 2: Programming Concepts Chapter 2: Programming Concepts Objectives Students should Know the steps required to create programs using a programming language and related terminology. Be familiar with the basic structure of a Java

More information

The births of the generations are as follow. First generation, 1945 machine language Second generation, mid 1950s assembly language.

The births of the generations are as follow. First generation, 1945 machine language Second generation, mid 1950s assembly language. Lesson Outcomes At the end of this chapter, student should be able to: Describe what a computer program is Explain the importance of programming to computer use Appreciate the importance of good programs

More information

CSI32 Object-Oriented Programming

CSI32 Object-Oriented Programming Outline Department of Mathematics and Computer Science Bronx Community College February 2, 2015 Outline Outline 1 Chapter 1 Cornerstones of Computing Textbook Object-Oriented Programming in Python Goldwasser

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah Lecturer Department of Computer Science & IT University of Balochistan 1 Outline p Introduction p Program development p C language and beginning with

More information

Basic Concepts. Computer Science. Programming history Algorithms Pseudo code. Computer - Science Andrew Case 2

Basic Concepts. Computer Science. Programming history Algorithms Pseudo code. Computer - Science Andrew Case 2 Basic Concepts Computer Science Computer - Science - Programming history Algorithms Pseudo code 2013 Andrew Case 2 Basic Concepts Computer Science Computer a machine for performing calculations Science

More information

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

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Program Development Cycle Program development

More information

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

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG) SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2

More information

Computer Fundamentals

Computer Fundamentals Computer Fundamentals 1 Draw the block diagram of computer architecture and explain each block. Computer is made up of mainly four components, 1) Central processing unit (CPU) 2) Input section 3) Output

More information

CS101 Introduction to Programming Languages and Compilers

CS101 Introduction to Programming Languages and Compilers CS101 Introduction to Programming Languages and Compilers In this handout we ll examine different types of programming languages and take a brief look at compilers. We ll only hit the major highlights

More information

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

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017 Programming 1 Lecture 1 COP 3014 Fall 2017 August 28, 2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific set of

More information

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming 30 th September 2018 Objective: To learn meaning and concepts of programming Outcome: By the end of this students should be able to describe the meaning of programming Section 1: What is a programming

More information

Computing and compilers

Computing and compilers Computing and compilers Comp Sci 1570 to Outline 1 2 3 4 5 Evaluate the difference between hardware and software Find out about the various types of software Get a high level understanding of how program

More information

Python - Week 1. Mohammad Shokoohi-Yekta

Python - Week 1. Mohammad Shokoohi-Yekta Python - Week 1 Mohammad Shokoohi-Yekta 1 An Introduction to Computers and Problem Solving 1.1 An Introduction to Computers 1.2 Program Development Cycle 1.3 Programming Tools 1.4 Starting Python 2 Communicating

More information

Programming for Engineers Iteration

Programming for Engineers Iteration Programming for Engineers Iteration ICEN 200 Spring 2018 Prof. Dola Saha 1 Data type conversions Grade average example,-./0 class average = 23450-67 893/0298 Grade and number of students can be integers

More information

Describe the layers of a computer system

Describe the layers of a computer system Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe the history of computer hardware and software

More information

Introduction to Computers and Java

Introduction to Computers and Java Introduction to Computers and Java Chapter 1 Chapter 1 1 Objectives overview computer hardware and software introduce program design and object-oriented programming overview the Java programming language

More information

(I m not printing out these notes! Take your own.)

(I m not printing out these notes! Take your own.) PT1420 Week 2: Software Program Design I (I m not printing out these notes! Take your own.) Today we'll be discussing designing programs: Algorithms and errors Flowcharts and pseudocode Sequence structures

More information

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Lecture 1 Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Welcome to ENGR 102 Syllabus review Your Time Expectations (in

More information

MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER INTRODUCTION TO SYSTEMS DEVELOPMENT First Paper (Theory) NQF LEVEL 2

MARKING GUIDELINE NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER INTRODUCTION TO SYSTEMS DEVELOPMENT First Paper (Theory) NQF LEVEL 2 NATIONAL CERTIFICATE (VOCATIONAL) NOVEMBER 2010 NQF LEVEL 2 29 OCTOBER 2010 This memorandum consists of 7 pages. THIS MARKING MEMO IS INTENDED TO SERVE AS A GUIDE TO THE MARKING PROCESS. ANY VALID APPLICABLE

More information

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing Introduction 1 Chapter 5 TH EDITION Lewis & Loftus java Software Solutions Foundations of Program Design 2007 Pearson Addison-Wesley. All rights reserved Focus of the Course Object-Oriented Software Development

More information

19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd

19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd 19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd Will you walk a little faster? said a whiting to a snail, There s a porpoise close behind us, and he s treading

More information

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java

Chapter 1. Introduction to Computers and Java Objects. Background information. » important regardless of programming language. Introduction to Java Chapter 1 Introduction to Computers and Java Objects Background information» important regardless of programming language Introduction to Java Chapter 1 Java: an Introduction to Computer Science & Programming

More information

Introducing Computer Programming

Introducing Computer Programming ok4 01 f2 5/24/17 9:59 AM Page 3 Chapter 1 Introducing Computer Programming Intended Learning Outcomes After completing this chapter, you should be able to: Explain the difference between computers and

More information

Principles of Programming Languages. Lecture Outline

Principles of Programming Languages. Lecture Outline Principles of Programming Languages CS 492 Lecture 1 Based on Notes by William Albritton 1 Lecture Outline Reasons for studying concepts of programming languages Programming domains Language evaluation

More information

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 09 Ada to Software Engineering Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Summary of Previous Lecture 1. ALGOL 68 2. COBOL 60 3. PL/1 4. BASIC 5. Early Dynamic Languages 6.

More information

CSI Lab 02. Tuesday, January 21st

CSI Lab 02. Tuesday, January 21st CSI Lab 02 Tuesday, January 21st Objectives: Explore some basic functionality of python Introduction Last week we talked about the fact that a computer is, among other things, a tool to perform high speed

More information

Steps to program development

Steps to program development Automate processes - Programming Concepts and Design Steps to program development A computer program is a set of formal instructions, which the computer executes in order to carry out some designated task.

More information

Lecture 2. Examples of Software. Programming and Data Structure. Programming Languages. Operating Systems. Sudeshna Sarkar

Lecture 2. Examples of Software. Programming and Data Structure. Programming Languages. Operating Systems. Sudeshna Sarkar Examples of Software Programming and Data Structure Lecture 2 Sudeshna Sarkar Read an integer and determine if it is a prime number. A Palindrome recognizer Read in airline route information as a matrix

More information

7/8/10 KEY CONCEPTS. Problem COMP 10 EXPLORING COMPUTER SCIENCE. Algorithm. Lecture 2 Variables, Types, and Programs. Program PROBLEM SOLVING

7/8/10 KEY CONCEPTS. Problem COMP 10 EXPLORING COMPUTER SCIENCE. Algorithm. Lecture 2 Variables, Types, and Programs. Program PROBLEM SOLVING KEY CONCEPTS COMP 10 EXPLORING COMPUTER SCIENCE Lecture 2 Variables, Types, and Programs Problem Definition of task to be performed (by a computer) Algorithm A particular sequence of steps that will solve

More information

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

C H A P T E R 1. Introduction to Computers and Programming C H A P T E R 1 Introduction to Computers and Programming Topics Introduction Hardware and Software How Computers Store Data How a Program Works Using Python Computer Uses What do students use computers

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY Dr. John Georgas, Northern Arizona University Copyright John Georgas All Rights Reserved Outline Current Programming languages Compiled and interpreted implementations

More information

2 rd class Department of Programming. OOP with Java Programming

2 rd class Department of Programming. OOP with Java Programming 1. Structured Programming and Object-Oriented Programming During the 1970s and into the 80s, the primary software engineering methodology was structured programming. The structured programming approach

More information

Working with JavaScript

Working with JavaScript Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives

More information

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the

More information

Compilation and Execution Simplifying Fractions. Loops If Statements. Variables Operations Using Functions Errors

Compilation and Execution Simplifying Fractions. Loops If Statements. Variables Operations Using Functions Errors First Program Compilation and Execution Simplifying Fractions Loops If Statements Variables Operations Using Functions Errors C++ programs consist of a series of instructions written in using the C++ syntax

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C C: A High-Level Language Gives symbolic names for containers of values don t need to know which register or memory location Provides abstraction of underlying

More information

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java Introduction Objectives An overview of object-oriented concepts. Programming and programming languages An introduction to Java 1-2 Problem Solving The purpose of writing a program is to solve a problem

More information

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5 Outline Name, Scope and Binding In Text: Chapter 5 Names Variable Binding Type bindings, type conversion Storage bindings and lifetime Scope Lifetime vs. Scope Referencing Environments N. Meng, S. Arthur

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

Lecture 1: Preliminaries

Lecture 1: Preliminaries Lecture 1: Preliminaries Edgardo Molina Department of Computer Science City College of New York August 30, 2011 Edgardo Molina (CS@CCNY) Lecture 1 August 30, 2011 1 / 44 Info and Schedule Course Info and

More information

COMP 102: Computers and Computing

COMP 102: Computers and Computing COMP 102: Computers and Computing Lecture 5: What is Programming? Instructor: Kaleem Siddiqi (siddiqi@cim.mcgill.ca) Class web page: www.cim.mcgill.ca/~siddiqi/102.html Motivation The advantage of a computer

More information

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing SECTION 1: INTRODUCTION ENGR 112 Introduction to Engineering Computing 2 Course Overview What is Programming? 3 Programming The implementation of algorithms in a particular computer programming language

More information

Programming Logic and Design Seventh Edition Chapter 2 Elements of High-Quality Programs

Programming Logic and Design Seventh Edition Chapter 2 Elements of High-Quality Programs Programming Logic and Design Chapter 2 Elements of High-Quality Programs Objectives In this chapter, you will learn about: Declaring and using variables and constants Assigning values to variables [assignment

More information

Programming Principles and Techniques

Programming Principles and Techniques Aptech Ltd Version 1.0 Page 1 of 11 Table of Contents Aptech Ltd Version 1.0 Page 2 of 11 Application Software Assembler American Standard Code for Information Interchange Arithmetic Logic Unit (ALU) Algorithm

More information

ECS15, Lecture 10. Goals of this course 2/8/13. Mini-Review & Topic 3.2 Software. Today s agenda

ECS15, Lecture 10. Goals of this course 2/8/13. Mini-Review & Topic 3.2 Software. Today s agenda Today s agenda ECS15, Lecture 10 Mini-Review & Topic 3.2 Software Review the lectures. Sample midterm to be posted late today/tonight. Extra credit (1pt) turn in Monday 9:30am Finish up details on Topic

More information

Chapter 1. Introduction

Chapter 1. Introduction Chapter 1 Introduction Chapter Scope Introduce the Java programming language Program compilation and execution Problem solving in general The software development process Overview of object-oriented principles

More information

LESSON 13: LANGUAGE TRANSLATION

LESSON 13: LANGUAGE TRANSLATION LESSON 13: LANGUAGE TRANSLATION Objective Interpreters and Compilers. Language Translation Phases. Interpreters and Compilers A COMPILER is a program that translates a complete source program into machine

More information

Module 1: Introduction to Computers, Programs, and Java

Module 1: Introduction to Computers, Programs, and Java Module 1: Introduction to Computers, Programs, and Java Module 1: Introduction to Java page 1 Objectives To review Program Design and Problem-Solving Techniques To describe the relationship between Java

More information

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program written in a high-level programming language into machine

More information

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

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal Lesson Goals Learn the basic terminology of a computer system Understand the basics of high level languages, including java Understand

More information

Programming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee

Programming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee 1 0 1 0 Foundation Topics 1 0 Chapter 1 - Introduction to Programming 1 1 Systems Development Life Cycle N/A N/A N/A N/A N/A N/A 1-8 12-13 1 2 Bloodshed Dev-C++ 5 Compiler/IDE N/A N/A N/A N/A N/A N/A N/A

More information

Computing Seminar Introduction Oct

Computing Seminar Introduction Oct Computing Seminar Introduction Oct 6 2010 Outline today Programming/computing basics terminology, high level concepts (variables, control flow, input/output) Before next week... Make sure you can login

More information

A Beginner s Guide to Programming Logic, Introductory. Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs

A Beginner s Guide to Programming Logic, Introductory. Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs A Beginner s Guide to Programming Logic, Introductory Chapter 2 Working with Data, Creating Modules, and Designing High-Quality Programs Objectives In this chapter, you will learn about: Declaring and

More information

Lecture 01 & 02 Computer Programming

Lecture 01 & 02 Computer Programming Lecture 01 & 02 Computer Programming 15 Computer Systems Engineering Second Semester By: Mr. Ali Asghar Manjotho, Lecturer, CSE-MUET Contents Computer programming (LL 02) Why programming? (LL 02) Instructions

More information

Introduction to Java Programming

Introduction to Java Programming Introduction to Java Programming Lecture 1 CGS 3416 Spring 2017 1/9/2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer ISA - Instruction Set Architecture: the specific

More information

Our Strategy for Learning Fortran 90

Our Strategy for Learning Fortran 90 Our Strategy for Learning Fortran 90 We want to consider some computational problems which build in complexity. evaluating an integral solving nonlinear equations vector/matrix operations fitting data

More information

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class 1 2 3 4 5 6 Walter Savitch Frank M. Carrano Introduction to Computers and Java Chapter 1 ISBN 0136130887 2007 Pearson Education, Inc., Upper Saddle River, NJ. All Rights Reserved 7 Hardware and Software

More information

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer? Elements of Computers and Programming Dr. William C. Bulko What is a Computer? 2017 What is a Computer? A typical computer consists of: a CPU memory a hard disk a monitor and one or more communication

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Section 1. The essence of COBOL programming. Mike Murach & Associates

Section 1. The essence of COBOL programming. Mike Murach & Associates Chapter 1 Introduction to COBOL programming 1 Section 1 The essence of COBOL programming The best way to learn COBOL programming is to start doing it, and that s the approach the chapters in this section

More information

Add Subtract Multiply Divide

Add Subtract Multiply Divide ARITHMETIC OPERATORS if AND if/else AND while LOOP Order of Operation (Precedence Part 1) Copyright 2014 Dan McElroy Add Subtract Multiply Divide + Add - Subtract * Multiply / Divide = gives the quotient

More information

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

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING 1 Muhalim Mohamed Amin Faculty of Computing @2015/2016-1 Objectives In this chapter, you will learn: Basic computer concepts. The different types of

More information

COMP 202 Java in one week

COMP 202 Java in one week COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of

More information

Chapter 1 Preliminaries

Chapter 1 Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Class List. Java Must Have. Class Goals. Class Goals. Schedule

Class List. Java Must Have. Class Goals. Class Goals. Schedule Class List Accelerated Introduction to CS Using Java 5 2004 Illinois Institute of Technology Schedule CS -201-071 M 06:25-09:05PM Rice Campus - Wheaton Room RI 148 LAB W 06:25-09:05PM CS -201-392 MW 06:25-09:05PM

More information