Download Book Title - California State University, Dominguez Hills

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Computers in a
Changing
Society
By John Preston, Robert Ferrett,
and Sally Preston
© 2005 Prentice-Hall, Inc.
1
Computers in a
Changing Society
Chapter 4
Using Software: Standing
on the Shoulders of Giants
© 2005 Prentice-Hall, Inc.
2
Computers in a Changing Society
Chapter 4
Learning Objectives
I.
Generations of Languages—First and Second Generation

II.
Match key terms such as source code, machine code, compiler, and assembler
Generations of Languages—Third Generation





III.
Name three early 3GLs still in use that used GOTO statements
Identify the slang term for languages that used GOTO statements
Identify the programming solution to branching problems
Identify three features of modular programming
Identify the relationship between C and operating systems
Generations of Languages—Fourth Generation






Identify characteristics of a 4GL
Give an example of a 4GL language
Identify definitions and examples of event driven languages
Identify the characteristics of Object Oriented Programming
Choose examples that represent OOP
Identify languages that use OOP
© 2005 Prentice-Hall, Inc.
3
Computers in a Changing Society
Chapter 4
Learning Objectives
IV.
Generations of Languages—Fifth Generation

V.
Identify characteristics of a 5GL and give an example of a 5GL language
Applications of Programming







VI.
Identify the acronym and functions of BIOS
Identify Operating System (OS) functions and name four common operating systems
Identify functions of server applications
Define GUI
Name three IBM mainframe operating systems and identify the characteristics of LINUX
Identify four productivity application suites
Identify utility program types and characteristics
Languages and Applications for the Internet




Identify the relationship between Web applications, browsers, and operating systems
Identify relationships between Java, byte code, and java virtual machine
Identify applications from Microsoft that compete with Java
Identify the role of CGI, four script languages, and types of Web pages created by scripts
© 2005 Prentice-Hall, Inc.
4
Computers in a Changing Society
Chapter 4
I.
Generations of Languages—First and Second Generation
First Generation Language (1GL)

Machine Language


Language a computer processor understands
Electrical Engineers


Binary number complexity


Series of ones and zeros
Machine Code


Design of circuits and connections
Instruction sequence written
in machine language
Most machine-like
© 2005 Prentice-Hall, Inc.
5
Computers in a Changing Society
Chapter 4
I.
Generations of Languages—First and Second Generation
Second Generation Language (2GL)

Assembly Language



Slightly more convenient than machine language
Allows use of command words and decimal numbers (Ex. L 8300)
Assembler







Program that takes assembly language statements and converts them into
a series of machine language instructions
Register—holding place in the processor for assembler instructions
Source Code
Machine Code
Assembler is closest language to machine language that programmers use
Assembler language is specific to the hardware
Used for quick data processing; useful for interactive gaming programs
© 2005 Prentice-Hall, Inc.
6
Computers in a Changing Society
Chapter 4
II.
Generations of Languages—Third Generation
Third Generation Language (3GL)

Characteristics



Uses commands not specific to a particular processor
Source code sent to compiler that
converts code into machine code
High-Level Languages


Low-Level Languages


Third, fourth, and fifth generation
First and second generation
Significant Terminology



Syntax—Rules governing a language
Bugs—Programmatic errors
Debugging—Fixing errors
© 2005 Prentice-Hall, Inc.
Among other notable achievements,
computer science pioneer Rear Admiral
Grace Hopper is known for discovering
the first computer “bug”—a moth
trapped in a Mark II Aiken Relay
Calculator
7
Computers in a Changing Society
Chapter 4
II.
Generations of Languages—Third Generation (3GL)
Early Languages with GOTO Instructions

FORTRAN—FORmula TRANslation


COBOL—COmmon Business Oriented Language
BASIC




General purpose language created to help students learn programming
Adapted by Bill Gates and Paul Allen to run on the first personal
computer
Branching—Ability to perform different operations based on conditions
Early 3GL—1950s and 1960s used conditional IF and GOTO
statements


Spaghetti Code—Hard to follow programs created with GOTO
statements
GOTO statements—Used in early FORTRAN, COBOL, and BASIC
© 2005 Prentice-Hall, Inc.
8
Computers in a Changing Society
Chapter 4
II.
Generations of Languages—Third Generation (3GL)
Structured Programming Languages

Structured Programming


Handling different conditions
in one program location
IF–THEN–ELSE or DO-WHILE
© 2005 Prentice-Hall, Inc.
9
Computers in a Changing Society
Chapter 4
II.
Generations of Languages—Third Generation (3GL)
Modular Programming

Characteristics






Blocks of code to handle standard procedures
Kept in separate file for efficient reuse
Information hiding

Programmer supplies information to
obtain an answer or command
Standardized input and output for module sharing
Increased productivity and error reduction
ADA

Employs process of information hiding

Used by U.S. Defense Department

Named after Augusta Ada Byron, Countess of Lovelace,
considered to be the first programmer
© 2005 Prentice-Hall, Inc.
10
Computers in a Changing Society
Chapter 4
II.
Generations of Languages—Third Generation (3GL)
Languages Used to Write Application Programs

Characteristics


Created tools by writing programs
that coordinate modules of code
1972—C Language




Hybrid of 2GL and 3GL
Programs ran faster than 3GLs
C, C+, C++—Write operating systems
Operating System

Special class of software
Special Purpose Languages for the Web

The Internet

Special purpose languages and operating systems
© 2005 Prentice-Hall, Inc.
11
Computers in a Changing Society
Chapter 4
III.
Generations of Languages—Fourth Generation (4GL)
Fourth Generation Languages (4GL)

Characteristics


Close to normal human language, but requires strict syntax
Non-Procedural


Query—Request for information from a database







No detailed task instructions; less code required
Structured Query Language (SQL)—Language for writing queries
Works with database structures
Centralized data dictionary with system component description
Visual programming—Uses icons positioned with pointing device
For use by novices and experts
Interactive and multifunction programming environment
4GL describes event-driven and object-oriented programming
languages
© 2005 Prentice-Hall, Inc.
12
Computers in a Changing Society
Chapter 4
III.
Generations of Languages—Fourth Generation (4GL)
Event Driven

Visual Basic (VB)




Introduced in 1987
Made it easy for developers to use standard
windows features (buttons, dialog boxes,
scrollbars, and menus) using icon dragging
Event and Event-Driven
Compatibility



Microsoft Office applications
Microsoft Windows or Macintosh computers
Objects


Buttons and dialog boxes
Confusion—Object vs. object oriented programs
© 2005 Prentice-Hall, Inc.
13
Computers in a Changing Society
Chapter 4
III.
Generations of Languages—Fourth Generation (4GL)
Object Oriented Programming (OOP)

Characteristics



New way of dealing with data and programming
Enhanced modular programming—Includes data and instructions
Objects—Self-contained modules






Attributes—Contains facts that describe the object
Methods or operations—Programmed instructions
Class—Object groupings
Inherit—Ability to acquire attributes from another class
Polymorphism—Ability of each object to determine how to use variables to
accomplish a goal based on the context
OOP Languages



Smalltalk—Original OOP Language
C++ and VB.NET—Use OOP
Sun Microsystems’ Java and Microsoft’s C# (C sharp)

Exclusively use OOP
© 2005 Prentice-Hall, Inc.
14
Computers in a Changing Society
Chapter 4
IV.
Generations of Languages—Fifth Generation (5GL)
Fifth Generation Languages (5GL)

Characteristics

Similar to 4GL that uses knowledge-based system






Knowledge-based system can interpret instructions in human-like manner
Loosely defined like 4GL
All computer code is generated automatically
Code can be compiled by a 3GL or 4GL compiler
Programs are modified and maintained working with 5GL statements
or icons, not underlying 3GL or 4GL code
Languages that use graphic interfaces to generate 5GL OOP programs

Examples: Borland’s JBuilder and Oracle’s JDeveloper
© 2005 Prentice-Hall, Inc.
15
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Application Programs or Applications

Characteristics



Usually written in 3GL, which is source code
Source code compiled for use on different computer systems
Distributed via CD or Internet download
Basic Input/Output System (BIOS)

Characteristics



Checks connections to major system components
Beep Codes—Indicate unplugged or faulty component
Process—First program running when computer is booted
© 2005 Prentice-Hall, Inc.
16
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Operating Systems (OS)

Characteristics





Loads after BIOS checks computer
OS controls running computer
OS Functions Determine

how information is displayed

how information is printed

how mouse works

common functions for programs

how data is written on disks
Drivers—Small programs that manage
commands between OS and peripherals
MS-DOS—Microsoft Disk Operating System

IBM adopted for IBM PC
© 2005 Prentice-Hall, Inc.
17
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Operating Systems (OS)

Characteristics

GUI—Graphical User Interface




Popularized by Apple Corporation
Microsoft adopted GUI approach for Windows OS
MS-DOS and Windows popularity—90% vs. Apple—5%
Platform—OS and specific type of processor


Example: Wintel—Windows OS and Intel processor
OS Compatibility and Consistency Advantages
© 2005 Prentice-Hall, Inc.
18
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Operating Systems (OS)

Characteristics

PDAs—Personal Digital Assistants and Multi-Function Cell Phones




Use OS with small amount of RAM to manage small screens
Popularized by Palm Pilot using Palm OS
Windows CE OS—Special version of Windows for PDAs
Mainframe OS




IBM—MVS, OS/390, or Z/OS
UNIX

Originated at Bell Labs in 1969

Written in C language

First widely-used open source OS

Intellectual property rights owned by SCO Group
Microsoft—Windows 2000 DataCenter
Medium Sized Computers

Use UNIX or similar OS, Linux
© 2005 Prentice-Hall, Inc.
19
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Client/Server Applications

Characteristics




Server Software—Provides services to multiple computers
Client Software—Resides on user’s PC or workstation
Many combinations of OS and server software
Web Servers



Provide Web pages
Variety of software available
Apache—Popular low-cost Web server software





Open source software runs on Unix or Linux OS
Free combination of Apache and Linux
Apple—Mac OS X Server
Microsoft—Windows Server 2005 with Internet Information Server (IIS)
Browsers—Netscape and Internet Explorer

Client programs serving Web pages from Web server
© 2005 Prentice-Hall, Inc.
20
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Client/Server Applications

Messaging and Collaboration

Groupware—Programs that coordinate groups



Microsoft’s Exchange Server
Microsoft Outlook—Client software works with Microsoft Exchange Server

E-mail, calendars, meeting scheduling
Lotus Notes—Client software works with IBM mainframe systems
© 2005 Prentice-Hall, Inc.
21
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Productivity Applications for Personal Computers

Characteristics

Programs that help users perform specific functions
(e.g., word processing, spreadsheet, database, graphics, etc.)

Microsoft Office—Productivity suite of applications


Word—word processing; Excel—spreadsheet; Access—database; PowerPoint—
presentation; Outlook—personal information; Internet Explorer—Web browser
Competitors




Corel WordPerfect Office
Lotus SmartSuite
Open-Office—Free suite that runs on Linux OS
StarOffice—Nominal cost suite that runs on Linux OS, Windows, and Solaris OS
© 2005 Prentice-Hall, Inc.
22
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Productivity Applications for Personal Computers

Characteristics


All major suites run on Windows OS
Applications are platform specific


Apple OS applications must be rewritten
Usually appear on market after Windows versions
© 2005 Prentice-Hall, Inc.
23
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Utilities

Characteristics



Special purpose software applications
Bundled with OS or separate purchase
Managing Files

File name extensions





Three-character extension helps identify files
Recorded in OS registry and looked up by OS
before launching associated software application
Backslash—Separates folder name
with first backslash indicating root
Spaces—Windows and Macintosh OS
allow spaces, but Unix and Linux do not
Capitalization—Windows usually
ignores, but Unix and Linux do not
© 2005 Prentice-Hall, Inc.
24
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Utilities

File Compression





Method for decreasing size of a file
Decompress—Returning file to its original size
Also known as zipping and unzipping
Utility programs use logic to reduce file size usually by a factor of four
Feature built into Windows XP

Extra utility programs available for older version OS—Windows, Macintosh, UNIX
© 2005 Prentice-Hall, Inc.
25
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Utilities

Antivirus, Web Security, and Spam Blockers





Virus—Serious threat to computer system
Anti-Virus Software—Scans for presence
of viruses to protect system
Spam—Unsolicited e-mail
Spam Blockers—Block suspected spam
Viewing Documents


Captures image to share information; not original file
Example: Adobe Acrobat—.pdf format
Custom Software



Horizontal Software—Applications for different organizations
Vertical Software—Applications for specific market segments
Enterprise Resource Package (ERP)—Business solutions

SAP, PeopleSoft, Oracle, Microsoft
© 2005 Prentice-Hall, Inc.
26
Computers in a Changing Society
Chapter 4
V.
Applications of Programming
Utilities

Disk Use and Maintenance

Formatting—Dividing disks into tracks and sectors






Tracks—Concentric circles of re-writable disk space

Sectors—Pie-shaped sections of circular tracks

Cluster—Data spanning two or more adjacent sectors
Size and spacing varies with OS (Microsoft Windows and Macintosh)
Preformatted and reformatting
Scanning—Process of identifying unusable bad sectors of disk
Erasing —File Allocation Table (FAT) used to record disk space allocation
Defragmenting—Moving file fragments together in contiguous pattern
© 2005 Prentice-Hall, Inc.
27
Computers in a Changing Society
Chapter 4
VI.
Languages and Applications for the Internet
Languages for Creating Web Pages

Hypertext Markup Language (HTML)






Inventor—Tim Berners-Lee
Tags—Predefined codes for display
File type .html or .htm
Web browser interprets and displays html code
Applets—Small application programs within HTML
Sun Microsystems Java language

Byte code

Included within a Web page

Sent to client computer

Java virtual machine (JVM)

Client computer converts byte code to machine language compatible with OS

Included with Netscape and downloadable for Windows/Intel

Microsoft—C# (C sharp) and Active X—Microsoft’s Java applet
© 2005 Prentice-Hall, Inc.
28
Computers in a Changing Society
Chapter 4
VI.
Languages and Applications for the Internet
Languages for Creating Web Pages

eXtensible Markup Language (XML)


Allows programmers to attach tag descriptions
Programmer collaboration



Java 2 Platform Enterprise Edition (J2EE) uses Java tools
Microsoft.NET uses XML
Simple Object Access Protocol (SOAP)
Web Server Languages

Common Gateway Interface (CGI)


Standard method of handling requests for programmed
actions on the server by applets within the Web page
Scripts—Small programs on server used by applets within Web page
© 2005 Prentice-Hall, Inc.
29
Computers in a Changing Society
Chapter 4
VI.
Languages and Applications for the Internet
Web Server Languages

Script Authoring Languages


PERL—Used on Web servers running UNIX or Linux OS
ECMAScript






Created by Netscape and originally named JavaScript
Standardized to work with Netscape and Internet Explorer under
auspices of the European Computer Manufacturers Association (ECMA)
Jscript—Created by Microsoft; adheres to ECMA standards
TCL—Developed by Sun Laboratories
Rexx—IBM script designed for ease of use by non-programmers
Hypertext Pre-Processor (PHP)




Open-source software used with Apache Web server
Used to create custom Web pages from database
File extensions of .php, .php3, or .phtml
VBScript—Subset of Visual Basic used for writing scripts

Active Server Page (ASP)—Customized Web page created upon user request
© 2005 Prentice-Hall, Inc.
30
Computers in a Changing Society
Chapter 4
Chapter Summary
First and second
generation languages
Match key terms such as source code, machine code, and compiler with their definitions: Source code is written by a programmer;
machine code is made up of binary numbers useable by a processor; and a compiler converts source code into machine code.
Third generation
languages
Name three early 3GL still in use that used GOTO statements: FORTRAN, COBOL, and BASIC.
Identify the slang term for languages that used GOTO statements: Spaghetti code.
Identify the programming solution to branching problems: Structured programming using IF-THEN-ELSE or DO-WHILE
statements.
Identify the features of modular programming: Information hiding, standardized input and output, shared and reused.
Identify the relationship between C and operating systems: C language combined high level programming features with ability to use
specific features of a processor; used to write operating systems.
Fourth generation
languages
Identify characteristics of a 4GL: non-procedural, works with databases, visual programming, useful for novices and experts,
interactive and multifunction programming environment.
Give an example of a 4GL language: SQL.
Identify definitions and examples of event-driven languages: Events like clicking buttons activate parts of the code.
Identify the characteristics of object oriented programming: objects have attributes and methods and are grouped in classes; an object
can inherit attributes and methods of its class; commands are called messages and the ability to act on the message independently is
called polymorphism.
Identify languages that use OOP: C++, VB.NET, Smalltalk, Java, C#.
Fifth generation
languages
Identify characteristics of a 5GL: all code is generated automatically and can be compiled by a 3GL compiler.
Give an example of a 5GL language: JBuilder or JDeveloper.
© 2005 Prentice-Hall, Inc.
31
Computers in a Changing Society
Chapter 4
Chapter Summary
Applications
Identify the acronym for BIOS: Basic Input/Output System.
Identify the functions of BIOS: boot up the computer and check components.
Identify the functions of an operating system: communicate between applications and the processor, manage storage systems,
manage peripherals, and provide tools for applications to use.
Name four common operating systems: Windows, Mac OS, UNIX, Linux, MVS, S/390.
Identify functions of server applications: Find and deliver data or Web pages.
Define GUI: Graphic User Interface.
Name three IBM mainframe operating systems: MVS, S/390, Z/OS.
Identify the characteristics of Linux: Similar to UNIX but open source and free.
Identify four productivity application suites: MS Office, Star Office, Corel WordPerfect Office, and Lotus SmartSuite.
Identify types and characteristics of utility programs: File management, disk maintenance, antivirus, and viewing documents.
Languages and
Applications for the
Internet
Identify the relationship between Web applications, browsers, and operating systems: Web applications use browsers, which in turn
use the operating system to display Web pages.
Identify relationships between Java, byte code, and java virtual machine: Java is the programming language. Its programs are
converted to byte code, which can be executed by a java virtual machine on the client computer.
Identify applications from Microsoft that compete with Java: C# (programming language) and ActiveX are similar to Java applets.
Identify the role of CGI: The common gateway interface handles requests for scripts by Web pages and locates the scripts in a
directory on the server.
Identify four script languages: Perl, ECMAScript, Jscript, PHP, TCL, Rexx, VBScript.
Identify two types of Web pages created by scripts in response to user input: Active Server Pages (ASP) and PHP pages.
© 2005 Prentice-Hall, Inc.
32