You are on page 1of 413

CC111

Introduction to Computers

2020 - 2021

Lecturer: Dr. EMAD OSMAN


E-mail: Emad91@Hotmail.com
01025830256
CC111 Aims and Objectives

Upon completion of this course, students should be able to:


1. Understand and state the importance of computer literacy.
2. Identify and explain what computers are and how they
work, including the computer hardware components and
their specifications and types.
3. Understand and use the binary system.
4. Understand system and application software with
examples.
5. Understand the main issues of data communications and
computer networks.
6. Describe the impact that computers are having on our
society

CC111 Lec#1:Introduction to the World of computers 2


Text Book

Understand Computers – Today and Tomorrow – 13th


Edition

CC111 Lec#1:Introduction to the World of computers


Lecturer and TA contact Info

Lecturer
Dr………………
Email:…………………

TA
………………
Email:…………………

CC111 Lec#1:Introduction to the World of computers


General Regulations

Students should only attend lectures and assessments in


their own classes, labs and sections otherwise marks will
not be considered and this might cause student failure

CC111 Lec#1:Introduction to the World of computers


Lecture 1

Introduction to the World of


Computers

Reference :Understanding Computers


Chapter 1

CC111 Lec#1:Introduction to the World of computers


Learning Objectives
• Explain why it is essential to learn about computers today and discuss
several ways computers are integrated into our business and personal
lives.
• Define a computer and describe its primary operations.
• List some important milestones in computer evolution.
• Identify the major parts of a personal computer, including input,
processing, output, storage, and communications hardware.
• Define software and understand how it is used to instruct the computer
what to do.
• List the five basic types of computers, giving at least one example of
each type of computer and stating what that computer might be used for.

7
CC111 Lec#1:Introduction to the World of computers
Computers in Your Life

• Why learn about computers?


• Why do you need basic computer literacy?
• List all the ways we use computers in our lives..
• Looking up information and news
• Exchanging e-mail
• …

CC111 Lec#1:Introduction to the World of computers


8
‫جول نأ لبق ة سريع نأ لبق ة قب نأ ل أ ن‬
‫نبدأ‬
‫بليغ األمير حيد اإلبهار حييث يتاح لنيا تصيور العدييد من‬
‫التطيبيقات وتهييؤ كثيرا ً مين المجاالت التيي يبدو لنا‬
‫أي ن الحاسيوب قادرا ً عليى أداء أيي شييء‪ ،‬بدءا ً من‬
‫نظيم الشعير ورسيم الصيور وصيوال ً إلى إدارة التلوث‬
‫وإدارة وسيائ نأ ل النقي نأ ل واالتصياالت بي نأ ل وصنع القرارات‬
‫السيياسي نأ لبق ة والعسيكري نأ لبق ة‪ .‬ونجيد فيي أنفسينا شبه‬
‫االستعداد لقبول ذلك‪.‬‬

‫‪CC111 Lec#1:Introduction to the World of computers‬‬


Computers Then and Now

• The computer as we know it is a fairly recent invention


• Precomputers and early computers (before 1946)
– Abacus, slide rule, mechanical calculator
– Punch Card Tabulating Machine
• The history of computers is often referred to in terms of
generations
• Each new generation is characterized by a major
technological development

CC111 Lec#1:Introduction to the World of computers


1010
Computers Then and Now

• First-generation computers (1946-1957)


– Enormous and powered by vacuum tubes
– Used a great deal of electricity, and generated a lot of
heat

• Second-generation computers (1958-1963)


– Used transistors
– Computers were smaller, more powerful, cheaper, more
energy-efficient, and more reliable
– Punch cards and magnetic tape were used to input and
store data

CC111 Lec#1:Introduction to the World of computers


11
Computers Then and Now

• Third-generation computers (1964-1970)


– Used integrated circuits (ICs)
– Keyboards and monitors introduced
• Fourth-generation computers (1971-present)
– Invention of Microcomputers in the early 80s
– Use microprocessors
– IBM PC, Apple Macintosh
– Use keyboards, mice, monitors, and printers
– Use magnetic disks, flash memory, and optical disks for
storage
– Computer networks, wireless technologies, Internet introduced

CC111 Lec#1:Introduction to the World of computers


12
Computers Then and Now

• Fifth-generation (now and the future)


– Infancy stage
– No precise classification
– May be based on artificial intelligence (AI)
– Voice and gesture
– Based on optical computers and utilize nanotechnology

CC111 Lec#1:Introduction to the World of computers


13
Computers Then and Now

CC111 Lec#1:Introduction to the World of computers


14
What Is a Computer and What Does It Do?

 Computer: A programmable, electronic device that accepts data, performs


operations on that data, and stores the data or results as needed
 Computers follow instructions, called programs, which determine the tasks
the computer will perform

 5 Basic Computer operations


 Input: Entering data into the computer
 Processing: Performing operations on the data
 Output: Presenting the results (information)
 Storage: Saving data, programs, or output for future use
 Communications: Sending or receiving data

Information is processed
CC111 Lec#1:Introduction to the Worlddata…..
of computers
15
What Is a Computer and What Does It Do?

CC111 Lec#1:Introduction to the World of computers


16
Computers to Fit Every Need

• Six basic categories of computers:


– Embedded computers
– Mobile devices
– Personal computers
– Midrange servers
– Mainframe computers
– Supercomputers

CC111 Lec#1:Introduction to the World of computers


17
Category 1: Embedded Computers

• Embedded computer: Embedded into a product and


designed to perform specific tasks or functions for
that product
• Cannot be used as general-purpose
computers
• Often embedded into:
– Household appliances
– Thermostats
– Sewing machines
– Cars

CC111 Lec#1:Introduction to the World of computers


18
Category 2: Mobile Devices

• Mobile device: A very small device with


some type of built-in computing or
Internet capability
• Typically based on mobile phones
• Typically have small screens and
keyboards
• Examples:
– Smartphones
– Handheld gaming devices
– Portable digital media players

CC111 Lec#1:Introduction to the World of computers


19
Category 3: Personal Computers (PCs)

• Personal computer: A small computer designed to be


used by one person at a time
• Desktop computers: Fit on or next to a desk
– Can use tower case, desktop case, or all-in-one
– Can be PC- compatible or Macintosh
– Not designed to be portable

CC111 Lec#1:Introduction to the World of computers


20
• Notebook (laptop) computers: Typically use clamshell design
• Tablet computers: Can
be slate tablets or
convertible tablets
• Netbooks: Small
notebooks; rapidly
growing type of PC
• Ultra-mobile PCs (UMPCs):
Handheld computers

CC111 Lec#1:Introduction to the World of computers Convertible Tablet


Category 4: Midrange Servers

• Midrange server: A medium-sized computer used


to host programs and data for a small network
– Users connect via a network with a
computer or dumb terminal

CC111 Lec#1:Introduction to the World of computers


22
Category 5: Mainframe Computers

• Mainframe computer: Powerful computer


used by several large organizations to
manage large amounts of centralized data
– Standard choice for large
organizations, hospitals, universities,
large businesses, banks, government
offices
– Located in climate-controlled data
centers and connected to the rest of
the company computers via a network
– Larger, more expensive, and more
powerful than midrange servers
– Usually operate 24 hours a day
– Also called high-end servers or
enterprise-class servers

CC111 Lec#1:Introduction to the World of computers


23
Category 6: Supercomputers

• Supercomputer: Fastest, most


expensive, most powerful type of
computer
– Generally run one program at a
time, as fast as possible
– Commonly built by connecting
hundreds of smaller computers,
supercomputing cluster
– Used for space exploration, missile
guidance, satellites, weather
forecast, oil exploration, scientific
research, complex Web sites,
decision support systems, 3D
applications, etc.

CC111 Lec#1:Introduction to the World of computers


24
Quick Quiz

1. True or False: Microcomputers were invented in the


early 80’s?
2. True or False: The computer performs 4 basic
operations, input, processing, output, and storage
3. True or False: The terms mainframe computer and
supercomputer are interchangeable; both refer to the
largest, most powerful computers.

CC111 Lec#1:Introduction to the World of computers


25
Computer Hardware

• Hardware: The physical parts of a computer


– Internal hardware
• Located inside the main box (system unit) of
the computer
– External hardware
• Located outside the system unit
• Connect to the computer via a wired or wireless
connection
– There is hardware associated with all five
computer operations

CC111 Lec#1:Introduction to the World of computers


26
Hardware

• Input devices
– Used to input data into the computer
– Keyboards, mice, scanners, cameras, microphones,
joysticks, touch pads, touch screens, fingerprint readers,
etc.
• Processing devices
– Perform calculations and control computer’s operation
– Central processing unit (CPU) and memory
• Output devices
– Present results to the user
– Monitors, printers, speakers, projectors, etc.

CC111 Lec#1:Introduction to the World of computers


27
Hardware

• Storage devices
– Used to store data on or access data from storage
media
– Hard drives, CD/DVD discs and drives, USB flash
drives, etc.
• Communications devices
– Allow users to communicate with others and to
electronically access remote information
– Modems, network adapters, etc.

CC111 Lec#1:Introduction to the World of computers


28
Quick Quiz

1. A tablet PC is an example of a(n) _____________.


a. Desktop computer
b. Portable PC
c. Internet appliance
2. Speakers are an example of a(n) _____________
device.
3. True or False: A smartphone is an example of a
mobile device

CC111 Lec#1:Introduction to the World of computers


29
Review

• Define COMPUTER
• What are the 6 categories of computers
• What are the 5 basic operations
• What is hardware?
• What hardware comprises:
– Input devices
– Processing devices
– Output Devices
– Storage devices
– Communication devices?

CC111 Lec#1:Introduction to the World of computers


Lecture 2

The System Unit:


Processing and Memory

Reference :Understanding Computers


Chapter 2

CC111 Lec#2 The System Unit


Learning Objectives

1. Understand how data and programs are represented to


a computer and be able to identify a few of the coding
systems used to accomplish this.
2. Explain the functions of the hardware components
commonly found inside the system unit, such as the
CPU, memory, buses, and expansion cards.
3. Understand how the computer system’s CPU and
memory components process program instructions and
data.
4. List some technologies that may be used in the future
computers.

CC111 Lec#2 The System Unit 2


Data and Program Representation

• In order to be understood by a computer, data and


programs need to be represented appropriately
• Coding systems: Used to represent data and programs
in a manner understood by the computer
• Digital computers: Can only understand two states, off
and on (0 and 1)
• Digital data representation:
The process of representing
data in digital form so it can be
understood by a computer

CC111 Lec#2 The System Unit 3


Digital Data Representation

• Bit: The smallest unit of data that


a binary computer can recognize
(a single 1 or 0)
• Byte = 8 bits
• Byte terminology used to
express the size of documents
and other files, programs, etc.
• Prefixes are often used to
express larger quantities of
bytes: kilobyte (KB), megabyte
(MB), gigabyte (GB), terabyte
(TB), etc.

CC111 Lec#2 The System Unit 4


Coding Systems for Text-Based Data

• ASCII (American Standard Code for


Information Interchange):

coding system traditionally used with


personal computers

CC111 Lec#2 The System Unit 5


Coding Systems for Text-Based Data

• Unicode: newer code (32


bits per character is
common); universal coding
standard designed to
represent text-based data
written in any ancient or
modern language
• Replacing ASCII as the
primary text-coding
system

CC111 Lec#2 The System Unit 6


Coding Systems for Other
Types of Data

• Graphics (still images


such as photos or
drawings)
– Bitmapped images:
A variety of bit
depths are possible
(4, 8, 24 bits)
• More bits = more
colors

CC111 Lec#2 The System Unit 7


Coding Systems for Other
Types of Data

• Audio data: Must be in digital form in order to be stored


on or processed by a computer
– Often compressed when sent over the Internet
• MP3 files
• Video data: Displayed using a collection of frames, each
frame contains a still image
– Amount of data can be substantial, but can be
compressed
– Developers keep on defining new formats aiming for
more quality with less space

CC111 Lec#2 The System Unit 8


Representing Programs: Machine Language

• Machine language: Binary-based language for


representing computer programs the computer can
execute directly
– Early programs were written in machine language.
– Today’s programs still need to be translated into
machine language in order to be understood by the
computer
• Most programs are written in other programming
languages
– Language translators are used to translate the
programs into machine language

CC111 Lec#2 The System Unit 9


Inside the System Unit

CC111 Lec#2 The System Unit 10


Basic Computer Hardware components

• Computer chip: A very small pieces of silicon or other


semi-conducting material onto which integrated
circuits are embedded
• Circuit board: A thin board containing computer chips
and other electronic components
• Motherboard or system board: The main circuit board
inside the system unit
– All devices must connect to the motherboard
– External devices (monitors, keyboards, mice,
printers) typically connect by plugging into a port
exposed through the exterior of the system unit
– Wireless devices connect through a transceiver or
wireless networking technology (like Bluetooth)
CC111 Lec#2 The System Unit 11
The CPU

• Central processing unit (CPU): circuitry and components


packaged together and connected directly to the
motherboard
– Does the vast majority of processing for a computer
– Also called a processor; called a microprocessor when
talking about personal computesr
• Dual-core CPU: Contains the processing components
(cores) of two separate processors on a single CPU
• Quad-core CPU: Contains 4 cores
• Typically different CPUs for desktop computers, portable
computers, servers, mobile devices, consumer devices, etc.
• Often made by Intel or AMD

CC111 Lec#2 The System Unit 12


The CPU

CC111 Lec#2 The System Unit 13


The CPU

CC111 Lec#2 The System Unit 14


Processing Speed

• CPU clock speed: One measurement of processing


speed
– Measured in megahertz (MHz) or gigahertz (GHz)
– Higher CPU clock speed = more instructions
processed per second
• Other factors (CPU architecture, memory, bus speed,
amount of RAM, etc.) also affect the overall processing
speed of a computer
• Benchmark tests: Can be used to evaluate overall
processing speed

CC111 Lec#2 The System Unit 15


Word Size and Cache Memory

• Word size: The amount of data that a CPU can


manipulate at one time
– Typically 32 or 64 bits
• Cache memory: Special group of very fast memory
chips located on or close to the CPU
– Level 1 is fastest, then Level 2, then Level 3
– More cache memory typically means faster
processing
– Usually internal cache (built into the CPU)
– Often some cache dedicated to each core; may also
have some shared cache accessible by any core

CC111 Lec#2 The System Unit 16


Bus Width, Bus Speed, and Bandwidth

• Bus: An electronic path over


which data can travel
• Bus width: The number of
wires in the bus over which
data can travel
• Bus width and speed
determine the throughput (or
bandwidth) of the bus
– The amount of data that
can be transferred by the
bus in a given time period

CC111 Lec#2 The System Unit 17


Memory

• Memory refers to chip based storage


• RAM (random access memory): Computer’s main
memory
– Consists of chips arrange on a circuit board called a
memory module plugged into the motherboard
– Stores essential parts of operating system, programs, and
data the computer is currently using
– Adequate RAM is needed to run programs
– Volatile: Contents of RAM is lost when the computer is
shut off
– Most personal computers use SD-RAM (Synchronous
dynamic random-access memory)
– MRAM and PRAM: non-volatile RAM under development

CC111 Lec#2 The System Unit 18


Memory

• Registers: High-speed memory built into the CPU;


used by the CPU
• ROM (read-only memory): Non-volatile chips located
on the motherboard into which data or programs have
been permanently stored
– Retrieved by the computer when needed
– Being replaced with flash memory for firmware
• Flash memory: Type of nonvolatile memory that can
be erased and reprogrammed
– Some flash memory chips are used by the
computer
– Flash memory chips are also used in flash memory
storage media (sticks, cards, and drives)
CC111 Lec#2 The System Unit 19
Quick Quiz

1. Which type of memory is erased when the power


goes out?
a. ROM
b. RAM
c. flash memory
2. True or False: The CPU can also be called the
motherboard.
3. A(n) electronic path within a computer over which
data travels is called a(n) _____________.
Answers:
1) b; 2) False; 3) bus

CC111 Lec#2 The System Unit 20


How the CPU Works

• CPU: Consists of a variety of circuitry and components


packaged together
– Transistor: Key element of the microprocessor
• Made of semi-conductor material that acts like a
switch controlling the flow of electrons inside a chip
• Today’s CPUs contain hundreds of millions of
transistors; the number doubles about every 18 months
(Moore’s Law)

CC111 Lec#2 The System Unit 21


Typical CPU Components

CC111 Lec#2 The System Unit 22


The System Clock and the Machine Cycle

• System clock: Timing mechanism within the computer


system that synchronizes the computer’s operations
– Each signal is a cycle
– Number of cycles per second = hertz (Hz)
– Many PC system clocks run at 200 MHz
– Computers can run at a multiple or fraction of the
system clock
• For instance, with a CPU clock speed of 2 GHz,
the CPU clock “ticks” 10 times during each system
clock tick
– During each CPU clock tick, one or more pieces of
microcode are processed

CC111 Lec#2 The System Unit 23


The System Clock and the Machine Cycle

• Machine cycle: The series of operations involved in the


execution of a single machine level instruction
– Fetch: The program instruction is fetched
– Decode: The instructions are decoded so the control
unit, ALU, and FPU can understand them
– Execute: The instructions are
carried out
– Store: The original data or the
result from the ALU or FPU
execution is stored in the CPU’s
registers

CC111 Lec#2 The System Unit 24


Pipelining

CC111 Lec#2 The System Unit 25


Future Trends

• Nanotechnology: The science of creating tiny


computers and components less than 100 nanometers
in size Future applications may be built by working at
the individual atomic and molecular levels
• Optical computer: Uses light, such as from laser
beams or infrared beams, to perform digital
computations
• Cloud Computing

CC111 Lec#2 The System Unit 26


Lecture 3

System and Application Software:

Reference :Understanding Computers


Chapters 5-6

CC111 Lec#3: System and application Software


Learning Objectives

1. Understand the difference between system software and


application software.
2. Explain the different functions of an operating system and discuss
some ways that operating systems can enhance processing
efficiency.
3. List several ways in which operating systems differ from one
another.
4. Name today’s most widely used operating systems for personal
computers and servers.

CC111 Lec#3: System and application Software 2


Learning Objectives

5. State several devices other than personal computers


and servers that require an operating system and list
one possible operating system for each type of device.
6. Discuss the role of utility programs and outline several
tasks these programs perform.
7. Describe what application software is, the different types

of ownership rights, and the difference between installed


and Web-based software.

CC111 Lec#3: System and application Software 3


System Software and Application Software

• System software: The operating system and utility


programs that control a computer system and allow you to
use your computer
– Enables the boot process, launches applications,
transfers files, controls hardware configuration,
manages hard drive, and protects from unauthorized
use
• Application software: Programs that allow a user to
perform specific tasks on a computer
– Word processing, playing a game, preparing taxes,
browsing the Web, and so forth

CC111 Lec#3: System and application Software 4


The Operating System

• Operating system: A collection of programs that


manage and coordinate the activities taking place within
a computer system
– Acts as an
intermediary
between the
user and the
computer

CC111 Lec#3: System and application Software 5


Functions of an Operating System

• Interfacing with users (typically via a GUI)


• Booting the computer
– Kernel is loaded into memory
– Processes are started
– msconfig used to control startup of processes
• Configuring devices
– Device drivers are often needed; can be reinstalled if
needed
– Plug and Play devices are recognized
automatically

CC111 Lec#3: System and application Software 6


Functions of an Operating System

• Managing resources and jobs


– Makes resources available to devices
– Monitors for problems
– Scheduling routines
• File management
– Keeps track of files stored
on computer
– Hierarchical format
• Security
– Passwords
– Biometric characteristics
– Firewalls
CC111 Lec#3: System and application Software 7
File Management

CC111 Lec#3: System and application Software 8


Processing Techniques for
Increased Efficiency

• Multitasking: The ability of an operating system to


have more than one program (task) open at one time
• CPU rotates between tasks
• Switching is done quickly
• Appears as though all programs executing at the
same time
• Multithreading: The ability to rotate between multiple
threads so that processing is completed faster and
more efficiently
• Thread: Sequence of instructions within a
program that is independent of other threads

CC111 Lec#3: System and application Software 9


Processing Techniques for
Increased Efficiency

• Multiprocessing and parallel processing: Multiple


processors (or multiple cores) are used in one computer
system to perform work more efficiently
– Simultaneous processing: Performs tasks at the same
time
– Multiprocessing: Each CPU (or core) typically works
on a different job
• Used with personal computers with multi-core
processors
– Parallel processing: CPUs or cores typically works
together to complete one job more quickly
• Used with servers and mainframes

CC111 Lec#3: System and application Software 10


Processing Techniques for
Increased Efficiency

CC111 Lec#3: System and application Software 11


Processing Techniques for
Increased Efficiency

• Memory management: Optimizing the use of main


memory (RAM)
– Virtual memory: Memory-management technique that
uses hard drive space as additional RAM

CC111 Lec#3: System and application Software 12


Differences Among Operating Systems

• Types of processors supported


– Desktop, mobile, server, etc.
• Number of processors
• 32-bit or 64-bit CPUs
• Support for other technologies
– New types of buses
– Virtualization
– Power-saving features
– Touch and gesture input

CC111 Lec#3: System and application Software 13


Operating Systems for
Personal Computers and Servers
• DOS: Disk Operating System
– PC-DOS: Created originally for IBM
microcomputers
– MS-DOS: used with IBM-compatible computers
– DOS traditionally used a command-line interface
– Can enter DOS commands in Windows

CC111 Lec#3: System and application Software 14


Windows

• Windows: The predominate personal operating


system developed by Microsoft Corporation
– Windows 1.0 through Windows 3.x: Operating
environments for DOS
– Windows 95 and Windows 98: Used a similar GUI
to the one used with Windows 3.x
– Windows NT (New Technology): first 32-bit version
of Windows designed for high-end workstations
and servers
– Windows Me (Millennium Edition): designed for
home computers, improved home networking and a
shared Internet connection

CC111 Lec#3: System and application Software 15


Windows

– Windows 2000: replaced Windows NT; was geared


towards high-end business workstations and
servers, support for wireless devices
– Windows XP: Replaced both Windows 2000 and
Windows Me
• Improved photo, video, and music editing and
sharing
• Improved networking capabilities
• Support for handwriting and voice input
• Large user base, MS will support until 2014

Windows Vista: Replaced Windows XP with Improved


networking and multimedia
CC111 Lec#3: System and application Software 16
Windows

– Windows 7: Newest version of Windows released Oct.


2009
• 32-bit and 64-bit versions in four editions
– Home Premium (primary version for home
users)
– Professional (primary version for businesses)
• Starts up and responds faster than Vista
• Will run well on netbooks, unlike Vista
• Device Stage for all connected devices
• Improved home networking (HomeGroup, etc.)
• Jump lists, gadgets, etc.

CC111 Lec#3: System and application Software 17


Mac OS

• Mac OS: Proprietary operating system for computers


made by Apple Corporation
– Based on the UNIX operating system; originally set
the standard for graphical user interfaces
– Includes:
• Safari Web browser
• New features like Time Machine, Stacks, Quick
Look, Boot Camp, etc.
• More responsive than previous versions

CC111 Lec#3: System and application Software 18


UNIX

• UNIX: Operating system developed in the late 1960s for


midrange servers
– Multiuser, multitasking operating system
– More expensive, requires a higher level of technical
knowledge; tends to be harder to install, maintain,
and upgrade
– “UNIX” initially referred to the original UNIX operating
system, now refers to a group of similar operating
systems based on UNIX

CC111 Lec#3: System and application Software 19


Linux

• Linux: Version (flavor) of UNIX available without charge


over the Internet
– Increasingly being used with personal computers,
servers, mainframes, and supercomputers
– Is open-source software: has been collaboratively
modified by volunteer programmers all over the world
– Originally used a command line interface, most recent
versions use a GUI
– Strong support from mainstream companies, such as
Sun, IBM, HP, and Novell
– Much less expensive than Windows or Mac OS

CC111 Lec#3: System and application Software 20


Operating Systems for
Mobile Phones and Other Devices

• Windows Mobile: Designed for mobile phones


– Look and feel of desktop versions
– Current version 6.1, next version to be called
Microsoft Phone.
• Windows Embedded: Designed for consumer and
industrial devices that are not perosonal computers
– Cash register, GPS devices, ATMs, medical
devices and robots.
– Windows Automotive and Microsoft Auto for cars
• Ford Sync
• Android: Linux based OS developed by Open Handset
Alliance (including Google)
CC111 Lec#3: System and application Software 21
Operating Systems for
Mobile Phones and Other Devices

• iPhone OS: Designed for Apple Mobile phones and


mobile devices.
• BlackBerry Operating System: Designed for BlackBerry
devices
• Palm OS and Palm webOS: Designed for Palm devices
• Symbian OS: Designed for use with smart phones
• Embedded Linux: Used with mobile phones, GPS
devices, and other mobile devices

CC111 Lec#3: System and application Software 22


Operating Systems for
Mobile Phones and Other Devices

CC111 Lec#3: System and application Software 23


Utility Programs

• Search tools: Designed to search for files on the user’s


hard drive
– Windows includes search tools
– Google, Yahoo desktop search
• Diagnostic programs: Evaluate your system and make
recommendations for fixing any errors found
• Disk management programs: Diagnose and repair
problems related to your hard drive
• Uninstall utilities: Remove programs from your hard drive
without leaving bits and pieces behind
• Important to properly uninstall programs, not just
delete them

CC111 Lec#3: System and application Software 24


Utility Programs

• Clean up utilities: Delete temporary files


• File compression programs: Reduce the size of files so
they take up less storage space on a storage medium or
can be transmitted faster over the Internet
– Both zip and unzip files
– WinZip (Windows users) and Stuffit (Mac users)

CC111 Lec#3: System and application Software 25


Utility Programs

• Backup and recovery utilities: Make the backup and


restoration process easier
– Backup: Duplicate copy of data or other computer
content
– Good backup procedures are critical for businesses
– Individuals should back up important documents,
e-mail, photos, home video, etc.
– Store backup data on a CD or DVD, second hard
drive, flash memory drive, or upload to the Internet
– Back up your entire computer once all programs have
been installed, so your system can be restored to that
configuration.

CC111 Lec#3: System and application Software 26


Backup Programs

CC111 Lec#3: System and application Software 27


Utility Programs

• Security programs: Protect computers and users


– Antivirus programs
– Antispyware programs
– Firewalls
– Many are included in Windows and other operating
systems

CC111 Lec#3: System and application Software 28


Application software

Programs that allow a user to


perform specific tasks on a
computer :Word processing, playing
a game, preparing taxes, browsing
the Web, and so forth

CC111 Lec#3: System and application Software


The Basics of Application Software
• Software ownership rights: Specify the allowable use
of the program
• Software license: Specifies the conditions under which
a buyer of the program can use it

CC111 Lec#3: System and application Software 30


Software Ownership Rights

• Commercial software: Copyrighted software that is


developed usually by a commercial company, for sale to
others
• Shareware: Copyrighted software distributed on the
honor system; consumers should either pay for it or
uninstall it after the trial period
• Freeware: Copyrighted software programs that are given
away by the author for others to use free of charge
• Public domain software: Software that is not copyrighted
and ownership rights have been donated to the public
domain
• Open source software: Programs with source code made
available to the general public
CC111 Lec#3: System and application Software 31
Software Ownership Rights

CC111 Lec#3: System and application Software 32


Desktop vs. Mobile Software

• Mobile phones and mobile devices typically require


mobile software
– Specifically designed for a specific type of device
– Wide range of software available

CC111 Lec#3: System and application Software 33


Installed vs. Web-Based Software

• Installed software: Must be installed on the computer


before it can be run
– Can be purchased in physical form
– Can be downloaded from the Internet

CC111 Lec#3: System and application Software 34


Installed vs. Web-Based Software

• Web-based software:
Run directly from the
Internet
– Also called
Software as a
Service (SaaS)
and cloudware
– Includes free
software and fee-
based software
available via an
application service
provider (ASP)

CC111 Lec#3: System and application Software 35


Quick Quiz

1. Software programs that are distributed on the honor


system and can be legally and ethically shared with
others to try out the software are referred to as
______________________.
a. shareware programs
b. commercial software
c. public domain software
2. True or False: Software purchased via the Internet is
always in downloaded, not packaged, form.
3. A group of related software programs sold together
as one unit is called a(n) ______________________.
Answers:
1) a; 2) False; 3) software suite
CC111 Lec#3: System and application Software 36
Lecture 4

Input /Output Devices

Reference :Understanding Computers


Chapter 4

CC111 Lec#4: I/O Devices


Learning Objectives

1. Explain the purpose of a computer keyboard and the types


of keyboards widely used today.
2. List several different pointing devices and describe their
functions.
3. Describe the purposes of scanners and readers and list
some types of scanners and readers in use today.
4. Explain what digital cameras are and how they are used
today.
5. Understand the devices that can be used for audio input.
6. Describe the characteristics of a display device and explain
some of the technologies used to display images.
7. List several types of printers and explain their function.
8. Identify the hardware devices typically used for audio
output.
CC111 Lec#4: I/O Devices 2
Keyboards

• Keyboard: An input device used to enter characters at


the location marked by the insertion point or cursor
– Can be wired or wireless
• Most computers today are designed to be used with a
keyboard
• Typically contains:
– Standard alphanumeric keys
– Numeric keypad
– Function keys
– Delete and Backspace keys
– Control and Alternate keys
– Arrow directional keys and special keys
CC111 Lec#4: I/O Devices 3
Pointing Devices

• Pointing devices: Used to select and manipulate objects


– Used to input data
– Used to issue commands to the computer
• Common types of pointing devices:
– Mouse
– Pen/stylus
– Touch screen

CC111 Lec#4: I/O Devices 4


Mice
• Mouse: A common pointing device that
the user slides along a flat surface to
move a pointer around the screen and
clicks its buttons to make selections
– Older mechanical mice use a ball
– Optical or laser mice track with light
– 3D mice
– Can be
wireless

CC111 Lec#4: I/O Devices 5


Pens/Styluses

• Stylus: Pen-like device used to draw or write


electronically on the screen
• Also called digital pen, electronic pen, tablet pen
• Commonly used with pen-based computers
– Used to issue commands and input data
– If handwriting recognition is used, written text can be
converted to editable typed text

CC111 Lec#4: I/O Devices 6


Handwriting Recognition

• Digital form: Used to


input handwritten
data into the
computer and then
convert it to editable
text

CC111 Lec#4: I/O Devices 7


Touch Screens

• Touch screen: Display device that is touched with the


finger to select commands or otherwise provide input to
the computer
• Used with:
– Desktop and portable computers
– Mobile phones and mobile devices
– Surface computing
– Consumer kiosks
• Can be multi-touch

CC111 Lec#4: I/O Devices 8


Touch Screens

CC111 Lec#4: I/O Devices 9


Quick Quiz

1. An optical mouse is ____________.


a. the same as a wireless mouse
b. a mouse that tracks movements with light instead
of a ball
c. a mouse that contains a scroll wheel on the top
2. True or False: With handwriting recognition, text is
input as a graphical image so the text cannot later be
edited as text.
Answers:
1) b; 2) False

CC111 Lec#4: I/O Devices 10


Scanners, Readers, and Digital Cameras

• Source documents: Documents containing data that


already exists in physical form (order form, photograph,
invoice, check, or price label)
• Source data automation: Capturing data directly from a
source document
– Saves time
– Increases accuracy
– Scanning or reading
devices

CC111 Lec#4: I/O Devices 11


Scanners

• Scanner (optical scanner): Input device that captures an


image of an object and transfers them to a computer in
digital form
– Can scan photos, documents, drawings, (flat objects)
– Data is typically input as a single image
– If optical character recognition (OCR) is used, text is
input as individual text characters
• Types of scanners
– Flatbed
– Portable
– 3D
– Integrated (ATMs, etc.)
CC111 Lec#4: I/O Devices 12
Scanners

CC111 Lec#4: I/O Devices 13


Scanners

• Optical resolution: Quality of


scanned images
– Measured in number of dots per
inch (dpi)
– Can often be specified when
image is scanned
– Can be changed when scanned
image is edited
– Varies with scanner used
– Higher resolution = better
quality but larger file size

CC111 Lec#4: I/O Devices 14


Barcode Readers

• Barcode readers: Input devices


that read barcodes
• Barcode: Machine-readable code
that represents data as
a set of bars

CC111 Lec#4: I/O Devices 15


Radio Frequency Identification (RFID) Readers
• Radio frequency identification (RFID): Technology used
to store and transmit data located in RFID tags
• RFID tag: Contains tiny chips and radio antennas
– Attached to objects for identification purposes
– Read by RFID readers
– Tags only need to be within range of the reader, rather
than in the line of sight
• Applications
– Tracking inventory and assets
– Electronic tolls
– Tracking patients in hospitals
– Ticketing applications
– Security: Speeding up ID process
CC111 Lec#4: I/O Devices 16
Radio Frequency Identification Readers

CC111 Lec#4: I/O Devices 17


Digital Cameras

• Digital cameras: Record images on digital storage


medium rather than film
– Can either be still cameras or video cameras
– Integrated into many portable computers and mobile
phones.
• Digital still cameras
– Available in a wide variety of sizes and capabilities
– Primary appeal is images immediately available
– Camera quality is measured in megapixels
– Typically use flash memory for storage
– Camera phones can be used to read barcodes, for
mobile deposit, etc.
CC111 Lec#4: I/O Devices 18
Digital Cameras

• Digital video cameras


– Digital camcorders
– PC video cameras (PC cams, Web cam)
– Store images on digital media (flash memory, DVDs,
hard drives, etc.)
• Applications:
– Surveillance video
cameras
– Video conferences
and Webinars
– Face recognition
systems
CC111 Lec#4: I/O Devices 19
Audio Input

• Audio input: The process of entering audio data into


the computer
• Voice input: Inputting spoken words and converting
them to digital form
– Via microphone or headset
– Recorded for narrations, podcasts, etc.
– VoIP (Voice over IP systems) applications
– To provide spoken instructions to computer
(speech recognition systems)
• Music input systems are used to input music
– Microphones, keyboard controllers, etc.

CC111 Lec#4: I/O Devices 20


Voice Input Systems

CC111 Lec#4: I/O Devices 21


Display Devices

• Display device: Presents output visually


– Monitor: Display device for a desktop computer
– Display screen: Screen built into a variety of devices
• Notebook and other portable computers
• Mobile phones and mobile devices
• Handheld gaming devices, home entertainment devices, kitchen
appliances
• Digital photo frames, e-book readers

CC111 Lec#4: I/O Devices 22


Display Device Characteristics

• Color vs. monochrome


• CRT vs. flat-panel displays
• Size and aspect ratio
• Screen resolution
• Video adapters, interfaces,
and ports
• Wired vs. wireless displays
• 2D vs. 3D
• Touch and gesture capabilities

CC111 Lec#4: I/O Devices 23


Flat-Panel Display Technologies

• Liquid crystal displays (LCDs): Use charged liquid


crystals between sheets of glass or plastic
– Requires backlighting
• LED (Light emitting diode): Used in displays as well as a
variety of consumer products
• OLED (Organic Light emitting diode) – Uses layers of
organic material
– Emit visible light when current is applied

CC111 Lec#4: I/O Devices 24


Printers

• Printers: Produce hard copy


• Printer characteristics
– Printing technology used
• Impact vs. nonimpact
– Color vs. black and white
– Personal vs. network printers
– Print resolution (measured in dpi)
– Print speed (measured in pages per
minute (PPM))
– Connection (USB, Ethernet, Wi-Fi, etc.)
– Multifunction capabilities

CC111 Lec#4: I/O Devices 25


Laser Printers

• Laser printer: Uses toner powder and technology similar


to that of a photocopier to produce images on paper
– The standard for business documents
– Print one entire page at a time
– Generally faster and have better quality than ink-jet
printers
– Can be black and white or color
– Common print resolution for laser printers is between
600 and 2,400 dpi
– Use toner cartridges

CC111 Lec#4: I/O Devices 26


Ink-Jet Printers

• Ink-jet printer: Sprays droplets of ink to produce images


on paper
– Usually print in color
– Often the choice for home use
– Print fairly slowly, one line at a time
– Quality not quite as good as a laser printer
– Use ink-jet cartridges

CC111 Lec#4: I/O Devices 27


Audio Output

• Audio output: Output in the form of voice, music, and


other audible sounds
– Speakers
– Headphones and headsets
– Earphones and earbuds

CC111 Lec#4: I/O Devices 28


Quick Quiz

1. Which of the following types of display devices should


have the largest footprint (the amount of room taken
up on a desk)?
a. CRT monitor
b. OLED display
c. LCD display
2. True or False: Laser printers can only print in black
and white.
3. ______________________ printers form images with
drops of liquid ink.
Answers:
1) a; 2) False; 3) Ink-jet printers

CC111 Lec#4: I/O Devices 29


Lecture 5

Program Development and


Programming Languages

Reference :Understanding Computers


Chapter 13

CC111 Lec#5: Program Development


The Program Development Life Cycle

 Creating new programs is called


program development.

 The process associated with creating


successful applications programs is
called the program development life
cycle (PDLC).

CC111 Lec#5: Program Development


The Program Development Life Cycle

CC111 Lec#5: Program Development


How Code Relates to the .NET Framework

CC111 Lec#5: Program Development


How Code Relates to the .NET Framework

CC111 Lec#5: Program Development


How Code Relates to the .NET Framework

CC111 Lec#5: Program Development


Problem Analysis

• During problem analysis, a systems analyst and


programmer review specifications and talk with
users to fully understand what the software
should do.

• Documentation consists of program


specifications, timetable, which language will be
used, how the program will be tested, and what
documentation is required.

CC111 Lec#5: Program Development


Program Design

• Program design: stage where program specifications


are expanded into a complete design of the new
program.

• Structured programming and object-oriented


programming are two of the most significant
approaches to the design process.

CC111 Lec#5: Program Development


Program Design:
Program Design Tools

Program design tools are planning tools.


• Structure charts

• Program flowcharts

• Pseudocode

• Data modeling

CC111 Lec#5: Program Development


Program Design:
Program Design Tools

Structure charts
depict the overall organization of a program, and how the
modules of a program—logically related operations that
perform a well-defined task—are defined and how they
connect to each other hierarchically.

Program modules should be arranged hierarchically, in a top-


down fashion, so that their relationship to each other is
apparent.

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Program Design:
Program Design Tools

Program flowcharts
 use geometric symbols and familiar relational operators to
provide a graphic display of the sequence of steps involved in
a program.

 The steps in a flowchart follow each other in the same logical


sequence as their corresponding program statements will
follow in a program.
 Different symbols are used to represent different actions, such
as start/stop, decision, input/output, processing, and looping
symbols.

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
CC111 Lec#5: Program Development
CC111 Lec#5: Program Development
Program Design:
Program Design Tools

Pseudocode
uses English-like statements in place of the graphic symbols of
the flowchart.

Unlike a flowchart, pseudocode is easy to modify and can be


embedded into a program as comments.

No standard set of rules exists for writing pseudocode, although


a number of conventions have been developed.

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Program Design:
Program Design Tools

Data modeling:
a technique used to illustrate the data in an application and is
frequently used with object-oriented programming.

In a data model, the objects in the program are identified, along


with their variables and class.

CC111 Lec#5: Program Development


Program Design:
Control Structures

• Sequence

• Selection

• Iteration

CC111 Lec#5: Program Development


Program Design: Control Structures

Sequence
A sequence control structure is simply a series of
procedures that follow one another.

Statement Statement Statement ...

CC111 Lec#5: Program Development


Program Design: Control Structures

Selection
· The selection (if-then-else) control structure involves a choice: if
a certain condition is true, then follow one procedure; else, if
false, follow another.

When more than two possible choices exist, the case control
structure can be used instead.

True Statement1
Condition ...
Statement
False Statement2

CC111 Lec#5: Program Development


Program Design: Control Structures

Iteration
 loop is an operation that repeats until a certain condition is met.
 A looping (iteration) control structure can take two forms.
 With the do-while structure, the loop is executed as long as a
condition is true; with the do-until structure, the loop continues until
a certain condition becomes true.
False
...
Condition

Statement

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Program Design:
Good Program Design

n    Good program design is essential; it can save time and it


produces a better end result. Some principles of good
program design are:

• Be specific

• One-entry-point, one-exit-point rule

• No infinite loops

• Documentation during program design includes all the


design specifications

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Program Coding

• Coding: actual process of creating the program in a


programming language.
– Programming language must be chosen.
– Coding standards should be adhered to.
– Make use of reusable code and data dictionaries.
– Translate coded programs into executable code.

• Documentation results in finished source code.

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Program Coding

nThe coded program is referred to as source code.


to be executed, the program is converted by the
computer to object code using a special program.
 A compiler translates the entire program into
machine language before executing it. The
program then doesn’t need to be recompiled
until it is modified.
 An interpreter translates program statements
one at a time. Interpreters are helpful during the
debugging stage, but are slower during
execution of the finished program.
 An assembler converts assembly-language
statements into machine language.
CC111 Lec#5: Program Development
CC111 Lec#5: Program Development
Program Debugging and Testing

• Debugging: process of making sure a program is free of


errors or bugs.
– Preliminary bugging often finds syntax or logic
errors.
– Testing can consist of alpha or beta testing.

• Documentation includes a copy of the finished program


code, plus test data and results.

CC111 Lec#5: Program Development


Program Debugging and Testing

 Preliminary debugging begins after the program has been


entered into the computer system. Rarely is a program error-
free the first time it runs. Two common types of errors are
syntax errors and logic errors.

 A syntax error occurs when the programmer has not


followed the rules of the language.

 A logic error, or execution-time error, results when the


command syntax is correct but the program is producing
incorrect results.

CC111 Lec#5: Program Development


Program Debugging and Testing

 At some point in the preliminary debugging process, the


program will appear to be correct. At this point, the
programmer, or preferably someone else, will run the original
program with extensive test data.
 Good test data will subject the program to all the conditions
it might conceivably encounter when finally implemented.
 Most companies run on-site alpha tests to test programs;
companies in the business of selling software also commonly
run beta tests by distributing preliminary versions of the
program to outside users.

CC111 Lec#5: Program Development


Program Maintenance

• Program maintenance: process of updating software so


that it continues to be useful.
– A costly process, but can be used to extend the life of
a program.

• Documentation consists of amended program package


reflecting what problems occurred and what program
changes were made.

CC111 Lec#5: Program Development


What Is a Programming Language?

A programming language is a set of


rules used to write instructions to the
computer.

CC111 Lec#5: Program Development


Categories of Programming Languages

• Low-level languages

• High-level languages

• Fourth-generation languages (4GLs)

• Natural and visual languages

CC111 Lec#5: Program Development


Categories of Programming Languages

 Machine and assembly languages are called low-level


languages, because programmers who code in them must
write instructions at the finest level of detail, the base level of
the hardware.

 Although virtually no one writes machine-language programs


anymore, all programs must be translated by a language
translator into machine language before they are executed.
 Assembly languages are fast and consume little storage
when compared with higher-level languages, but take longer
to write and maintain.

CC111 Lec#5: Program Development


Categories of Programming Languages

· High-level languages differ from their low-level


predecessors in that they require less coding detail and make
programs easier to write.

Programs written in a high-level language (BASIC, COBOL,


Pascal, C, etc.) need to be translated into machine language
before they can be executed.

CC111 Lec#5: Program Development


Categories of Programming Languages

· Very-high-level languages, known as fourth-


also
generation languages (4GLs), are much easier to use
than the high-level languages that preceded them, because
they are declarative rather than procedural languages.
For instance, to draw a bar chart in a procedural language,
you must tell the computer how to draw bars and where to
place them. In a declarative language, you may be able to just
point to the data you want graphed, click several menu
choices, and you’re in business. Fourth-generation languages
are commonly used to access databases (query languages).

CC111 Lec#5: Program Development


Popular Programming Languages

• FORTRAN  BASIC and Visual Basic

• COBOL  C, C++, AND C#

• Pascal  Java

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Markup Languages

• Markup languages use symbols or tags to describe


what a document should look like when displayed.

– HTML (Hypertext Markup Language)


– Dynamic HTML
– XML (extensible markup language)
– XHTML (extensible Hypertext Markup Language)
– WML (Wireless Markup Language )

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Scripting Languages

• Scripting languages are used to build program


instructions into Web pages, usually to add dynamic
content.

– JavaScript

– VBScript

– Perl

CC111 Lec#5: Program Development


CC111 Lec#5: Program Development
Flow Charts

CC111 Lec#6 : Flow Charts 1


Definitions
Definitions

Flowchart: is a diagrammatic representation that


illustrates the sequence of operations to be performed
to get the solution of a problem.

CC111 Lec#6 : Flow Charts 2


General Rules for flowcharting

• All boxes of the flowchart are connected with Arrows. (Not lines)
• Flowchart symbols have an entry point on the top of the symbol with no other
entry points. The exit point for all flowchart symbols is on the bottom except
for the Decision symbol.
• The Decision symbol has two exit points; these can be on the sides or the
bottom and one side.
• Generally a flowchart will flow from top to bottom. However, an upward flow
can be shown as long as it does not exceed 3 symbols.
• Connectors are used to connect breaks in the flowchart. Examples are:
•  From one page to another page.
•  From the bottom of the page to the top of the same page.
•  An upward flow of more then 3 symbols
• Subroutines and Interrupt programs have their own and independent
flowcharts.
• All flow charts start with a Terminal or Predefined Process (for interrupt
• programs or subroutines) symbol.
• All flowcharts end with a terminal or a contentious loop.
CC111 Lec#6 : Flow Charts 3
Advantages of using Flowcharts
(programming chart)
• Communication: A Flowchart can be used as a better way of
communication of the logic of a system and steps involve in th1e solution,
to all concerned particularly to the client of system.
• Effective analysis: A flowchart of a problem can be used for effective
analysis of the problem.
• Documentation of Program/System: Program flowcharts are a vital part of
a good program documentation. Program document is used for various
purposes like knowing the components in the program, complexity of the
program etc.
• Efficient Program Maintenance: Once a program is developed and
becomes operational it needs time to time maintenance. With help of
flowchart maintenance become easier.
• Coding of the Program: Any design of solution of a problem is finally
converted into computer program. Writing code referring the flowchart of
the solution become easy.

CC111 Lec#6 : Flow Charts 4


CC111 Lec#6 : Flow Charts 5
How
How to Write a Program?

1.
1. Start
Start
2.
2. Define
Define Problem
Problem to to Solve
Solve
3.
3. Think
Think of of an
an Algorithm
Algorithm
4.
4. Think
Think of of aa Technique
Technique for
for the
the Solution
Solution
5.
5. Write
Write Solution
Solution onon aa Piece
Piece ofof Paper
Paper
6.
6. IfIf not
not Finished
Finished Repeat
Repeat Steps
Steps 44 and
and 55
7.
7. Write
Write Code
Code andand Program
Program
8.
8. Debug
Debug and and Test
Test
9.
9. IfIf not
not Finished
Finished Repeat
Repeat Steps
Steps 77 and
and 88
10.
10. Stop
Stop

CC111 Lec#6 : Flow Charts 6


CC111 Lec#6 : Flow Charts 7
CC111 Lec#6 : Flow Charts 8
CC111 Lec#6 : Flow Charts 9
CC111 Lec#6 : Flow Charts 10
CC111 Lec#6 : Flow Charts 11
Flowchart for the calculate the average
from 25 exam scores.

CC111 Lec#6 : Flow Charts 12


CC111 Lec#6 : Flow Charts 13
How
How to
to Write a Program?
Start

Job No
Define Problem to Solve
Done?

Think of an Algorithm Yes


(Technique for the solution)
Write Code and
Program
Idea!!!!

Debug and Test


Think of a
Technique for the solution
No Job Yes
Write it down Stop
Done?
on a piece of paper
(before you forget it!!!)

CC111 Lec#6 : Flow Charts 14


Definitions
Definitions

A computer program makes use of algorithms.

An Algorithm
is a complete step-by-step procedure for solving a
problem or accomplishing a task.

CC111 Lec#6 : Flow Charts 15


Standard Symbols Used

Start Print
Results A
On-Page
Start Or Stop Process Input/Output
Connector

Yes
Calculate
Variables
? A1

Process Rectangle No Off-page


Connector
Condition
CC111 Lec#6 : Flow Charts 16
Example
Example of
of Flow
Flow Charts
Charts

CC111 Lec#6 : Flow Charts 17


Example
Example of
of Flow
Flow Charts
Charts (Cont.)
(Cont.)

CC111 Lec#6 : Flow Charts 18


Basic
Basic Flow
Flow Chart
Chart Operations
Operations
All computer instructions are based on four basic
processing patterns:

1. Simple Sequence
2. Selection Pattern
3. Loop Pattern
4. Branch Pattern

CC111 Lec#6 : Flow Charts 19


Basic
Basic Flow
Flow Chart
Chart Operations
Operations

1.Simple Sequence

• Logic involves executing instructions one


statement after another, in the order presented
by the program.
• This is the simplest and most-used pattern.
• The computer assumes that all instructions are
to be executed in this order unless the program
presents other instructions.

CC111 Lec#6 : Flow Charts 20


Basic
Basic Operations
Operations of
of Flow
Flow Charts
Charts (Simple
(Simple Sequence)
Sequence)

Read Names

Compare with Criteria

Print Eligible Names

CC111 Lec#6 : Flow Charts 21


Basic
Basic Flow
Flow Chart
Chart Operations
Operations
2. Selection Pattern

• Requires that the computer make a choice among two or


more items.
• Each choice is based on one of two comparisons a
computer can make: true or false (Yes or No).

CC111 Lec#6 : Flow Charts 22


Basic
Basic Operations
Operations of
of Flow
Flow Charts
Charts
(Selection
(Selection Pattern)
Pattern)

No Honour
Yes
Student
?

List under List under


Student Loan Scholarships

CC111 Lec#6 : Flow Charts 23


Basic
Basic Flow
Flow Chart
Chart Operations
Operations
3. Loop Pattern

• Causes an interruption in the normal sequence of


processing and directs the computer to loop back
to a previous statement in the program, repeating
the same sequence over again, usually with new
data.
• By looping, the programmer avoids having to
repeat the same set of instructions over and
over.

CC111 Lec#6 : Flow Charts 24


Basic
Basic Operations
Operations of
of Flow
Flow Charts
Charts (Loop
(Loop Pattern)
Pattern)

More No
Names?

Yes

Compare with Criteria

Print Eligible Names

CC111 Lec#6 : Flow Charts 25


Basic
Basic Flow
Flow Chart
Chart Operations
Operations
4. Branch Pattern

• Is often used in combination with selection or


looping.
• The branch pattern allows the computer to skip
statements in a program.
• The branch encourages undisciplined jumping
around among program statements, a
characteristic that is frowned on by most
programming experts.
• Branching is difficult to follow and is an
inefficient use of computer power.
CC111 Lec#6 : Flow Charts 26
Basic
Basic Honour No
1
Student?
Operations
Operations of
of
Flow
Flow Charts Yes

(Branch
(Branch Read Area of Concentration

Pattern)
Pattern)
Read Courses Taken
1
Compare with Criteria

CC111 Lec#6 : Flow Charts 27


Uses of Flow Charts
 Flowcharts play a vital role in the programming of a
problem and are quite helpful in understanding the logic of
complicated and lengthy problems.
 Once the flowchart is drawn, it becomes easy to write the
program in any high level language.

 Often we see how flowcharts are helpful in explaining the


program to others.
 Hence, it is correct to say that a flowchart is a must for the
better documentation of a complex program.

CC111 Lec#6 : Flow Charts 28


Uses of Flow Charts (Cont.)

 Flow
 Flow Charts
Charts document
document processes
processes andand interrelationships
interrelationships
of
of process
process steps
steps
 Flow
 Flow Charts
Charts identify
identify actual
actual and
and ideal
ideal paths
paths where
where any
any
product
product or
or process
process flows
flows
 Flow
 Flow Charts
Charts are
are used
used toto identify
identify problems
problems and
and potential
potential
improvements
improvements
 Flow
 Flow Charts
Charts can
can bebe completed
completed on on entire
entire processes
processes
assemblies
assemblies withwith allall components,
components, one one person
person or or
component
component through
through aa process,
process, combinations
combinations of of people
people
and
and machines,
machines, transactions
transactions following
following forms
forms oror other
other
documents,
documents, etc.
etc.
CC111 Lec#6 : Flow Charts 29
Advantages of Flow Charts

 Communication:
 Communication: Flowcharts
Flowcharts areare better
better way
way of
of
communicating
communicating the the logic
logic ofof aa system
system to to all
all
concerned.
concerned.
 Effective
 Effective Analysis:
Analysis: With
With the
the help
help of
of flowchart,
flowchart,
problem
problem can
can be
be analysed
analysed in
in more
more effective
effective way.
way.
 Proper
 Proper Documentation:
Documentation: Program
Program flowcharts
flowcharts serve
serve
as
as aa good
good program
program documentation,
documentation, whichwhich isis
needed
needed for
for various
various purposes.
purposes.

CC111 Lec#6 : Flow Charts 30


Advantages
Advantages of
of Flow
Flow Charts
Charts (Cont.)
(Cont.)

 Efficient
 Efficient Coding:
Coding: The
The flowcharts
flowcharts act
act as
as aa guide
guide or
or
blueprint
blueprint during
during thethe systems
systems analysis
analysis andand
program
program development
development phase.
phase.
 Proper
 Proper Debugging:
Debugging: The The flowchart
flowchart helps
helps inin
debugging
debugging process.
process.
 Efficient
 Efficient Program
Program Maintenance:
Maintenance: TheThe maintenance
maintenance
of
of operating
operating program
program becomes
becomes easy
easy with
with the
the help
help
of
of flowchart.
flowchart. ItIt helps
helps the
the programmer
programmer to to put
put efforts
efforts
more
more efficiently
efficiently on
on that
that part.
part.

CC111 Lec#6 : Flow Charts 31


Disadvantages of Flow Charts
 Complex
 Complex Logic:
Logic: Sometimes,
Sometimes, the the program
program logiclogic
is
is quite
quite complicated.
complicated. In In that
that case,
case, flowchart
flowchart
becomes
becomes complex
complex andand clumsy.
clumsy.
 Alterations
 Alterations and and Modifications:
Modifications: IfIf alterations
alterations areare
required
required thethe flowchart
flowchart may
may require
require re-drawing
re-drawing
completely.
completely.
 Reproduction:
 Reproduction: As As the
the flowchart
flowchart symbols
symbols cannot
cannot
be
be typed,
typed, reproduction
reproduction of of flowchart
flowchart becomes
becomes aa
problem.
problem.
 The
 The Essentials
Essentials of of what
what IsIs Done
Done cancan easily
easily be
be
lost
lost in
in the
the technical
technical details
details of
of how
how itit is
is done.
done.
CC111 Lec#6 : Flow Charts 32
Case
Case Study
Study -- 11

A certain Company gives each of its sales people


$1,000 at the beginning of each month to cover
travel, lodging, and food expenses.

At the end of the month, a salesperson must total


his/her expense receipts. If the amount is less than
$1,000 then the difference must be returned to the
company.

CC111 Lec#6 : Flow Charts 33


Case
Case Study
Study –– 11 (Solution)
(Solution)
Here is an algorithm for figuring how much money, if
any, must be returned:

1. Total the expense receipts for the month.


2. Subtract the amount of the expense receipts from
1,000.
3. If the remainder is more than 0, return that
amount to the company.

CC111 Lec#6 : Flow Charts 34


Start
Case
Case Study
Study –– 11
(Flow
(Flow Chart)
Chart)
Input Expenses

Yes ?
E<1000

Subtract Expenses
No
R <= 1000-E
Print
Print You Owe $0
You Owe $R

Stop

CC111 Lec#6 : Flow Charts 35


Case
Case Study
Study –– 11 (Solution
(Solution 1)
1)

Assume the Employee has Spent


$1250

What would be the amount to return to the company in this


case?

CC111 Lec#6 : Flow Charts 36


Start
Case
Case Study
Study –– 11
(Solution
(Solution 1)
1)
Input Expenses

Yes ?
E<1000

E=$1250 Subtract Expenses


No
R <= 1000-E
Print
Print You Owe $0
You Owe $R

Stop

CC111 Lec#6 : Flow Charts 37


Case
Case Study
Study –– 11 (Solution
(Solution 2)
2)

Now Assume the Employee has Spent


$950

What would be the amount to return to the company in this


case?

CC111 Lec#6 : Flow Charts 38


Case
Case Study
Study –– 11 (Solution
(Solution 2)
2)
Start

Input Expenses

EE == $950
$950 Yes E<1000
?
R
R == 1000
1000 -- EE
Subtract Expenses
No
R = 1000-E
R
R == $50
$50 Print
Print You Owe $0
You Owe $R

Stop

CC111 Lec#6 : Flow Charts 39


Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting
Charting

• In drawing a proper flowchart, all necessary


requirements should be listed out in logical
order.
• The flowchart should be clear, neat and
easy to follow. There should not be any
room for ambiguity in understanding the
flowchart.
• The usual direction of the flow of a
procedure or system is from left to right or
top to bottom.
CC111 Lec#6 : Flow Charts 40
Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting(Cont.)
Charting(Cont.)

• Only one flow line should come out from


a process symbol.

CC111 Lec#6 : Flow Charts 41


Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting
Charting (Cont.)
(Cont.)

• Only one flow line should enter a decision


symbol, but two or three flow lines, one for
each possible answer, should leave the
decision symbol.              

Y > <
? ?

N =

CC111 Lec#6 : Flow Charts 42


Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting
Charting (Cont.)
(Cont.)

• Only one flow line is used in conjunction


with terminal symbol.                 

Start
Stop

CC111 Lec#6 : Flow Charts 43


Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting
Charting (Cont.)
(Cont.)

• Write within standard symbols briefly. As


necessary, you can use the annotation
symbol to describe data or computational
steps more clearly.
• If the flowchart becomes complex, it is
better to use connector symbols to reduce
the number of flow lines.
• Avoid the intersection of flow lines if you
want to make it more effective and better
way of communication.

CC111 Lec#6 : Flow Charts 44


Basic
Basic Guidelines
Guidelines for
for Flow
Flow Charting
Charting (Cont.)
(Cont.)

• Ensure that the flowchart has a logical start


and finish.
• It is useful to test the validity of the
flowchart by passing through it with a
simple test data.

CC111 Lec#6 : Flow Charts 45


Case
Case Study
Study -- 22

Draw a flowchart to find the sum of first 5 natural numbers.

CC111 Lec#6 : Flow Charts 46


Start

Sum = 0
Case
Case Study
Study -- 22
N=0 N Sum

0 0
N=N+1
1 1
Sum = Sum + N
2 3

No
3 6
?
N=5
4 10
Yes
5 15
Print Sum

Stop
CC111 Lec#6 : Flow Charts 47
Case
Case Study
Study -- 33

Draw a flowchart to find the largest of three numbers A,B, and


C.

CC111 Lec#6 : Flow Charts 48


Case
Case Study
Study -- 33
Start

Read A, B, C

Yes ? No ? Yes ? Yes


B>C A>B A>C

No No

Print B Print C Print C Print A

Stop

CC111 Lec#6 : Flow Charts 49


Case
Case Study
Study –– 33 -- (Solutions)
(Solutions)

Consider four input cases:

1. A = 5 ; B = 7 ; C = 3

2. A = 5 ; B = 6 ; C = 7

3. A = 5 ; B = 3 ; C = 7

4. A = 5 ; B = 3 ; C = 3
CC111 Lec#6 : Flow Charts 50
Case
Case Study
Study –– 33 (Solution
(Solution 1)
1)
A=5
Start
B=7
Read A, B, C
C=3

Yes ? No ? Yes ? Yes


B>C A>B A>C

No No

Print B Print C Print C Print A

Stop

CC111 Lec#6 : Flow Charts 51


Case
Case Study
Study –– 33 (Solution
(Solution 2)
2)
A=5
Start
B=6
Read A, B, C
C=7

Yes ? No ? Yes ? Yes


B>C A>B A>C

No No

Print B Print C Print C Print A

Stop

CC111 Lec#6 : Flow Charts 52


Case
Case Study
Study –– 33 (Solution
(Solution 3)
3)
A=5
Start
B=3
Read A, B, C
C=7

Yes ? No ? Yes ? Yes


B>C A>B A>C

No No

Print B Print C Print C Print A

Stop

CC111 Lec#6 : Flow Charts 53


Case
Case Study
Study –– 33 (Solution
(Solution 4)
4)
A=5
Start
B=3
Read A, B, C
C=3

Yes ? No ? Yes ? Yes


B>C A>B A>C

No No

Print B Print C Print C Print A

Stop

CC111 Lec#6 : Flow Charts 54


Case
Case Study
Study -- 44

Draw a flowchart for computing factorial N (N!). Where N! = 1


´ 2 ´ 3 ´ …… N .

Test the program for N = 5

CC111 Lec#6 : Flow Charts 55


Start
Case
Case Study
Study -- 44
Read N

Fact = 1 N i Fact

i=0 5 0 1

1 1
i=i+1
2 2
Fact = Fact * i 3 6

4 24
? No
i >= N 5 120
Yes
Print Fact Stop
CC111 Lec#6 : Flow Charts 56
ADD 2 Numbers

CC111 Lec#6 : Flow Charts 57


ADD 2 Positive Numbers

CC111 Lec#6 : Flow Charts 58


Divide 2 Numbers (Dominator mustn’t = 0)

CC111 Lec#6 : Flow Charts 59


ADD Numbers from 1-100

CC111 Lec#6 : Flow Charts 60


ADD Even Number from 0 – 50

CC111 Lec#6 : Flow Charts 61


Factorial N!

CC111 Lec#6 : Flow Charts 62


Freezing Point is 32 “Fahrenheit”

CC111 Lec#6 : Flow Charts 63


CC111 Lec#6 : Flow Charts 64
Trace the following and
Answer the questions below:
1. In the flowcharts above,
what will be the first
action you take?
2. fill in the table
3. Describe the eventual
result of your actions if
you follow the flowcharts
above from start to end .

CC111 Lec#6 : Flow Charts 65


CC111 Lec#6 : Flow Charts 66
CC111 Lec#6 : Flow Charts 67
CC111 Lec#6 : Flow Charts 68
CC111 Lec#6 : Flow Charts 69
CC111 Lec#6 : Flow Charts 70
CC111 Lec#6 : Flow Charts 71
Flowchart to Perform Arithmetic Operations
Using Switch

CC111 Lec#6 : Flow Charts 72


Homework

• Draw a flowchart that reads in 130 numbers and


then .determine whether a number is odd or even.
 
• Draw a flowchart to take the student’s grade and
print out
– If he got a grade < 50 print “BAD”
– If he got a grade >=50 print “PASS”
– If he got a grade >=70 print “GOOD”
– If he got a grade >=80 print “ V.GOOD”
– If he got a grade >=90 print “Excellent”

CC111 Lec#6 : Flow Charts 73


Lecture 7

Visual Basic(1)

CC111 Lec7 : Visual Basic


Objectives

• The student should be familiar with the Visual Basic


Environment.
• The student should be able to build a simple Visual Basic
Application.

CC111 Lec7 : Visual Basic


What is Visual Basic?

• High Level 4th Generation Programming Language

• Object and Event Driven

• Visual - Windows Based

• Integrated Development Environment or IDE

CC111 Lec7 : Visual Basic


What is VB Used For?

• Most Popular Programming Language


• Stand alone programs
• Customized specialized Applications
– E- Commerce
• Web based shopping forms and inquiries
• User friendly Interface to applications

CC111 Lec7 : Visual Basic


Example Order Entry Screen

llllll

Also enables user to click on


buttons
Allows user to use a mouse to initiate
to click processing
on boxes for text entry.
steps.

Used by a computer equipment retail


outlet to record data regarding customer
CC111 Lec7 : Visual Basic
Generations of Computer Languages

• 1st - Machine language - 0110 0011 1000


• 2nd - Procedure-oriented languages
– FORTRAN - 1954 for scientists and engineers
– COBOL - 1959 for business applications
– C - 1972 - for UNIX operating systems
• 3rd - Object-oriented languages
• 4th - Event-driven languages - i.e. VB
• 5th - Natural languages

CC111 Lec7 : Visual Basic


Compiler Vs Interpreter

• Higher Languages are translated to Machine Language by:


– Interpreter
• Translates instructions to machine code line-by-line.
• BASIC, Quick Basic, Visual Basic
– Compiler
• Translates the entire program to machine code before
running it.
• Fortran, C, C++, Visual Basic is also a compiler

CC111 Lec7 : Visual Basic


What are the Objects in VB?

• Pre-programmed Code for:


– Command Buttons
– Labels
– Pictures
– Text Boxes
• Have both data and
• procedures wrapped together

CC111 Lec7 : Visual Basic


What are the Events?

 Visual Basic “watches” what the user does

 A user activity is called an event

 Events include mouse clicks and moves, menu


selections, button presses, etc.

 Sections of code are only executed in response to an


event

CC111 Lec7 : Visual Basic


What is the Integrated
Development Environment (IDE)?
Project Explorer
(Lists forms)

Toolbox Form Designer


(Objects) Window

Properties

Code Editor Forms Layout


Window

CC111 Lec7 : Visual Basic


Visual Basic Environment

GUI (Graphical User Interface) - forms and windows that


the user sees
Property - a characteristic or attribute of an object such as
color and size
Event - a user action such as clicking a button
Code Editor window - editor specially designed to help
you when writing code

CC111 Lec7 : Visual Basic


Visual Basic Environment

• Components of the VB design environment (Form view)

CC111 Lec7 : Visual Basic


Visual Basic Environment

• Components of the VB design environment (Code view)

CC111 Lec7 : Visual Basic


The Code Editor Window
Object List Box
Procedure List Box

Full Module View


button

Auto List Members

CC111 Lec7 : Visual Basic


The Code Editor Window

Help
window

Syntax error in Red

Procedure view button


Error message box

CC111 Lec7 : Visual Basic


VB Environment: Project Window

• The Project Window can be used to navigate between the code


and form window for each form / window a project has

CC111 Lec7 : Visual Basic


VB Environment: Menu Bar
Title bar Menu Bar Toolbar

• The Menu Bar consists of 3 elements the


– Title Bar, which holds the name of application, default if
Microsoft Visual Basic [design]
– Menu Bar, this is the link to Visual Basics menu facilities,
each menu option drops down into sub-menus
– Toolbar, contains icons which give access to the more
commonly used commands (which are also available
through the menu bar)

CC111 Lec7 : Visual Basic


VB Environment: Properties Window

• Used to set how a control looks


and behaves

• Holds its default values

CC111 Lec7 : Visual Basic


VB Environment: Control Toolbox

Pointer Picture
Label Text Box
Group Frame Command Button
Check Box Option/Radio Button
Combo Box List Box
Horizontal Scroll Vertical Scroll Bar
Bar Drive List Box
Timer File List Box
Directory List Box Line
Shape Data Control
Image
OLE

CC111 Lec7 : Visual Basic


VB Environment: Context Sensitive Help

• Context sensitive help is very useful


• Select the item control that you want help on
• Press the F1 key

F1

CC111 Lec7 : Visual Basic


The File Menu

Project
commands

Make executable
commands
Most recent project list

Exit command

CC111 Lec7 : Visual Basic


The File Menu

• Save Component
New Project
• Open Component
Save Project As
• Add Project
Print
• Remove
Print Setup
Project
• Save Project
• Save Project As

CC111 Lec7 : Visual Basic


The File Menu

Template - particular pattern for a project or a project


element; start a project from a template saves time
Existing tab - displays VB projects
Recent tab - displays most recently accessed projects
Project Groups - a collection of several projects

CC111 Lec7 : Visual Basic


Building Your First Application

• There are three primary steps in building a Visual


Project:
– Place (or draw) controls on the form.
– Assign properties to the controls.
– Write event procedures for the controls.

CC111 Lec7 : Visual Basic


Project Files

vbp extension = Visual Basic Project


– file that tracks all components
frm extension = Form file
– separate file for each form
frx extension = Binary form file
– cannot be read by humans
vbw extension = Visual Basic workspace

CC111 Lec7 : Visual Basic


Starting Visual Basic

CC111 Lec7 : Visual Basic


Choosing Project Type

CC111 Lec7 : Visual Basic


Placing Controls on the Form: Image

CC111 Lec7 : Visual Basic


Assigning Properties to Controls

CC111 Lec7 : Visual Basic


Adding an Image

CC111 Lec7 : Visual Basic


Browse for an Image

CC111 Lec7 : Visual Basic


Image Displayed

CC111 Lec7 : Visual Basic


Buttons and Text Boxes

CC111 Lec7 : Visual Basic


Changing the Form Title

CC111 Lec7 : Visual Basic


Writing the Code (Events)

CC111 Lec7 : Visual Basic


Writing the Code (Events)

CC111 Lec7 : Visual Basic


Running the Application

CC111 Lec7 : Visual Basic


Running the Application

CC111 Lec7 : Visual Basic


Lecture 8

Visual Basic (2)

CC111 Lec8 : Visual Basic


Objectives

• The student should learn more about writing more


advanced Visual Basic code.
• The student should learn the precedence rules for writing
equations.

CC111 Lec8 : Visual Basic


Syntax Boxes

• Syntax for a Visual Basic statement is shown in a syntax


box
• Reserved words are shown in bold
• Programmer named words are shown in italics

CC111 Lec8 : Visual Basic


The Sub Statement
Private Sub controlname_eventname( )
Statements
End Sub
Where
Private is the default procedure type
Sub indicates beginning of procedure
controlname is name of associated control
_ (underscore) required separator
eventname is name of corresponding event
( ) set of parentheses is required
End Sub indicates end of a procedure
CC111 Lec8 : Visual Basic
The Sub Statement

Example
Private Sub cmdCalcTriangle_Click
Dim Base As Single
Dim Height As Single
Dim Area As Single
Area = (1 / 2) * (Base * Height)
End Sub

CC111 Lec8 : Visual Basic


Declarations, Variables, and Constants

Variable - a uniquely named storage location that contains


data that changes during program execution

Constant - a uniquely named storage locations that


contains data that does not change during program
execution

CC111 Lec8 : Visual Basic


Declarations, Variables, and Constants

Rules for Naming Variables


– Must begin with an alphabetic character
– Can’t contain a period or type-declaration
characters such as
%, &, !, #, @ or $
– Must be unique with same scope
– Must be no longer than 255 characters
– Should not reserved word
CC111 Lec8 : Visual Basic
Declaring Variables

Declaration statement – non executable code that sets aside


storage locations for future use
Local variables - declared within a procedure or function
Global variables - declared in the general section of the
application

CC111 Lec8 : Visual Basic


Declaring Variables

• Declare variables using the Dim or Static statements


Dim statement - value of variable
preserved only until procedure ends
Static statement - value of variable
preserved the entire time the application
is running

CC111 Lec8 : Visual Basic


The Dim Statement

Dim variablename As datatype

Where
Dim is required
variablename should be a descriptive name
As is required
datatype is one of the following types:
Boolean, Byte, Date, Integer, Long, Single, Double,
Currency, String, Object or Variant

CC111 Lec8 : Visual Basic


Declaring Variables

Data Types
– Boolean - True or false
– Date - From Jan 1, 100 to Dec 31, 9999
– Integer - Numbers without a decimal point
– Long - Long integer
– Single - Numbers with a decimal point
– Double - Long Single
– Currency - Dollar amounts
– String - Character and alphanumeric data
– Object - Any object reference such as Word document
– Variant - default, can hold any data type

CC111 Lec8 : Visual Basic


Assigning Values to Variables

Variablename = value
Where
variablename is the descriptive name of the variable
= is the assignment operator
value is the value the variable will contain
Examples:
Number1 = 5
FirstName = “Steve”
Length = 17.8
Note: Order is important. Variable name always on the left, and
value on the right.

CC111 Lec8 : Visual Basic


Declaring Constants

Const constantname As datatype = value


Where
Const is required
constantname is the descriptive name of the constant
As is required
datatype is the type of data the constant will contain
= is the assignment operator
value is the value of the constant
Examples:
Const Pi As Single = 3.14159265358979
Const MaxNumber As Integer = 100

CC111 Lec8 : Visual Basic


Functions

• Function - unit of code that returns a value


• Built-in Functions
– Sqr - square root
– Rnd - random number generator
– Int - returns integer portion of a number
– Val - converts a string to a value
– Str - converts a value to a string

CC111 Lec8 : Visual Basic


Application 1: Calculate the area of a circle

• Inputs: radius of the circle r


• Output: area of the circle

• Process: Area=
2
r

CC111 Lec8 : Visual Basic


Application 1: Calculate the area of a
circle (Form View)

CC111 Lec8 : Visual Basic


Application 1: Calculate the area
of a circle (Code View)

CC111 Lec8 : Visual Basic


Application 1: Calculate the area
of a circle (Run)

CC111 Lec8 : Visual Basic


Precedence Table

Operator
()
^
*, /
+,-
If precedence of two following operators is
equal, then the evaluation starts from left to
right.
CC111 Lec8 : Visual Basic
Simple Examples of Equations

• Equation in normal  Equation in VB


form: form:
1. Y=3X 1. Y=3*X
2. Y=X-10+3(X-Z)
2. Y=X-10+3*(X-
3. Y=X^2*10
Z)
4. Y=
X 3. Y=X*X*10
4. Y=SQR(X)

CC111 Lec8 : Visual Basic


Application 2: Convert from Fahrenheit Degree to Celsius

• Original formula: Celsius=5/9 (Fahrenheit - 32)


• Visual Basic formula: Celsius=5/9*(Fahrenheit-32)
• Input: Fahrenheit
• Output: Celsius
• Process: Celsius=5/9*(Fahrenheit-32)

CC111 Lec8 : Visual Basic


Application 2
Convert from Fahrenheit Degree to Celsius (Form View)

CC111 Lec8 : Visual Basic


Application 2
Convert from Fahrenheit Degree to Celsius (Code View)

CC111 Lec8 : Visual Basic


Application 2
Convert from Fahrenheit Degree to Celsius (Run)

CC111 Lec8 : Visual Basic


Application 3
The Wind Chill Application

• Write a program that calculates the


wind chill temperature
• Inputs: Wind Speed and Temperature
• Outputs: Wind Chill Temperature

CC111 Lec8 : Visual Basic


Application 3
The Wind Chill Application

• Original formula
WC = 0.0817(3.71(V **0.5) + 5.81 - 0.25V)(T - 91.4) +
91.4
• Visual Basic statement
WC = 0.0817 * (3.71 * Sqr(V) + 5.81 -(0.25 * V)) * (T -
91.4) + 91.4
• Output: Wind Chill (WC)
• Input 1 T: Temperature
• Input 2 V: Wind Speed

CC111 Lec8 : Visual Basic


Adding Controls and Changing their Properties

CC111 Lec8 : Visual Basic


Writing the Code

CC111 Lec8 : Visual Basic


Running the Application

CC111 Lec8 : Visual Basic


Lecture 9

Visual Basic (3)

CC111 Lec9 : Visual Basic


Controlling your Application

• Sequence

• Selection
– If...Then...Else statement
– Select Case statement

– For...Next Loop statement
– For Each...Next statement
– Do Loops

CC111 Lec9 : Visual Basic


Selection If..Then..Else

If (condition) Then (statement[s])


[ElseIf (condition) Then
(statement[s])]
[Else (statement[s])]

CC111 Lec9 : Visual Basic


Selection Application: Convert from Numerical
Grade to Letter Grade

Input Output
049 F
•Input: a numeric grade 5052 D
between 0 and 5356 D+
100 5760 C-
6164 C
•Output: depends on input 6569 C+
7074 B-
7579 B
8084 B+
8589 A-
90100 A
CC111 Lec9 : Visual Basic
Selection Application
Convert from Numerical Grade to Letter Grade (Form View)

CC111 Lec9 : Visual Basic


Selection Application: Convert from Numerical Grade to
Letter Grade (Code View)

CC111 Lec9 : Visual Basic


Selection Application
Convert from Numerical Grade to Letter Grade (Run)

CC111 Lec9 : Visual Basic


For...Next Loop Structure

For counter = start To end Step increment


statements
Next counter

Where
Counter is tested to see if less than end.
If so, repeat loop again.
If not, go to statement after Next.

CC111 Lec9 : Visual Basic


Loops Application: Factorial

• Factorial (N)= N*(N-1)*(N-2)……….*(1)

CC111 Lec9 : Visual Basic


Factorial Flowchart (N>0)

CC111 Lec9 : Visual Basic


Factorial Application: Form View

CC111 Lec9 : Visual Basic


Factorial Application: Code View
Using For..Next Loop

CC111 Lec9 : Visual Basic


Factorial Application: Run

CC111 Lec9 : Visual Basic


Do While...Loop Structure

Do While condition
statements
Loop

Where
The condition is tested, and if true the loop is
repeated.
When the condition is false, the statements are
skipped after Loop is executed.
CC111 Lec9 : Visual Basic
Loops Application: Factorial

• Factorial (N)= N*(N-1)*(N-2)……….*(1)

CC111 Lec9 : Visual Basic


Factorial Application: Form View

CC111 Lec9 : Visual Basic


Factorial Application: Code View
Using Do..While..Loop

CC111 Lec9 : Visual Basic


Do Until...Loop Structure

Do Until condition
statements
Loop

Where
The condition is tested, and if false the loop is
repeated.
When the condition is true, the statements are
skipped after Loop is executed.
CC111 Lec9 : Visual Basic
Loops Application: Factorial

• Factorial (N)= N*(N-1)*(N-2)……….*(1)

CC111 Lec9 : Visual Basic


Factorial Application: Form View

CC111 Lec9 : Visual Basic


Factorial Application: Code View
Using Do..Until..Loop

CC111 Lec9 : Visual Basic


Factorial Application: Run

CC111 Lec9 : Visual Basic


Lecture 10

Storage System

Reference :Understanding Computers


Chapter 3

CC111 Lec#10 : Storage System


Learning Objectives

1. Name several general properties of storage systems.


2. Describe the two most common types of hard drives
and what they are used for today.
3. Discuss the various types of optical discs available and
how they differ from each other.
4. Identify some flash-memory-based storage devices and
media and explain how they are used today.

CC111 Lec#10 : Storage System 2


Storage System Characteristics

• Consist of a storage device and a storage medium


– Device: DVD drive, flash memory card reader, etc.
– Medium: DVD disc, flash memory card, etc.
– Medium is inserted
into device to be
used
– Storage devices
are typically
identified by
letter

CC111 Lec#10 : Storage System 3


Storage System Characteristics

• Can be internal, external, or remote


• Are nonvolatile
• Usually use random access; can be sequential
• Logical file representation: The user’s view of the way
data is stored
• Physical file representation: The actual physical way the
data is stored on the storage media as viewed by the
computer
• Storage technologies:
– Magnetic (conventional hard drives)
– Optical (optical discs)
– Electrons (flash memory media)

CC111 Lec#10 : Storage System 4


Logical vs. Physical Representation

• File: Anything stored on a storage medium, such


as a program, document, digital image, or song
• Filename: Name given to a file by the user
• Folder: Named place on a storage medium
into which files can be stored

CC111 Lec#10 : Storage System 5


Hard Drives

• Hard drive: Used to store most programs and data


– Can be internal and external
– Can be encrypted
• Magnetic hard drives
– Use metal hard disks
– Read/write heads magnetize particles to represent the
data’s 0s and 1s
• Solid-state drives (SSDs)
– Use flash memory technology
– Use less power and have no moving parts
– Particularly appropriate for portable computers

CC111 Lec#10 : Storage System 6


Magnetic Hard Drives

• Hard disks are divided into


− Tracks
− Sectors
− Clusters
− Cylinders

CC111 Lec#10 : Storage System 7


Solid State Drives (SSDs)

CC111 Lec#10 : Storage System 8


External Hard Drives

CC111 Lec#10 : Storage System 9


Hard Drive Speed and Caching

• Disk access time: Total time that it takes for a hard


drive to read or write data
– Consists of seek time, rotational delay, and data
movement time
• Disk cache: Dedicated part of RAM used to store
additional data adjacent to data retrieved during a disk
fetch to improve system performance
• Hybrid hard drive
– Combination of flash memory and magnetic hard
drive
– Uses flash memory for cache
– Allows encryption to be built into the drive

CC111 Lec#10 : Storage System 10


Partitioning and File Systems

• Partitioning: Logically divides the physical capacity of a


single drive into separate areas, called partitions
– Partitions function as independent hard drives
– Referred to as logical drives
– Increase efficiency (smaller drives use smaller clusters)
• Partitions used to:
– Create a recovery partition
– Create a new logical drive for data
– Create a dual boot system
• File system: Determines the cluster size, maximum drive
size, and maximum file size
– FAT, FAT32, and NTFS
CC111 Lec#10 : Storage System 11
Hard Drive Interface Standards

• Hard drive interface standards: Determine how a drive


connects to the computer
• Common standards:
– Parallel ATA (PATA): older, slower standard
– Serial ATA (SATA)

CC111 Lec#10 : Storage System 12


Quick Quiz

1. Of the following three options, the storage media that


would hold the most data is a(n)
_______________________.
a. internal hard drive
b. USB flash memory drive
c. portable hard drive
2. True or False: Hard drives typically contain more than
one metal hard disk.
3. The circular rings on a magnetic disk on which data is
stored are called ________________________.
Answers:
1) a; 2) True; 3) tracks

CC111 Lec#10 : Storage System 13


Optical Discs

• Optical discs: store data optically (using laser beams)


– Divided into sectors like magnetic discs but use a
single spiral track (groove)
– Data is stored in 0s and 1s
• Pits and lands are used to represent 1s and 0s, the
transition between a pit and a land represents a 1; no
transition represents a 0
• Can be:
– Read-only: Surface is molded or stamped to
represent the data
– Recordable or rewritable: Reflectivity of surface is
changed by a laser

CC111 Lec#10 : Storage System 14


Optical Discs

CC111 Lec#10 : Storage System 15


Optical Drives

• Optical drives: Designed for type of disc: CD, DVD, or


Blu-Ray Disc (BD)
– Can be read-only, recordable, or rewritable
– Downward compatible
– Can support single or dual layer discs
• Burning: Recording data onto disc
– CD discs: Use infrared lasers; hold 650 MB
– DVD discs: Use red lasers; hold 4.7 GB (single-layer)
– BD discs: Use blue-violet lasers; hold 25 GB (single-
layer)
• Can be internal or external drives
– External drives typically USB
CC111 Lec#10 : Storage System 16
Read-Only Discs

• Read-only disc: Can be read from, but not written to, by


the user
– CD-ROM (compact disc read-only memory)
– DVD-ROM (digital versatile disc read-only memory)
– BD-ROM (Blu-Ray disc read-only memory)
• Normally come pre-recorded
– Software programs
– Clip art and other graphics
– Music
– Movies
– Games (UMD, Wii, Xbox, etc.)

CC111 Lec#10 : Storage System 17


Recordable Discs

• Recordable disc: Can be written to, but cannot be


erased and reused
– CD-R discs
– DVD-R/DVD+R discs; can be dual-layer
– BD-R; can be dual-layer
• Used for back up, sending large files to others, creating
custom music CDs, storing home movies, etc.

CC111 Lec#10 : Storage System 18


Rewritable Discs

• Rewritable disc: Can be recorded on, erased, and


overwritten just like magnetic discs
– CD-RW
– DVD-RW
– BD-RE; can be dual layer
• Use phase-change technology
– Heating and cooling process is used to change the
reflectivity of the disc
– Can be changed back to erase the disc

CC111 Lec#10 : Storage System 19


Quick Quiz

1. The capacity of the typical CD disc is


______________________.
a. 50 GB
b. 650 MB
c. 4.7 GB
2. True of False: A DVD-RW disc can be written to and
rewritten to.
3. The tiny depressions, dark areas, or otherwise altered
spots on an optical disc that are used to represent data
are called ______________________.
Answers:
1) b; 2) True; 3) pits

CC111 Lec#10 : Storage System 20


Flash Memory Systems

• Chip-based storage medium


– No moving parts so more resistant to shock and vibration,
require less power, make no sound
– Solid-state storage system
• Most often found in the form of:
– Flash memory cards
– USB flash drives
– Solid-state drives
– Hybrid hard drives
• Very small and so are very appropriate for use with
digital cameras, digital music players, GPS devices,
notebook computers, mobile devices, etc.

CC111 Lec#10 : Storage System 21


Flash Memory Systems

CC111 Lec#10 : Storage System 22


Flash Memory Cards

• Flash memory card: A small card containing one or more


flash memory chips, controller chips, and metal contacts
to connect the card to the device or reader that it is being
used with
– CompactFlash
– Secure Digital (SD)
– Secure Digital High Capacity (SDHC)
– Secure Digital Extended Capacity (SDXC)
– MultiMedia Card (MMC)
– xD Picture Card
– Memory Stick
• Read by flash memory card reader

CC111 Lec#10 : Storage System 23


Flash Memory Cards

CC111 Lec#10 : Storage System 24


USB Flash Drives

• USB flash drives: Consist of flash memory media and a


reader in a single self-contained unit
– Typically portable drives that connect to and are
powered by a USB port
– Also called USB flash memory drives, thumb drives,
jump drives

CC111 Lec#10 : Storage System 25


Lecture 11

Computer Networks

Reference :Understanding Computers


Chapters

CC111 Lec#11: Computer Networks


What Is a Network?

• Network: A connected system of


objects or people
• Computer network: A collection of
computers and other hardware
devices connected together so users
can share hardware, software, and
data, and electronically communicate
• Computer networks converging with
telephone and other communications
networks
• Networks range from small private
networks to the Internet (largest
network in the world)
CC111 Lec#11: Computer Networks
2
Networking Applications

• Television and radio broadcasting


• Global positioning system (GPS): Uses satellites and a
receiver to determine the exact geographic location of
the receiver
• Monitoring systems: Monitor status or location of
individuals, vehicles, assets
• Videoconferencing

CC111 Lec#11: Computer Networks


3
GPS

CC111 Lec#11: Computer Networks


4
Network Characteristics

• Wired vs. wireless networks


– Wired: A network in which computers and other
devices are connected to the network via physical
cables
• Found in homes, schools, businesses, and
government facilities
– Wireless: A network in which computers and other
devices are connected to the network without physical
cables; data is typically sent via radio waves
• Found in homes, schools, and businesses
• Wi-Fi hotspots found in coffeehouses, businesses,
airports, hotels, and libraries

CC111 Lec#11: Computer Networks


5
Network Topologies

• Topology: How the devices in the network (called


nodes) are arranged
– Star networks: A network that uses a host device
connected directly to several other devices
– Bus networks: A network consisting of a central
cable to which all network devices are attached
– Mesh networks: A network in which there are
multiple connections between the devices on the
network so that messages can take any one of
several paths
– Some networks use a combination of topologies

CC111 Lec#11: Computer Networks


6
Network Topologies

CC111 Lec#11: Computer Networks


7
Network Architectures

• Architecture: The way networks are designed to


communicate
• Client-server networks
– Client: Computer or other
device on the network
that requests and
utilizes network
resources
– Server: Computer
dedicated to
processing client
requests

CC111 Lec#11: Computer Networks


8
Network Architectures

• Peer-to-peer (P2P) networks: All computers at the same


level
– Internet P2P computing: Performed via the Internet

CC111 Lec#11: Computer Networks


9
Network Size and Coverage Area

• Personal area network (PAN): Connects


an individual’s personal devices that are
located close together.
• Local area network (LAN): Connects
devices located in a small geographic
area
• Metropolitan area network (MAN):
Serves a metropolitan area
• Wide area network (WAN)
– Large geographic area

CC111 Lec#11: Computer Networks


10
Network Size and Coverage Area

• Intranet: Private network set up by an organization for


use by its employees
• Extranet: Intranet that is at least partially accessible to
authorized outsiders
• Virtual private network (VPN): Secure path over the
Internet that provides authorized users a secure means
of accessing a private network via the Internet

CC111 Lec#11: Computer Networks


11
Data Transmission Characteristics

• Bandwidth: The amount of data that can be transferred


in a given period of time
– Measured in bits per second (bps)
• Analog vs. digital signals
(waves vs. discrete)
• Serial vs. parallel
transmission
– Serial = 1 bit
– Parallel = at
least 1 byte at
a time

CC111 Lec#11: Computer Networks


12
Data Transmission Characteristics

• Transmission timing
– Synchronous transmission (at regular, specified
intervals)
– Asynchronous transmission (sent when ready)
– Isochronous transmission (sent at the same time as
other, related, data)

CC111 Lec#11: Computer Networks


13
Data Transmission Characteristics

• Transmission directions:
– Simplex transmission
• Data travels in a single direction only
– Half-duplex transmission
• Data travels in either direction but only one way at
a time
– Full-duplex transmission
• Data travels in both directions, both ways at the
same time

CC111 Lec#11: Computer Networks


14
Data Transmission Characteristics

• Type of connections:
– Circuit-switched: Dedicated path over a network is
established and all data follows that path
– Packet-switched: Messages are separated into small
units called packets and travel along the network
separately
• Used to send data over the Internet
– Broadcast: Data is sent out to all other nodes on the
network
• Primarily used with LANs

CC111 Lec#11: Computer Networks


15
Type of Connections

CC111 Lec#11: Computer Networks


16
Networking Media

• Wired connections: The computer is physically cabled


to the network
– Twisted-pair cable
• Pairs of wires twisted together
• Used for telephone and network connections
– Coaxial cable
• Thick center wire
• Used for computer networks, short-run telephone
transmissions, cable television delivery
– Fiber-optic cable
• Glass or fiber strands through which light can pass
• Used for high-speed communications

CC111 Lec#11: Computer Networks


17
Wired Networking Media

CC111 Lec#11: Computer Networks


18
Communications Protocols and Networking Standards

• Protocol: A set of rules for a particular situation


– Communications protocol: A set of rules that
determine how devices on a network communicate
• Standard: A set of criteria or requirements approved by a
recognized standards organization

CC111 Lec#11: Computer Networks


19
TCP/IP

• TCP/IP: The most


widely used
communications
protocol
• Used with the
Internet
• TCP responsible
for delivery of data
• IP provides
addresses and
routing information
• Uses packet
switching
CC111 Lec#11: Computer Networks
20
Ethernet (802.3)

• Ethernet: Most widely used standard for wired networks


– Continually evolving
– Original (10Base-T) Ethernet networks run at 10
Mbps
– Newer 100 Mbps, 1Gbps, and 10 Gbps versions are
common
– 100 Gbps and Terabit Ethernet are in development
• Power over Ethernet: Allows electrical power to be sent
along with data on an Ethernet network
– Most often used by businesses

CC111 Lec#11: Computer Networks


21
Wi-Fi (802.11)

– Speed and distance of Wi-Fi networks depends on:


• Standard and hardware being used (continually
evolving)
• Number of solid
objects between
the access point
and the
computer or
device
• Possible
interference

CC111 Lec#11: Computer Networks


22
Cellular Standards

• Cellular standards: Continually evolving


– 1st generation: Analog and voice only
– 2nd generation: Digital, both voice and data
– 3rd generation: Current
standard (HSDPA/UMTS, EV-DO, etc.)
– 4th generation:
Emerging standard (mobile WiMAX, LTE, etc.)

CC111 Lec#11: Computer Networks


23
Short-Range Wireless Standards

• Bluetooth: Very short range (less than 10 feet)


– For communication between computers or mobile
devices and peripheral devices
– Bluetooth devices are
automatically
networked with each
other when they are
in range (piconets)

CC111 Lec#11: Computer Networks


24
Networking Hardware

• Networking hardware
– Network adapter: Used to connect a computer to a
network or the Internet
• Also called network interface card (NIC) when in
the form of an expansion card
• Available in a variety of formats
– PCI and PCIe
– USB
– ExpressCard
• Adapter must match the type of network being
used (Ethernet, Wi-Fi, Bluetooth, etc.)
• Are often built into portable computers
CC111 Lec#11: Computer Networks
25
Network Adapters

CC111 Lec#11: Computer Networks


26
Networking Hardware

– Modem: Device that connects a computer to the


Internet or to another computer
• Term used for Internet connection device, even if
not connecting via a phone line
• Type of modem needed depends on the type of
Internet access being used
– Cable
– Wi-Fi or WiMAX
– DSL

CC111 Lec#11: Computer Networks


27
Networking Hardware for Connecting
Devices and Networks

– Hub: Central device that connects all of the devices


on the network
– Switch: Connects devices in a network like a hub but
only sends data to the device for which the data is
intended
– Wireless access point: Used to grant network access
to wireless client devices
– Wireless router: Typically connects both wired and
wireless devices in a network
– Bridge: Used to connect two LANs together

CC111 Lec#11: Computer Networks


28
Wireless Routers

CC111 Lec#11: Computer Networks


29
Other Networking Hardware

– Repeater: Amplifies signals along a network


– Range extender: Repeater for a wireless network
– Antenna: Used when Wi-Fi networks need to go
further than hardware normally allows
• Higher-gain antennas can be used with routers
• Some network adapters can use an external
antenna
– Multiplexer: Combines transmissions from several
different devices to send them as one message
– Concentrator: Combines messages and sends them
via a single transmission medium in such a way that
all of the messages are active
CC111 Lec#11: Computer Networks
30
Networking Hardware

CC111 Lec#11: Computer Networks


31
Lecture 12

The Internet and the World Wide


Web

Reference :Understanding Computers


Chapter 8

CC111 Lec#12 : The Internet and WWW


Learning Objectives

1. Discuss how the Internet evolved and what it is like


today.
2. Identify the various types of individuals, companies, and
organizations involved in the Internet community and
explain their purposes.
3. Describe device and connection options for connecting
to the Internet, as well as some considerations to keep
in mind when selecting an ISP.
4. Understand how to search effectively for information on
the Internet and how to cite Internet resources properly.

CC111 Lec#12 : The Internet and WWW 2


Evolution of the Internet

• Internet: Largest and most well-known computer


network, linking millions of computers all over the world
– Furnishes a standard way of obtaining information,
disseminating information, accessing entertainment,
and communicating with others
– While Internet has become a household word only
during the past two decades, it has actually operated
in one form or another for much longer than that

CC111 Lec#12 : The Internet and WWW 3


Evolution of the Internet

• ARPANET: The predecessor of the Internet, named after the


Advanced Research Projects Agency (ARPA), which
sponsored its development
– Initially connected four supercomputers
– Eventually evolved into today’s Internet
• The World Wide Web: The collection of Web pages available
through the Internet
– Proposed by Tim Berners-Lee in 1989
– Originally only text-based content; release of the Mosaic
browser in 1993 led to graphical content
– Wide variety of content available via Web pages today (social
networking, RSS, podcasts, blogs and wikis)
• Internet2: Researches advanced Internet applications and
technologies
CC111 Lec#12 : The Internet and WWW 4
Evolution of the Internet

CC111 Lec#12 : The Internet and WWW 5


The Internet Community Today

• Most members of the Internet community fall into one or


more of the following groups:
– Users: People who use the Internet
– Internet service providers (ISPs): Provide
access to the Internet, typically for a fee
– Internet content providers:
Provide Internet content
• Businesses, non-profit
organizations, educational
institutions
• Individuals

World Wide Web Consortium (W3C): Protocols and


standards, ensures interoperability
CC111 Lec#12 : The Internet and WWW 6
Myths About the Internet

• Myth 1: The Internet is free


– Most people and businesses
pay for Internet access
– Businesses, schools, and
libraries lease
communications lines from
phone companies
– Fee-based content is
growing at a rapid pace
• Music/movie downloads
• Donation based sites

CC111 Lec#12 : The Internet and WWW 7


Myths About the Internet

• Myth 2: Someone controls the Internet


– No single group or organization controls the Internet
– Governments can regulate Internet use within its
country, but difficult to enforce
• Myth 3: The Internet and World Wide Web are identical
– Internet = physical network
– WWW = one resource (Web pages) available via the
Internet
– Other resources are available via the Internet
• e.g. FTP

CC111 Lec#12 : The Internet and WWW 8


Type of Connection and Internet Access

• Computer must be connected to access the Internet


– Most connections today are broadband
• Connections can be:
– Dial-up
• Uses standard phone lines
• Uses modem to dial-up ISP
– Inconvenient
– Slower, but cheaper
– Ties up phone lines
– Relatively secure from hackers

CC111 Lec#12 : The Internet and WWW 9


Type of Connection and Internet Access

– Direct (always on)


• Device is continually connected to the Internet
• Direct connections are typically broadband; fast
speeds needed for many Web activities today
• Because you are always connected, it is important
to protect your computer from hackers

CC111 Lec#12 : The Internet and WWW 10


Direct Connections

• Cable: Most widely used home broadband connection


– Fast, between 5 and 20 Mbps
– Requires a cable modem
• DSL: Broadband delivered over telephone lines
– Must be less than 3 miles from a switching station
– Transmits over telephone lines but does not tie up the line
– Typically 1-7 Mbps
• Satellite: Broadband option for rural areas
– Slower and more expensive that cable or DSL
– Available in many areas other broadband options are not
– Requires satellite modem, and transceiver dish

CC111 Lec#12 : The Internet and WWW 11


Direct Connections

• Fixed wireless: Uses radio transmission towers rather


than satellites
– Not available in all areas
– Uses Wi-Fi or WiMAX
• Broadband over Fiber (BoF): Delivers over fiber-optic
cabling all the way to the building
– Also called Fiber-to-the-premises (FTTP)
– Fast, available in limited areas
– Requires special networking equipment
• Mobile wireless: Access via mobile phone or device
• Hotspot: Public wireless networks (Wi-Fi)
– Both free and fee-based are available

CC111 Lec#12 : The Internet and WWW 12


Type of Connection and Internet Access

CC111 Lec#12 : The Internet and WWW 13


Quick Quiz

1. The Internet began as an experimental network


known by which name?
a. ARPANET
b. Internet2
c. World Wide Web
2. True or False: Cable is a common type of direct
Internet connection.
3. A type of always-on broadband Internet access
available through conventional phone lines that does
not tie up your phone line is _____________.
Answers:
1) a; 2) True; 3) DSL

CC111 Lec#12 : The Internet and WWW 14


Searching the Internet

• Effective Internet searching: A very important skill


• Search sites: Web sites specifically designed to help
users search for Web pages that match specified
keywords or selected categories
– Typically use a search engine in conjunction
with a database containing information about
Web pages to locate appropriate Web pages
– Many search sites available (Google, Bing,
Yahoo, Ask.com, Cuil, etc)
– Real-time search engines are emerging
• Search the Web live rather than relying on a
database

CC111 Lec#12 : The Internet and WWW 15


Searching the Internet

• Keyword search
– Keywords are typed in a search box to locate
information on the Internet
– Matching Web pages are called hits
– Clicking on a Web page name displays that page
• Directory search
– Categories are selected to locate information on the
Internet
• Many search sites contain additional tools
– Search for music files, image files, newsgroups, news
articles, maps, people, telephone numbers
– Google is one of the most versatile search sites

CC111 Lec#12 : The Internet and WWW 16


Searching the Internet

CC111 Lec#12 : The Internet and WWW 17


Search Site Tools

CC111 Lec#12 : The Internet and WWW 18


Search Strategies

• Search strategies:
– Phrase searching (more than one keyword)

CC111 Lec#12 : The Internet and WWW 19


Search Strategies

– Boolean operators (AND, OR, NOT)


– Multiple search sites
– Appropriate keywords
– Synonyms (different words that mean the same thing)
– Variant word forms (variations of your keywords,
alternate spellings, etc.)
– Wildcards (such as * to search for keyword patterns)
– Field searches (searches limited to a particular
characteristic, such as page title, page text, URL, top
level domain or Web site)

CC111 Lec#12 : The Internet and WWW 20


Search Strategies

CC111 Lec#12 : The Internet and WWW 21


Evaluating Search Results

• Evaluating search results:


– Does the title and listed description sound appropriate
for the information you are seeking?
– Is the URL from an appropriate company or
organization?
– You should also evaluate:
• The author
• The source
– Determine if reliable or biased
• The date
– Many online articles are years old
– Verify online information with a second source
CC111 Lec#12 : The Internet and WWW 22
Citing Internet Resources

• To avoid plagiarism, proper citation procedures should


be used for all Internet content used in a paper, book, or
on a Web site
• Plagiarism is discussed in more detail in Chapter 16

CC111 Lec#12 : The Internet and WWW 23


Quick Quiz

1. With which of the following does the user select a


category matching the topic for which he or she is
searching?
a. keyword search
b. directory search
c. field search
2. True or False: The search phrase “trailer NOT horse”
would locate Web pages about horse trailers
3. The program used by many search sites to retrieve
matching Web pages from their database is called
a(n) _____________.
Answers:
1) b; 2) False; 3) search engine
CC111 Lec#12 : The Internet and WWW 24
Beyond Browsing and E-Mail

• Many other activities available via the Internet in


addition to Web browsing and e-mail
• Types of online communications
– Instant messaging (IM): Exchanging real-time
messages
• Typically real-time (presence technology)
• Often can be used for a variety of other tasks
(voice calls, multiplayer games, etc.)
• Unified communications (UC)
– Text messaging

CC111 Lec#12 : The Internet and WWW 25


Online Education and Writing

• Online education: Using the


Internet to facilitate learning
– Web-based training
(WBT): Instruction
delivered on an individual
basis via the Web
• Corporate training,
tutorials, distance
learning, etc.

CC111 Lec#12 : The Internet and WWW 26


Online Education and Writing

– Distance learning: When the student is physically


located away from the instructor and other
students; instruction take place via the Web
• Advantages: Self-paced instruction, flexible
location, up-to-date material, immediate
feedback, and customized content
• Disadvantages: Technology requirements and
problems, anonymity, and lack of face-to-face
contact

CC111 Lec#12 : The Internet and WWW 27


Online Education and Writing

– Online testing: Taking tests via the Internet


• Available for both objective and performance-
based exams
• Typically are graded
automatically
• Security is an issue
– Authorized
testing centers
– Secure
testing systems

CC111 Lec#12 : The Internet and WWW 28


Online Education and Writing

– Online writing
• Blogs: A Web page that contains short, frequently
updated entries in chronological order, typically by
just one individual
• Wikis: A collaborative Web page that is designed to
be edited and republished by a variety of
individuals
– Wikipedia is largest
» Carefully evaluate content, as irresponsible
individuals can enter erroneous information
• E-portfolios: A collection of an individual’s work
accessible via the Web

CC111 Lec#12 : The Internet and WWW 29


Online Education and Writing

CC111 Lec#12 : The Internet and WWW 30

You might also like