Introduction to programming Carl Smith National Certificate Year 2 – Unit 4.

Slides:



Advertisements
Similar presentations
Chapter 1 An Overview of Computers and Programming Languages.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
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:
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
Chapter 3 Planning Your Solution
CS102 Introduction to Computer Programming
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Introduction to High-Level Language Programming
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Introduction 01_intro.ppt
Languages and Environments Higher Computing Unit 2 – Software Development.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
CSC141 Introduction to Computer Programming
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Designing and Debugging Batch and Interactive COBOL Programs Chapter 5.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
Overview of Programming and Problem Solving Textbook Chapter 1 1.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
CPS120 Introduction to Computer Programming The Programming Process.
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.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
B.Ramamurthy11/9/20151 Computers and Programming Bina Ramamurthy 127 Bell Hall
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Computer Programming CONTENTS Introduction to Operating Systems Introduction to programming languages Introduction to perl programming language Programming.
The Hashemite University Computer Engineering Department
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
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.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Introduction to Computer Programming By: Mr. Baha Hanene Chapter 1.
Software Engineering Algorithms, Compilers, & Lifecycle.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1 Introduction 2nd Semester H
ICS 3UI - Introduction to Computer Science
CSCI-235 Micro-Computer Applications
Lecture 2 Introduction to Programming
Unit# 9: Computer Program Development
Problem Solving Techniques
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
The Programming Process
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Tonga Institute of Higher Education IT 141: Information Systems
Programming Logic and Design Eighth Edition
Presentation transcript:

Introduction to programming Carl Smith National Certificate Year 2 – Unit 4

Unit objectives Apply simple analysis and design techniques to the software development process. Develop basic high-level code using an appropriate procedural programming language. Use suitable testing methods to ascertain the correctness of a working piece of code. Produce appropriate documentation for a given program application.

Programming languages Pascal is one language among others such as:- C, C++, VB, JAVA, COBOL, ADA, BASIC, Fortran… Each has strengths and weaknesses for various tasks, for example COBOL is ideal for data processing

Why Pascal? Experts consider Pascal is ideal for students studying computer science courses because:- It forces structure, very “elegant” “Easy” to learn Very powerful

Blaise Pascal, The Pascal language was named after the 17th century mathematician, Blaise Pascal who invented a calculating machine called “the Pascaline” which could add and subtract and worked with eight rotating gears. Tax clerks of the era viewed it as a threat to their jobs and it was never adopted!

Program development Good program development is performed in 4 main steps… (which match the unit objectives - strangely…!)

Program development… In fact there are 6 steps:- 1. Analyse the problem 2. Develop algorithm 3. Write code 4. Run the program 5. Test the results 6. Document the program } Step 2

Analysis Phase Analysis is not a trivial task Before you can code you need to know exactly what you are to do You need a clear and precise statement of what is to be done You need to understand what data is available and what is to be assumed You need to know what output is desired and the form it should take

Development ( Develop/Write/Run ) Phase Develop an Algorithm, which is:- “A finite sequence of effective statements that when applied to a problem, will solve it” Write code for the program when the algorithm solves the problem (Compile) and Run the program:- At this point you may discover typing or logic errors!...

Testing phase Test that the results are correct and in the form you like Prove that your program produces the correct solution in all cases:- e.g. with arithmetic operations this may mean checking with a calculator or even pencil and paper! After this phase you may need to go back to the development or even analysis phases so the whole process becomes a “cycle”

Documentation phase It is very important to fully document a working program He writer knows how the program works (hopefully!) but if others are to modify it they must know the logic used Documentation can also be included in the development phase as remarks within the pseudo and actual code

Developing Algorithms Algorithms for solving problems can be developed by:- Stating the problem Dividing the problem into major sub-tasks Dividing each sub-task into smaller tasks Repeating the process until each task is easily solved This is known as “Top Down” design

Software “Life-Cycle” Analysis Design Coding Testing/Verification Maintenance Obsolescence

What is programming? Giving the computer a logical set of instructions to perform a specific task That is, taking the design algorithm and converting it to code that the computer “understands”

Compiled v Interpreted Languages either run “Interpreted” that is each line of code is interpreted into pseudo machine code (binary) at run time Or Compiled, which is the whole program is compiled, prior to running it, into pseudo machine code Interpreted languages tend to be slower in execution but are easier to develop and debug because the interpreter is available to pin point errors at run time Pascal is a compiled language but the compiler is part of the “Turbo Pascal” development environment

Turbo Pascal 7 MSDOS based environment Therefore 8.3 filenames Support for the mouse but mainly used via the keyboard Runs in a window or full screen under Windows 95/98 or 2000

Turbo Pascal v7 – Main

Turbo Pascal v7 - Editor

Output name program

Program Components Remarks – “ Self documenting code ” Program Structure Declarations – Variables/Constants & Data Types Input, Output & Formatting Arrays Decisions – “IF” Iteration - Looping Arithmetic and regular expressions Commands, Procedures and Functions :– In Built and User Defined } “Nesting”

Pascal - Program Structure Program ; Uses Crt; - output to screen Const Var BEGIN END. } } Program Name Declaration section Executable section

Summary We covered:- National Certificate Unit 4 objectives The software development cycle The software life cycle Intro to Turbo Pascal 7 Program Elements and structure Any Questions?