CSCI-235 Micro-Computer Applications

Slides:



Advertisements
Similar presentations
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Advertisements

CHAPTER 2 GC101 Program’s algorithm 1. COMMUNICATING WITH A COMPUTER  Programming languages bridge the gap between human thought processes and computer.
Computers Are Your Future
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Welcome to CMPE003 Personal Computer Concepts: Hardware and Software Winter 2003 UC Santa Cruz Instructor: Guy Cox.
Module 10 Programming ___tell computers what to do
Computers Are Your Future © 2006 Prentice Hall, Inc.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computers: Tools for an Information Age
Program Flow Charting How to tackle the beginning stage a program design.
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Lesson 4 Computer Software
CS102 Introduction to Computer Programming
1 Chapter-01 Introduction to Computers and C++ Programming.
Computers Are Your Future Tenth Edition Chapter 11: Programming Languages & Program Development Copyright © 2009 Pearson Education, Inc. Publishing as.
Program development & programming languages Chapter 13.
Programming Languages: Telling the Computers What to Do Chapter 16.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Structured COBOL Programming, Stern & Stern, 9th edition
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
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.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
CSC-115 Introduction to Computer Programming
Programming Lifecycle
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Copyright © Prentice Hall Programming and Languages Chapter 14 Telling the Computer What to Do.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Introduction to Programming Languages © 2005 Prentice Hall, Inc. CXC IT Unit 2: Intro. to Programming.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
1 Copyright © 2003 Prentice Hall, IncSlides created by Bob Koziel.
CIS 365: Visual Application Development Introduction to Computers and Programming.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Evolution and History of Programming Languages
Chapter 1 Introduction 2nd Semester H
DDC 2223 SYSTEM SOFTWARE DDC2223 SYSTEM SOFTWARE.
Programming Languages
Operating System Interface between a user and the computer hardware
Lecture 1 Introduction Richard Gesick.
Computer Programming.
Microprocessor and Assembly Language
A451 Theory – 7 Programming 7A, B - Algorithms.
Programming Concepts and Languages
Chapter 4 Computer Software.
TRANSLATORS AND IDEs Key Revision Points.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 1 Introduction(1.1)
CS105 Introduction to Computer Concepts Intro to programming
Chapter One: An Introduction to Programming and Visual Basic
Programming.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Introduction to Computer Programming
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Chapter 1: Preliminaries
Presentation transcript:

CSCI-235 Micro-Computer Applications Programming: Part I

Programming Program – a set of detailed, step-by-step instructions that directs the computer to do what you want it to do Programming language – a set of rules that provides a way of telling the computer what operations to perform © Prentice-Hall, Inc

The Programming Process Five main steps Defining the problem Planning the solution Coding the program Testing the program Documenting the program © Prentice-Hall, Inc

Defining the Problem Develop a written agreement that specifies: The input data The desired output Sometimes, the programmer receives a written specification from the systems analyst Other times, the programmer meets with users directly © Prentice-Hall, Inc

Planning the Solution Algorithm – a detailed, step-by-step solution to the problem Several tools help plan the algorithm © Prentice-Hall, Inc

Planning Tools Flowchart – a pictorial representation of the algorithm Pseudocode – English-like language Specifies algorithm with more precision than you can in English, but less than a programming language © Prentice-Hall, Inc

Coding the Program Translating the algorithm from the planning stage into a formal programming language All languages have syntax rules Similar to grammatical rules The computer will reject a program with even a minor syntax error Programs can be keyed into the computer by using a text editor © Prentice-Hall, Inc

Programming Languages Assembly Language Machine Language Fortran Pascal COBOL BASIC Ada Visual Basic C and C++ Java Smalltalk © Prentice-Hall, Inc

Testing the Program Two phases of testing the program Translation Converting the program you wrote into the binary instructions the CPU understands Debugging Identifying and correcting logic errors in the program © Prentice-Hall, Inc

Translation Compiler translates the program (source module) into a machine language version (object module) If the compiler detects syntax errors, it will produce messages describing those errors If no syntax errors exist, the object module will be linked to create a load module Load module is executed by the computer EXAMPLE © Prentice-Hall, Inc

Documenting the Program Materials are generated at each part of the process Common examples of documentation Flowchart and/or pseudocode Comments within the source code Testing procedures Layouts of input and output records A narrative description of the program © Prentice-Hall, Inc

Levels of Languages Lower-level languages – more like the 0s and 1s the computer itself uses Higher-level languages – more like the languages people use © Prentice-Hall, Inc

Machine Language Programs and memory locations are written in strings of 0s and 1s Problems with machine languages Programs are difficult to write and debug Each computer has its own machine language Only option available to early programmers © Prentice-Hall, Inc

Machine Language Machine language: Consists of binary numbers (0s and 1s) Is the earliest programming language Is the only language the computer understands without translation Is machine dependent Each family of processors has its own machine language © Prentice-Hall, Inc

Assembly Languages Substitute mnemonic codes for 0s and 1s For example, A for add, C for compare, etc. Use names rather than binary addresses for memory locations Require an assembler to translate the program into machine language Still used for programming chips and writing utility programs © Prentice-Hall, Inc

Assembly Languages Assembly language: Resembles machine language Is a low-level language Uses brief abbreviations for program instructions Abbreviations are called mnemonics A program is written in source code (text file) and translated into machine language by an assembler © Prentice-Hall, Inc

High-Level Languages Transformed programming Programmers could focus on solving problems rather than manipulating hardware Programs could be written and debugged much more quickly Requires a compiler to convert the statements into machine language Each computer has its own version of a compiler for each language © Prentice-Hall, Inc

High-level Languages High-Level languages: Create programs at a high level of abstraction Are easier to read, write, and maintain than machine and assembly languages Use a compiler or interpreter to translate code © Prentice-Hall, Inc

Compilers and Interpreters A compiler is a program that changes source code to object code An interpreter translates source code one line at a time and executes the instruction © Prentice-Hall, Inc

Major Programming Languages FORTRAN COBOL BASIC Visual Basic C Java © Prentice-Hall, Inc

FORTRAN The first high-level language Stands for FORmula TRANslator Used primarily for engineering, mathematical, and scientific tasks © Prentice-Hall, Inc

COBOL Stands for COmmon Business-Oriented Language Used primarily for business requirements Processes large data files Produces well-formatted reports © Prentice-Hall, Inc

BASIC Stands for Beginners’ All-Purpose Symbolic Instruction Code Developed to teach programming to college students Became very popular with the introduction of the microcomputer © Prentice-Hall, Inc

C Originally designed to write systems software Offers the ease of use of a high-level language with the efficiency of an assembly language Very portable – can be used with virtually every combination of computer and operating system © Prentice-Hall, Inc

Java A network-friendly programming language that permits a piece of software to run directly on many different platforms Allows programmers to write one version of the program, rather than a separate version of each platform Very useful for Internet development Java applets can run in the user’s Web browser © Prentice-Hall, Inc