ICS103 P ROGRAMMING IN C 1: O VERVIEW OF C OMPUTERS A ND P ROGRAMMING.

Slides:



Advertisements
Similar presentations
Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
Advertisements

An Overview of the Computer System
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Chapter 1 - An Introduction to Computers and Problem Solving
ICS103 P ROGRAMMING IN C L ECTURE 1: O VERVIEW OF C OMPUTERS & P ROGRAMMING.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
CS 201 Overview of Computers & Programming Debzani Deb.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Topic 1: Introduction to Computers and Programming
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.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
CS 115 Chapter 1 Overview of Programming and Problem Solving.
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Topics Introduction Hardware and Software How Computers Store Data
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CISC105 General Computer Science Class 1 – 6/5/2006.
Computer Parts. Two Basic Parts Hardware & Software.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Components of a Computer System
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Chapter 1 An Overview of Computers and Programming Languages.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CHAPTER 1 OVERVIEW OF COMPUTER AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3 Computer Software 1.4 The Software Development.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Chapter 1 Introduction 2nd Semester H
BASIC PROGRAMMING C SCP1103 (02)
An Overview of the Computer System
Engineering Problem Solving With C An Object Based Approach
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Overview of Computers and Programming Chapter 1
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Looking Inside the machine (Types of hardware, CPU, Memory)
Chapter 1: Introduction to Computers and Programming
An Overview of the Computer System
Computer Science I CSC 135.
Topics Introduction Hardware and Software How Computers Store Data
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
From Problems to Algorithms to Programs
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
ICS103 Programming in C 1: Overview of Computers And Programming
Programming Logic and Design Eighth Edition
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

ICS103 P ROGRAMMING IN C 1: O VERVIEW OF C OMPUTERS A ND P ROGRAMMING

W ELCOME TO ICS 103 Instructor: Dr. Muhamed F. Mudawar Office: Building 22, Room 328 Office Hours: UTR 11 – 12 noon and MW 10 – 11 am Web: 2

A SSESSMENT P LAN Lab: 25% Lab Work + Assessment Lab Project Quizzes: 10% Programming Assignments: 10% Midterm Exam: 25% Thursday, April 3, 2014, 7 PM Exhibition Center (Chapters 1 to 6) Final Exam: 30% Monday, May 26, 2014 Exhibition Center (Comprehensive) 3

O UTLINE Overview of Computers Hardware Software Computer Languages Software Development Method Pseudo Code and Flowcharts 4

C OMPUTERS Computers receive input, store, process, and output information. Computer can deal with numbers, text, images, graphics, and sound. Computers are worthless without programming. Programming Languages allow us to write programs that tell the computer what to do and to provide a way to communicate with computers. Programs are then converted to machine instructions so the computer can understand it. 5

H ARDWARE & S OFTWARE Hardware is the equipment used to perform the necessary computations. Processor, memory, disk storage, monitor, keyboard, mouse, printer, etc. Software consists of the programs that enable us to solve problems with a computer by providing it with a list of instructions to follow Word, Internet Explorer, Windows OS, etc. 6

C OMPUTER H ARDWARE Main Memory RAM - Random Access Memory - Memory that can be read and written in any order (as opposed to sequential access memory), volatile. ROM - Read Only Memory - Memory that cannot be written to, non- volatile. Secondary Memory: Magnetic hard disks, Flash (solid state) disks, Optical disks (CDs and DVDs). Central Processing Unit: Executes all computer operations and perform arithmetic and logical operations. Input/Output Devices: keyboard, mouse, scanner, monitor, printer, and speakers. Computer Networks – Computers that are linked together can communicate with each other. 7

C OMPONENTS OF A C OMPUTER 8

M EMORY Memory Cell (MC): An individual storage location in memory. Address of a MC: the relative position of a memory cell in the main memory. Content of a MC: Information stored in the memory cell: Program instruction or Data. Every memory cell has content, whether we know it or not. Bit: The name comes from binary digit. Either 0 or 1. Byte: A memory cell is actually a grouping of smaller units called bytes. A byte is made up of 8 bits. This is about the amount of storage required to store a single character, such as the letter H. 9

10 Each Memory Cell has an address and a value. The address is an integer. The value can be an integer, a real number, or a character. Byte = 8 bits. Kilobyte (KB) = 2 10 = 1024 Bytes Megabyte (MB) = 2 20 > 10 6 Bytes Gigabyte (GB) = 2 30 > 10 9 Bytes Terabyte (TB) = 2 40 > Bytes U NDERSTANDING M EMORY

C OMPUTER S OFTWARE Operating System - controls the interaction between machine and user. Examples: Windows, Linux, etc. Communicates with computer user. Collects input and Displays output. Manages memory and processor time. Manages Storage Disk. Application Software - developed to assist a computer user in accomplishing specific tasks. Example: Word, Excel, Internet Explorer. 11

C OMPUTER L ANGUAGES High-level Language: Combines algebraic expressions and high- level commands High Level : Very far away from the actual machine language Examples: Fortran, C, Prolog, C#, Perl, and Java. Machine Language: A collection of machine instructions Not standardized. There is a different machine language for every processor family. Assembly Language: uses symbols (called mnemonics) that correspond to machine language instructions. Low level: Very close to the actual machine language. 12

C OMPILER Compilation is the process of translating the source code (high-level) into executable code (machine level). Source file: contains the original program code A Compiler turns the Source File into an Object File Object file: contains machine language instructions A Linker turns the Object File into an Executable Integrated Development Environment (IDE): a program that combines simple text editor with a compiler, linker, loader, and debugger tool For example, Eclipse or Visual Studio 13

14 E DITING, T RANSLATING, L INKING, AND R UNNING H IGH -L EVEL L ANGUAGE P ROGRAMS

F LOW OF I NFORMATION D URING P ROGRAM E XECUTION 15

S OFTWARE D EVELOPMENT M ETHOD 1. Specify problem requirements 2. Analyze the problem 3. Design the algorithm to solve the problem 4. Implement the algorithm 5. Test and verify the completed program 6. Maintain and update the program 16

S TEPS D EFINED 1. Problem: statement that specifies the problem that should be solved on the computer. 2. Analysis: Understanding the problem and identifying the inputs, outputs, and required computation. 3. Design - Designing and developing the list of steps called algorithm to solve the problem. 4. Implementation: writing the algorithm as a program using a given programming language. 5. Testing - Testing requires checking and verifying that the program actually works as desired. 6. Maintenance - Maintaining involves finding previously undetected errors and keep it up-to-date. 17

C ONVERTING M ILES TO K ILOMETERS 1. Problem: Your boss wants you to convert a list of miles to kilometers. Since you like programming, you decide to write a program to do the job. 2. Analysis We need to receive miles as input We need to output kilometers We know 1 mile = kilometers 3. Design 1. Get distance in miles 2. Convert to kilometers 3. Display kilometers 18

4. I MPLEMENTATION IN C L ANGUAGE 19

M ILES TO K ILOMETERS CONT D 5. Test We need to test the previous program to make sure it works. To test we run our program and enter different values and make sure the output is correct. 6. Maintenance Next time, your boss gets a contract with NASA, so he wants you to add support for converting to AUs 20

P SEUDO CODE & F LOWCHART Algorithm - A list of steps for solving a problem. Pseudo code - A combination of English phrases and language constructs to describe the algorithm steps. Flowchart - A diagram that shows the step-by-step execution of a program. 21

W HY USE PSEUDO CODE ? The benefit of pseudo code is that it enables the programmer to concentrate on the algorithm without worrying about all the syntactic details of a particular programming language. In fact, you can write pseudo code without even knowing what programming language you will use for the final implementation. Pseudo code cannot be compiled or executed, and does not follow syntax rules. It is simply an important step in producing the final code. Example: Input Miles Kilometers = Miles * Output Kilometers 22

A NOTHER E XAMPLE OF P SEUDO CODE Problem: Calculate your final grade for ICS 103 Specify the problem: Get different grades and then compute the final grade. Analyze the problem: We need to input grades for exams, labs, quizzes and the percentage each part counts for. Then we need to output the final grade. Design 1. Get the grades: exams, quizzes, assignments, and labs. 2. Grade = 0.3 * Midterm Exam * Final Exam * Quizzes * Assignments * Lab 3. Output the Grade Implement and Test: Learn how to program in C, Write the program, then Input some test values, calculate and check the final grade. 23

F LOWCHARTS 24 Process Start or Terminal Decision Document Display Manual Input Flowchart uses boxes and arrows to show step by step execution of a program.

E XAMPLE OF A F LOWCHART 25 Start Get Grades and percentages Calculate Final grade Display Grade End