Organization of a Computer System - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Organization of a Computer System

Description:

iPod. TravelMate (gps positioner)? What Is a Program? ... The computer can only process instructions that are presented as a series of 1's ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 19
Provided by: engi96
Learn more at: https://miamioh.edu
Category:

less

Transcript and Presenter's Notes

Title: Organization of a Computer System


1
Organization of a Computer System
LightsLine PrinterMonitor
Toggle switchesPunch cardsKeyboard
Paper CardVCR Tape Hard disk
2
Are These Computer Systems?
  • Laptop
  • Cell Phone
  • iPod
  • TravelMate (gps positioner)?

3
What Is a Program?
  • An ordered set of steps that solve a problem is
    called an algorithm.
  • A computer program is set of instructions that
    carry out an algorithm.

4
Example of an Algorithm
  • Write a algorithm to open a book.
  • Thats all Im asking.
  • A simple set of instructions to open a book.

5
Algorithm VS Program
  • Can a laptop computer execute the algorithm you
    just gave me to open a book?
  • To perform a task, the computer requires that the
    algorithm be written in a computer programming
    language.

6
Programming Languages
  • Machine
  • Assembler
  • Basic
  • FORTRAN
  • COBOL
  • Pascal
  • PHP
  • C
  • C
  • C
  • Java
  • Visual Basic

7
How It Works
  • The computer can only process instructions that
    are presented as a series of 1s and 0s.
  • Machine language is written in zeros and ones
    only!
  • Programming languages allow us to use words
    instead of numbers
  • Another program (a compiler) converts the
    programming language statements to machine
    language.

8
Algorithm for Computing Gross Pay
  • Display message "How many hours did you work?"
  • Allow user to enter number of hours worked
  • Store the number the user enters in memory
  • Display message "How much are you paid per
    hour?"
  • Allow the user to enter an hourly pay rate
  • Store the number the user enters in memory
  • Multiply hours worked by pay rate and store the
    result in memory
  • Display a message with the result of the previous
    step

9
Example of a program
  • Heres an example of a program written in the PHP
    programming language.
  • PHP is used to create interactive Web pages that
    connect to a database.

10
Methods of Programming
  • Procedural
  • Object Oriented

11
Programming LanguagesCategorized
  • Procedural
  • Machine
  • Assembler
  • Basic
  • FORTRAN
  • COBOL
  • Pascal
  • PHP
  • C
  • Object Oriented
  • C
  • C
  • Java
  • Visual Basic

12
Methods of Programming Procedural Programming
  • What and How? Not relevant to us now.
  • 95 of all programs ever written where written
    using the procedural approach.

13
Methods of Programming Object-Oriented
  • Everything in the program is considered to be an
    object.
  • Objects have attributesYou the programmer set
    the values of the attributes.
  • Objects perform tasksYou, the programmer, by
    writing Visual Basic code determine how the
    task will be done.

14
Example of an Object
  • This form is an object.
  • It has attributes
  • Name
  • Height
  • Width
  • Location on screen
  • Color

15
Example of an Object
  • This form is an object.
  • All Visual Basic programs start with a single
    object the form.
  • Through programming, we will put additional
    objects on the form and provide tasks for these
    objects to perform.

16
Basic Concepts of OOP
  • Object been there, done that.
  • Event a task that is triggered when the
    programs USER (not author) provides the
    appropriate input
  • Examples of inputs?

17
OOP
  • Object Oriented Programming then is
  • creating objects
  • assigning tasks that the objects can do

18
OOPSimple Example
  • Two Objects (for now)
  • Form
  • Quit Button
  • One Event
  • When Quit button is clicked, terminate the
    program
Write a Comment
User Comments (0)
About PowerShow.com