Programming recap. Do you know these? LOW LEVEL 1 st generation: machine language (110011) 2 nd generation: assembly language (ADD, SUB) HIGH LEVEL 3.

Slides:



Advertisements
Similar presentations
C++ Introduction.
Advertisements

The Functions and Purposes of Translators Code Generation (Intermediate Code, Optimisation, Final Code), Linkers & Loaders.
Introduction to basic programming Kai Zang Jul 2 nd, 2012.
Programming TBE 540 Farah Fisher. Objectives After viewing this presentation, the learner will be able to… Given a task, create pseudocode Given pseudocode,
Program Development Procedures 1.Program definition clearly define what the problem is. clearly define Input and output data (types, precision, units used)
James Tam Getting Started With Pascal Programming How are computer programs created What is the basic structure of a Pascal Program Variables in Pascal.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Program Flow Charting How to tackle the beginning stage a program design.
If You Missed Last Week Go to Click on Syllabus, review lecture 01 notes, course schedule Contact your TA ( on website) Schedule.
Loops – While, Do, For Repetition Statements Introduction to Arrays
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 2: Input, Processing, and Output
Introduction to a Programming Environment
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
Chapter 1 Program Design
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
Principles of Procedural Programming
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
19/5/2015CS150 Introduction to Computer Science 1 Announcements  1st Assignment due next Monday, Sep 15, 2003  1st Exam next Friday, Sep 19, 2003  1st.
Simple Program Design Third Edition A Step-by-Step Approach
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
PROGRAMMING LANGUAGES Prof. Lani Cantonjos. PROGRAM - set of step-by-step instructions that tells or directs the computer what to do. PROGRAMMING LANGUAGE.
Programming Lifecycle
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
Review, Pseudocode, Flow Charting, and Storyboarding.
Programming, an introduction to Pascal
Chapter 3: Assignment, Formatting, and Interactive Input.
Decisions, Decisions, Decisions Conditional Statements In Java.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
PROGRAM ESSENTIALS. TOKENS  SMALLEST UNITS OF A PROGRAM LANGUAGE  Special Symbols  Mathematical Operators  Punctuation  Word Symbols  Key Words.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
The Hashemite University Computer Engineering Department
Python 1 SIGCS 1 Intro to Python March 7, 2012 Presented by Pamela A Moore & Zenia C Bahorski 1.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
7 - Programming 7J, K, L, M, N, O – Handling Data.
Unit 2 Technology Systems
Basic concepts of C++ Presented by Prof. Satyajit De
Component 1.6.
Programming Mehdi Bukhari.
A451 Theory – 7 Programming 7A, B - Algorithms.
Chapter 2 Elementary Programming
CSCE Fall 2013 Prof. Jennifer L. Welch.
Java Tutotrial for [NLP-AI] 2
High Level Programming Languages
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
CSCE Fall 2012 Prof. Jennifer L. Welch.
Developing a Program.
Unit 3: Variables in Java
Chapter 6 Programming the basic computer
An Overview of C.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
WJEC GCSE Computer Science
Presentation transcript:

Programming recap

Do you know these? LOW LEVEL 1 st generation: machine language (110011) 2 nd generation: assembly language (ADD, SUB) HIGH LEVEL 3 rd / 4 th generation: E.g. Pascal, C++, Java

How about these? Source code: original instructions Object code: machine language version Compiling: converting from source to object Linking: bring all data together before running Executing: running the program Maintaining: ensuring program continues to run

Do these errors ring a bell? Syntax error: error with the use of the language Logic error: error when something is out of sequence or doesn’t make sense (e,g, sum = a * b) Runtime error: error when program runs Testing: checking for errors Debugging: Fixing errors

Types of statements Assignment Calculation Input Output Looping Selection/condition Program header Vat:= 0.15 Vat:=price * tax Read(age) Write(age) For age:= 1 to 5 do While age<65 do If age > 65 then Program OLDAGE;

Symbols symbols symbols ; means end of line { } is used to put comments that are not a part of the program := means equals. Means end of program > more than < less than <> not equal to = is equal to >= more than or equal to

What are datatypes? Integer – whole number (90) Real – decimal number (9.67) Char – single letter (n) String – word (nine) Array – a list

Declaring an array Declare an array named class that has 20 spaces and stores the names of persons CLASS:array[1..20] of STRING; Name of array Number of spaces datatype

Working with arrays Output the fourth value in CLASS ◦ Writlen(CLASS[4]); Input a value into the 10 th space in class ◦ Readln(CLASS[10]); Input the name “george” into the 8 th position in CLASS ◦ CLASS[8]:=“george”;

Tracing a program – Jan 2013, #9 a) Pascal b) Sequence. c) Output d) The result is 12 e) Set A = no error Set B = runtime error. Because num1 is 2.5. This is a real number.

Boolean – ones and zeros! AND OR

Documentation?? External documentation ◦ Use manuals ◦ Installation procedures ◦ Frequently asked questions Internal documentation ◦ Comments in your program ◦ Indenting so your program is neat