Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
COSC 120 Computer Programming
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Three types of computer languages
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Chapter 1 Program Design
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.
Computer Science I CS rmaclin
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO 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.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Introduction to Computers
CSC141 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
CSC-115 Introduction to Computer Programming
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Agenda Computer Languages How to Write a Simple C Program
Introduction to OOP CPS235: Introduction.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
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.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1: Introduction to Computers and Programming
Chapter 1 Introduction 2nd Semester H
Software Development Environment
Visit for more Learning Resources
Programming Languages
Chapter 1: Introduction to computers and C++ Programming
CSCI-235 Micro-Computer Applications
System Programming and administration
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1. Introduction to Computers and Programming
C++ Programming: From Problem Analysis to Program Design
Chapter 1: Introduction to Computers and Programming
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)
Programming Fundamentals Lecture #3 Overview of Computer 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
Introduction to Computer Programming
ICS103 Programming in C 1: Overview of Computers And Programming
Introduction to Computers
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm

Chapter 1 Introduction to Computers

Computer Languages To write a program for a computer, you must use a computer language History of Computer Languages: –Machine Languages ( ) –Symbolic Languages ( ) –High-level Languages (1965 -) –Natural Languages (1990 -)

Machine Languages In the earliest days of computers, it is the only programming languages available Each computer (CPU) has its own machine language - streams of 0s and 1s An example is given in Figure ‘Program 1-1 of the text book The reason that the instruction must be in streams of zeros and ones is that the internal circuit of a computer is made of switches, transistors, and other electronic devices that can be in one of two states: off and on

Symbolic Languages Machine Languages were not convenient to use In 1950s, Grace Hopper, a mathematician developed the concept of converting programs into machine language These early programming languages simply mirrored the machine languages using symbols, to represent the various machine language instructions See Program 1-2 for an example

Symbolic Languages However, a symbolic language is not understood by a computer, it must be translated to the machine language A special program called an assembler is used to translate symbolic code into machine language These symbolic languages are also known as assembly languages

High-level Languages Symbolic Languages require programmers to concentrate on the hardware Working with symbolic languages was also very tedious because each machine instruction had to be individually coded High-level languages are written in plain english text which is more readable and understandable They are also portable to many different computers

High-level Languages This allows the programmer to concentrate on the application problem at hand rather than the details of the computer They are designed to relieve the programmer from the details of the assembly language Similar to symbolic languages, high-level languages must be converted to machine language See Program 1-3 for an example

Program Development The computer understands only machine language Procedure of turning a C program into machine language: –Writing and Editing –Compiling –Linking (with required library modules) An executable file will then be formed

Writing and Editing A text editor software is used to write and edit programs It helps to enter, change, and store character data Differences between text processing and program writing: programs are oriented around lines of code rather than characters and lines A text editor could be a generalized word processor It is usually provided together with the compiler The program text is stored as a source file

Compiling Programs After a source file is stored on the disk, it needs to be translated into machine language This is the job of the compiler The C compiler is actually two separate programs: the preprocessor and the translator The preprocessor reads the source code, scans for special commands It tell the compiler to look for special code libraries, make substitutions in the code, and prepares for the translation

Compiling Programs The result of preprocessing is called the translation unit After preprocessing, the translator does the work of actually converting the program into machine language It reads the translation unit and writes the resulting object module to a file An object module is the code in machine language Even though the output of the compiler is machine language code, it is not yet ready to run: i.e. not executable

Linking Programs A C program is made up of many functions Some of these functions are written by you and are a part of your source program However, there are other functions, such as input/output process and mathematical library functions, that exist elsewhere These must be attached through a linker which assemble all of these functions, yours and the systems’ into the final executable program

Program Execution Once your program has been linked, it is ready for execution To execute your program under Visual C, press Ctrl F5 Getting the program into memory is the function of an operating system program known as the loader It locates the executable program and reads it into memory

System Development System Development is a critical process that determines the overall quality and success of your program If you carefully design your program using good structured development techniques, your programs will be efficient, error free, and easy to maintain Large-scale, modern programming projects are built using a series of interrelated phases: system development life cycle One example is the waterfall model (Figure 1-11)

System Development System requirements: defines requirements that specify what the proposed system is to accomplish Analysis: looks at different alternatives from a system point of view Design: determines how the system will be built Code: Actually process of program text writing System Test: All of the programs are test together Maintenance: keeps the system working

Program Development When you are given the assignment to develop a program, a program requirements statement will be given You should be given an overview of the complete project so that you will understand how your part fits into the whole You need to determine how to take the inputs and convert them into outputs : Program Design An example is given below

Program Development Example: Calculate the square footage of your house 1st step: Understand the Problem: What is the definition of square footage ? How is the square footage going to be used ? –For insurance purposes ? –To paint the inside or outside of the house ? –To carpet the whole house ? Is the garage included ? Are closets and hallways included ?

Program Development 2nd step: Develop the solution: Three tools will help –Structured Charts –Pseudocode –Flowcharts A structure chart shows the functional flow through the program (Figure 1-12) Pseudocode is part English, part program logic, the purpose is to describe what the program being designed is to do

Program Development Pseudocode requires defining the steps to accomplish the task in sufficient detail so that they can be converted into a computer program See Program 1-4 Most of the statements in the pseudocode are easily understood Flowcharting: Appendix C of the text book contains complete instructions for creating flowcharts

Program Development Writing the program: Two approaches- Top-Down Design, Bottom-Up Design Test the Program: Testing can be a very tedious and time-consuming part of program development Two types of testing: Blackbox Testing, Whitebox testing Blackbox: testing the program without knowing what’s inside it Whitebox: Assumes that you know everything about the program