Professional Documents
Culture Documents
www.bau.edu.lb
Course Information
www.bau.edu.lb
Course Objective
www.bau.edu.lb
Database System Concepts - 6th Edition
Goal
www.bau.edu.lb
Grading
www.bau.edu.lb
Why Study Programming?
www.bau.edu.lb
What Is
Computer Science?
Computer Science is NOT the study of
computers.
A lot of work in CS is done with pen and
paper!
Computer Science is no more about
computers than astronomy is about
telescopes, biology is about microscopes,
or chemistry is about test tubes.
Computer Science is about programming
and the study of algorithms.
www.bau.edu.lb
Why Computer Science?
www.bau.edu.lb
Why Computer Science?
www.bau.edu.lb
Why Computer Science?
www.bau.edu.lb
Chapter 1
Computer: Software
and Hardware
www.bau.edu.lb
A simplified view of a
The Computer
computer system
Memory
Central
Processing Unit
(CPU)
Input/Output
(IO) Devices
www.bau.edu.lb
A simplified view of a
computer system
Monitor
Central
Processing
Unit
Keyboard
Hard Disk
Main
Memory
External Disk
www.bau.edu.lb
Chapter 2
Problem Analysis
www.bau.edu.lb
Hardware Devices
Understand requirements:
The given data
The required results
The processing that is required in
the problem
A list of solution alternatives
www.bau.edu.lb
The Interactivity Chart
for the Payroll Problem
www.bau.edu.lb
Flowchart Symbols
www.bau.edu.lb
Software
Development Cycle
Analysis
Design
Development
Implementation
Maintenance and review
www.bau.edu.lb
Chapter 3
Java programming
www.bau.edu.lb
Java Programming
Variable declarations
Primitive data types in Java (Integers,
Characters, Floating Points)
Input / Output
Output formatting
Escape Sequences
www.bau.edu.lb
Chapter 4
Arithmetic and
logic operations
www.bau.edu.lb
Operators and Their
Computer Symbols
www.bau.edu.lb
Definitions of the
Logical Operators
www.bau.edu.lb
Hierarchy of Operations
www.bau.edu.lb
Evaluating a
Mathematical Expression
www.bau.edu.lb
Chapter 5
www.bau.edu.lb
Flowchart Diagram of
the Decision Structure
www.bau.edu.lb
Chapter 6
www.bau.edu.lb
Flowchart Diagram of
While/While End
www.bau.edu.lb
Chapter 7
www.bau.edu.lb
One-Dimensional Array
www.bau.edu.lb
Chapter 8
www.bau.edu.lb
Chapter 9
Arrays: sorting
www.bau.edu.lb
Computer: Software and
Hardware
www.bau.edu.lb
Course Objective
www.bau.edu.lb
Database System Concepts - 6th Edition
What Computers Do
www.bau.edu.lb
Basic Functions of a
Computer
Four basic operations:
Receive input: Accept information from
outside world
Process information: Perform arithmetic
or logical operations on information
Produce output: Communicate
information to outside world
Store information: Store and retrieve
information from memory and storage
devices
www.bau.edu.lb
Basic Components of a
What ComputersComputer
Do (cont.)
Hardware components
Hardware components
Input devices (mouse,
Input devices
keyboard, scanner)
Output
Output devices
devices
(monitor, printer, (CPU)
Microprocessor
speaker)
Memory and storage
Microprocessor(CPU)
devices
Memory andstorage
Primary storage
devices
Secondary storage
Peripherals
Primary storage
Secondary storage
Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 5
www.bau.edu.lb
Input Devices
www.bau.edu.lb
Input: From Person to
Processor
www.bau.edu.lb
Other Types
ard of Keyboard
Ergonomic keyboards:
evice Keys are at angles; easy on arms and
hands
o manual typewriters
To address possible medical problems
o computer through
Folding keyboards
Used with palm-sized computers
5 www.bau.edu.lb
Pointing Devices
Touchpad: A flat panel, sensitive to light
pressure
Trackpoint and trackball: Used to control
pointer
Game controllers, graphics tablets,
touch screens: Used for inputting
www.bau.edu.lb
Multi-Touch Input
Devices
e multi-finger or multi-hand gestures to
Use multi-finger
omplish complex tasksto accomplish
quickly complex tasks
quickly
uch-sensitive screen, touch tablet, or trackpad can
Touch-sensitive screen, touch tablet, or
ognize position,
trackpad can pressure, and movement
recognize position, pressure,ofand
more
n one finger orofhand
movement moreat a time
than one finger or hand at a
time.
st known example is
Best known example is
ples Apples
iPhoneiPhone
d recognizes one- and
o- fingered movements
www.bau.edu.lb
Output Devices
www.bau.edu.lb
Output: From Pulses
to People
Output devices convert computers internal
bit patterns into a form humans can
understand.
Output produced through two main devices:
Display screens for immediate visual
output
Printers for permanent paper output
www.bau.edu.lb
Screen Output
Screen = Display = Monitor
Display size measured length of diagonal
line across screen
Images composed of tiny dots called
pixels.
Resolution: The number of pixels
displayed on the screen, measured in dots
per inch (dpi)
The higher the resolution, the closer
together the dots
www.bau.edu.lb
Output You Can Hear
www.bau.edu.lb
Data in a PC
www.bau.edu.lb
A Bit About Bits
www.bau.edu.lb
Bits as Numbers
Decimal Binary
www.bau.edu.lb
Bits, Bytes, and
Buzzwords
Byte = 8 bits or one character in ASCII
Kilobyte (KB, K) 1,000 bytes
Megabyte (meg, MB) 1,000 KB or
1 million bytes
Gigabyte (gig, GB) 1,000 MB or
1 billion bytes
Terabyte (TB) 1 million MB or
1 trillion bytes
Petabyte (PB) 1 quadrillion bytes
www.bau.edu.lb
Software
www.bau.edu.lb
Software
Example of software??
www.bau.edu.lb
Algorithms
Algorithm: a set
of step-by-step
instructions
written in a
natural
language, e.g.,
English.
Just like a
recipe but for
computers!!
www.bau.edu.lb
Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall
Example Algorithm
1. Define x to be equal to 10
2. Define y to be equal to 20
3. Compute the sum of x and y
4. Give output to user
www.bau.edu.lb
Creating Programs
www.bau.edu.lb
Software
www.bau.edu.lb
Example Program
int x = 10;
int y = 20;
int z = x + y;
print(z);
www.bau.edu.lb