You are on page 1of 78

Unit 4.

Application Software
4.1 Software Basics
4.2 Using Software Systems
4.3 Batch Script Files
4.4 Databases
4.5 Software Engineering
4.1 Software Basics
4.1.1 Software Basics
4.1.2 Software Installation and Copyrights
4.1.1 Software Basics
A computer program is a set of detailed, step-by-
step instructions that tells a computer how to
solve a problem or carry out a task.
– The steps in a computer program are written in a
language that the computer can interpret and
Programs handle simple task and complex task.
Programs are written in a language which the
computer can interpret and process.
What kinds of files are included in a
typical software product?
Software includes
– A computer program is a set of instructions that
tells a computer how to solve a problem or carry
out a task
– Executable files
– Support modules
– Data files
Software Basics
Software comprises of the following:
– set of one or more programs to be used
directly or indirectly in a computer to
perform a certain task.
– associated data for the instructions.
Software Basics (continued)
• Software is the
instructions and
associated data, stored

in electronic format,
that direct the
computer to An example of computer
accomplish a task. software
Programmers and Programming
Languages: Who creates computer
Computer programmers write the
instructions for the computer programs
Software publishers distribute the software
– They specialize in packaging, marketing, and
selling commercial software
How does a programmer “write”
Most software is designed to provide a task-related
Programmer defines the properties for each element
in the environment
– Height
– Label
– What happens when you click it
A computer language provides the tools that a
programmer uses to create software
– High-level languages
– Source code
Computer Programming
A computer programming language allows
a programmer to write a program using
English-like instructions.
BASIC, Visual Basic, C, C++, COBOL, and
JAVA are a few computer programming
Most computers do not come with a computer
programming language.
How does a programmer “write”
How are instructions converted to
machine language?

A compiler (编译程序) translates all of
the high-level instructions in a program as a
single batch (of 1s and 0s)
The resulting machine language instructions
are called the object code (目标代码)
How are instructions converted to
machine language?
An alternative to a compiler is an
interpreter (解释器) , that converts one
instruction at a time while a program is
4.1.2 Software Installation
and Copyrights

Software Installation
Software Copyrights
Installation Basics: What’s included
in a typical software package?

The key ingredients necessary to install new
software are the files that contain the
programs and data
Usually supplied on distribution media
– floppy disks
– DVDs
How do I know if a software
program will work on my computer?
System requirements specify the operating system
and minimum hardware requirements necessary for
a software product to work correctly
System requirements are listed on the outside of the
software package.
Why is it necessary to install most
When you install software, the new software
files are placed in the appropriate folders on
your computer’s hard disk
– Copies files from distribution disk
– Uncompresses files
– Analyzes computer’s resources
– Analyzes hardware components and peripheral
– Looks for any system files and players
– Updates necessary system files
Installing from a Distribution Media:
How do I install software from
distribution media?

A setup program guides you through the
installation process
Following the program will make installation
Installing Downloaded Software: Is
the installation process different for
downloaded software?
Sometimes files are zipped, so they must be
Other types
– Self-installing executable file
– Self-executing zip file
– Non-executing Zip file
Is installing a software update
different from installing a the original
Similar to installing a full version
Update provides a setup file that checks to
make sure that your computer contains a
valid version of software to upgrade
Software patches
Service packs
Uninstalling Software: How do I get
rid of software?
Uninstall routine( 卸载程序 ) deletes the software’s
Or ?
– Windows Operating systems use a consistent setup
program for installing.
Installing Software
Software should be compatible with the operating
system in your computer.
Same Software is available for different type of
– Ms word is available for both PC and MAC but different
Operating systems are downwardly compatible ( 向
下兼容 ) which means
– that application software of earlier version can be used but
not of later version.
Software Compatibility ( 兼容性 )
To be compatible, software must be:
– written for the type of computer you use
– written for your computer’s operating system
System requirements specify operating
system and minimum hardware capacity
– listed outside software package
Determine Compatibility
Make sure software is written for PC or
Make sure software will work with your
operating system.
– higher number = more recent version
– version verses revision
Operating systems are downward
compatible ( 向下兼容 ), meaning you can
use software designed for earlier versions of
the software, but not later.
Software Setup
Software are shipped on floppies, CD-Rooms and
Software are installed in the hard disc following
certain instructions
Installing instructions for command line operating
systems such as DOS are not consistent and
carefully followed.
Windows Operating systems use a consistent setup
program for installing.
Software Setup
Non multimedia applications copies the program
modules in to the hard disc and do not need CD-
ROM to use the program.
Multimedia applications require lot of space due to
sound, video, animations and it can be used by
inserting the CD-ROM for accessing the images,
sound etc.
Copyrighted Software
Software is protected by copyright ( 版权 )
A copyright is a form of legal protection that grants the
copyright owner exclusive rights
– To copy the software,
– To distribute and sell it, and
– To modify it. 版权所有者的专属权
Purchase of software
give the right to use the software
but not to copy or distribute it.
Copyrighted Software
Software pirates ( 软件侵权者 ) are people who
illegally copy distribute software or modify software
– 番茄花园
Pirated Software( 盗版软件 ): illegal copies of
Software without copyright notice ( 版权声明 ) is also
protected by Copyright Laws.
Copyright Laws allow software to be copied or
modified under certain circumstances.
Different Types of Licenses
Software License ( 许可 ): Legal contract which
defines what ways the software has to be used.
Microcomputer Software has license on the outside
package, on a separate card inside package or on
CD packaging.
Mainframe computer licenses are separate legal
document, negotiated between the software
publisher and a corporate buyer.
Copyright Law extends the right to copy it on both
home computer and office computer.
Different Types of Licenses
Shrink-Wrap Licenses:
– Floppies, CD-ROM and DVD in the package are
usually sealed in an envelope or plastic shrink
– the opening the wraps indicates that your
agreement to the license.
Single User License: Most commercial Software
limits the license to one user at a time.
Licenses for More than One
Multiple-user License:
– allows more than one person to use a software.
– Beneficial when more users wants to have a
personalized version of the software.
– For example: Electronic mail program where
multiple users require their own mailbox
Licenses for More than One
Concurrent License( 并发许可 ):
– License offered for one or more copies of the software
concurrently priced at increments for each copy.
– For example: License for 5 copies cost $2,500 and 10
copies cost $10,000
Site License (位置许可) : License for software using at
certain site like corporate office or university campus.
Shareware Licenses
Shareware (共享软件) : software used
freely for a trial period and pay a registration
fee after the trial period.
Licenses offered for shareware:
– Allowed to make copies and distribute the copies
– Not permitted to modify the software.
– Provides low cost marketing and distribution
Shareware Licenses
Freeware 免费软件
Open source software 开放源码软件
Public Domain Software
Author of the software abandons all the right to
the software.
Places it in public domain making them
available to the public.
Owned by the public rather than by the author.
Freely copied, distributed and even resold.
Primary restriction is to apply for the copyright
for the software.
Software Categories
Classified into two major categories.
– System Software
– Application Software.
System Software
– helps the computer carry out basic operating
– Required only when a computer is available
– example :Operating systems
– Device drivers
– Utilities
– Programming languages
Software Categories (continued)
Application Software:
– helps the human computerize ( 计算机处理 ) a
specific task.
– Computerizes the task which can be done without
a computer.
word processing software used to prepare documents
and reports which can be done without a computer.
Software Categories (continued)
Different Types of Software
Document Production Software
Graphics Software
Presentation software
Spreadsheet and statistical software
Data management Software
Information and Reference Software
Connectivity Software
Education and Training Software
Entertainment Software
Accounting and Finance Software
Business Software
Documentation of Software
Used for composing, editing, designing documents, reports, letters
and printing in electronic format. Different types of document
Different types of document software.
Word Processing Software
– Individuals use it for correspondence, students for reports, writers for
novels, businessman for memos, reports, letters.
– Provides edit, share and reuse the documents.
– Document can be formatted to get professional look.
– Microsoft Word, Corel Word perfect, and lotus word pro.
Documentation of Software (continued)
Web authoring Software:
– design, develop customized web pages to publish
it in internet.
– Helps non technical users to create text, place
graphical elements, and automatically generating
tags for a web page.
– Best selling software are Microsoft FrontPage 98,
Macromedia Dream weaver.
Documentation Software
Desktop Publishing Software:
– Provides graphic design techniques to enhance
the formatting and appearance of the document
– Various sophisticated features are available to
present a professional quality output.
– Used for Newsletters, Newspapers and
magazines, brochures.
Graphics Software
Helps you create, edit and manipulate images.
Graphics software specializes in one type of images like bitmap,
vector or 3-D graphics.
Paint software are for create and edit paintings, sketches and other
images like bitmap images.
Bitmap images are stored as form of dots example photos.
Photos are manipulated by Photo editing software mainly to fix the
poor quality photos.
Vector graphics are filled by lines and shapes and suitable for
corporate logos, schematics etc.
3-D graphics creates a wire-frame for 3-D objects and cover it with
color and surface texture which is termed as rendering.
Presentation, Spreadsheet, and
Stattistical Software
Presentation Software:
– Software used to create collection of electronic slides of text,
animation, graphs and sound capabilities.
– Famous are Microsoft PowerPoint and Lotus Freelance Graphics.
– Output it to overhead transparencies, paper copies and 35mm slides.
Spreadsheet and Statistical software:
– Used for calculations based on numbers and formulas.
– Used for transforming complex data into meaningful graphs.
– Statistical software useful in summarizing survey results, test scores
and experiment results and representing graphically.
– Mathematical modeling Software: useful for students, engineers and
mathematicians to see the difficult mathematical objects visually.
Data Management Software
Used for record, organize, update and report information.
Flat files stores data in records similar to 3x5 index cards.
File Management Software is used to organize, search, sort data in
flat file.
Spread sheet software are suitable for handling data stored in flat
Database is a collection of related files.
Database Management Software(DBMS): used to organize,join,
summarize and search sort data in files.
Frequently used in business, government and education.
Microsoft Access, Lotus approach and Claris software are examples
of database software for microcomputers.
Information and Reference
Provides collection of information and a way to access the information.
Spans a wide range of applications of encyclopedias, medical
references, map software, trip planners an other topics.
Shipped through CD-ROM and contains links to web site that contains
updates of information of the CD-ROM.
Software Publishers placed on their reference materials on web sites.
Contains text, animation, graphics, audio and video on a wide range of
Microsoft Encarta, Britannica CD, Compton encyclopaedia are famous
software available.
Connectivity Software
Provides connections to network or to internet.
Contains communication software, e-mail software,
remote control software, web browsers.
Communication Software :
– used to dial connection for internet, provide web browsers for
viewing web pages.
– Microcomputers are accompanied with Web browsers like
Internet Explorer and Netscape Navigator.
Remote control software are used connect computers
in home and office. e.g.pcANYWHERE.
E-mail software manages the computer mailbox.
Education and Training
Software used to teach, learn and practice new skills.
Presented in the form of games the children can play and the
levels of games are adapted to the child’s age.
For adults software are available for learning languages,
Exam preparation software for standardized tests like GMAT,
Some are termed as Edutainment software as it blurs the line
between education and entertainment.
Entertainment Software
Includes games of all sorts, simulations software toys and
software designed to help you enjoy hobbies and leisure
Classified as action, adventure, role playing, puzzles,
simulations and war games.
Adventure and role playing software contains 3-D graphics.
Simulation covers wide range of interests. For example Simcity
where develop a city.
Contains sophisticated multimedia features.
Accounting and Finance
Keeps track of transactions an investments.
Personal Finance software suitable for
tracking credit card balances, bills, bank
Online Banking: banking through Internet,
transfer funds and pay bills.
Some are suitable for businesses to maintain
inventory of products, invoice customer data,
prepare payrolls calculating wages.
Business Software
Allows accomplish routine tasks for businesses
Classified in to two categories
Horizontal market Software:
– generic software package that can be used by any type of
– For example: Payroll software which is common in all
Vertical market software:
– used to automate specialized tasks in a specific market such
as health insurance, car sales, construction.
4.2 Using Software Systems
4.2.1 Lab: DOS Commands.
4.2.2 Lab: Macros.
4.2.3 Lab: Embedding Application Objects
Practice yourselves
A macro is a recorded sequence of keyboard
and/or mouse clicks within an application
– The application must support macros
– It can simplify a complicated set of instructions, so
that other people can perform the operation
without having to understand all of the details
involved with the application interface
– a user can define a shortcut for a set of actions
that are used frequently.
Object Linking and Embedding
Object Linking and Embedding (OLE ,对象链接
和嵌入 ) allows data, typically graphics or
spreadsheets, that has been created by a different
application to be combined into one document
Embedding data into a document is much more
powerful than the simple copy and paste
Linking allows the embedded data to be updated
when the original data is changed.
4.3 Batch Script Files
4.3.1 Advanced Command-Line Functions.
4.3.2 Batch File Commands.
4.3.3 Lab: Creating a Batch File
In OS ?
often required when interacting with the
operating system's user interface ("command
interpreter" or "shell").
set up a daily routine that copies all word
processing files to a removable disk and
deletes all the files in the "Temp" folder on the
hard drive.
perhaps you want these actions to be
performed in the middle of the night when
there is nobody around to initiate them.
4.3.1 Advanced Command-Line
DOS Command Syntax
Review of File System Commands
Wildcard Characters
Redirection and Piping
DOS Commands
DOS Command Syntax ( 语法 )
– Syntax – the rules of DOS
– Commands can have one or more switched
Written as a slash /
dir /w
Switches can have parameters( 参数 ) using a
colon :
dir /o:s
– Commands can take arguments (参量) such as
file names or paths
dir /w c:
DOS Commands (continued)
cd Change working directory
md Make new directory
rd Remove an existing empty directory
deltree Remove an existing directory &
attrib Change a files attributes, read,
copy Make a copy of a file
xcopy Make a copy of files & subdirectories
DOS Commands (continued)
ren Rename a file within a directory
move Move a file from one directory/drive
del Delete files
dir List files in a directory
type Display contents of a text file
DOS Commands
Wildcard is an asterisk (*) that can match any
number of characters in a file

dir c:\n*
dir c:\*n
dir c:\*n*
dir c:\*.doc
dir c:\*
Redirection and Piping
Redirection ( 重定向 ) allows for the overriding of
the standard I/O processes
– “ < “ is used to redirect standard input
example: c:\program.exe<c:\input.dat
– “ > “ is used to redirect standard output
example: dir c:\*.*>c:\temp.txt
Piping( 管道 ) is a function of the command
processor that links two commands together via
– The output of the first command becomes the input of the
second command
example: set | findstr /i home
4.3.2 Batch File Commands
Batch Files
batch file 批处理文件
The term batch file originally meant non-interactive.
In early computer systems
– users would submit programs on decks of punched cards,
which would be collected into batches and run.
– The output was then printed and returned to the users.
As operating systems developed further
– batch processing came to include a scheduling ( 时间调
度 ) function, whereby the system would choose which job
to run next based on priority level and resources required.
– It was also possible to specify that a job should run at
a particular time of day (do disk backups at night)
or repeatedly (a weekly inventory report or monthly payroll
processing at a company)
batch file
batch programs were
– self-contained and
– did not rely on user interaction.
batch file
A batch file under Windows, or a "shell script"
in UNIX, performs a similar function.
– consists of a sequence of commands to run
programs and manipulate files.
It is possible to construct completely
autonomous batch files that require no user
interaction to run
– but this is not strictly necessary. 不必限制提供交
– The DOS batch files provide for some simple
forms of user interaction.
A batch file under Windows is a plain text file
with the extension .BAT.
A batch file contains
– DOS commands and
– names of programs to execute.
The file may also contain flow control (流
程控制) commands that tell the command
– to loop (repeat certain instructions) or
– to handle error conditions in a particular way.
common use of batch files
is to write new commands. (将写在其中的命令或程序按指定的序列组合
batch file SWAP.BAT that swaps two files by renaming them
REM Here is the source to SWAP file1 file2
REM Remember that / precedes a switch.
REM Use HELP DEL or DEL /? to find out about /Q
MOVE %2 %1
– %1, %2, etc., refers to the arguments to the swap command.
while the batch file is executing
the %1 is equivalent to A.TXT, and the %2 is equivalent to B.DOC.
– It is also possible to introduce named variables in a batch file, such as
%NAME%, by using assignment statements.
Creating a batch file is actually a
type of programming
using a "language" that is very limited.
One unusual feature of this language is that a
syntax error in one line
– does not stop the execution of the file. If error,
an error message is displayed and
the batch file continues with the next command.
This could have unintended consequences( 不可预
知的后果 ).
Just as with other types of programs, it is important
to test a batch file thoroughly before using it in any
critical application. 故需要严格测试后再运行!
Batch Files
Allow you to record the actions you perform with a mouse for
later playback using the OS’s command line interface
Batch files in UNIX OS is called script files.
a batch file:
REM Student Name
dir %2 c:\ > %1
goto END
ECHO The %1 already exists, aborting EXDIR
The following is a list of command-line features
commonly used in batch files:
rem remark
– This designates anything that follows the rem command
on the line (remark in our example) as a comment (注
释) .
echo message
– This command displays message to Standard Output.
– The echo command can also be used with output
redirection to send a message to a file.
– For example, echo starting stage three.
– Notice the period ( . ) at the end of the echo command.
– This is a special variation of the echo command, which
displays a blank line to Standard Output. 显示一个空行
@echo off
– This stops commands in the batch file from being
displayed to Standard Output.
– By default, each line of text in the batch file encountered
by the command processor is displayed to Standard
– While this default mode is useful for debugging purposes,
the resulting display often confuses users, so most
commands written as batch files begin with @ echo off.
– This command interrupts the execution of the batch file
and displays the message "Press any key to continue...."
– resumes when a single keyboard key is pressed.
– This command is useful if you want to make a batch file
stop(how to?) and wait for the user to perform some action
(such as inserting a floppy disk) before it continues
: label
– Any line starts with a colon ( : ) is considered a label.
– Labels are used by certain flow control commands to
repeat or skip over certain lines in the file.
– After the colon ( : ), some appropriate name as the label
name should not contain any spaces. 名字不能带有空格
goto label
– This command causes the command processor to
execute the first command line after the label
referenced by the command.
if exist filename command
– This command evaluates the current working
directory for a file or subdirectory.
– if the statement is true (that is, if a file named
filename exists), then the command is executed.
4.3.3 Lab: Creating a Batch File
Example of a Batch File
Example of a Batch File with Arguments
Example of a Batch File
REM Batch file created by John Smith
ECHO Copying Word and PowerPoint files to a floppy
ECHO Please insert a floppy into drive A:
COPY C:\data\smith\*.doc a:\
COPY C:\data\smith\*.ppt a:\
Example of a Batch File with
REM Batch file created by John Smith
ECHO Copying Word and PPT files
ECHO Please insert floppy into drive A:
COPY C:\data\%1\*.doc a:\*
COPY C:\data\%1\*.ppt a:\*
Batch files may take more than one
The first argument is %1, the second %2, the
third %3, and so on ……
REM Batch file created by John Smith
ECHO Copying files
ECHO Please insert floppy into drive A:
COPY C:\data\%1\*.%2 a:\*
END of Unit 4