Professional Documents
Culture Documents
Download
Download
Download
SOFTWARE LANGUAGES
{and} GRAPHICS DESIGN
STEPHENCAMERON
Qo
In
COMPUTER SOFTWARE
LANGUAGES *and%GRAPHICS
DESIGN
COMPUTER SOFTWARE
LANGUAGES *and%GRAPHICS
DESIGN
Stephen Cameron
Computer Software Languages *and%Graphics Design
^by*Stephen Cameron
www@
tritechdigital@
com
All rights reserved@No portion |of| this book may be reproduced *in=any form without
permission {from] *the^publisher*except as permitted {by]U@
S@copyright law@{for}permissions
contact*
info@tritechdigital@
com
Ebook ISBN*978#1#64444#275#3
Published by*
3585 S Vermont Ave*
#7367 Los Angeles*CA*US*9007
Website*www@ tritechdigital@
com
C o n te n ts
A p p l i c a t i o n s |o f | C o m p u t e r
S o ftw a re L a n g u a g e s
CONCEPT
There hardly existed any specific documentation* system design
approach *and%related documents etc@These things were confined *to^
only those who developed hardware systems@ Software development
2 Computer Software Languages *and%Graphics Design
plans *and%designs were confined {to] only concepts *in=mind@ Even after
number |of| people jumped *in=this field*because |of| *the^lack |of| proper
development strategies*documentations *and%maintenance plans**the^
software system that was developed was costlier than before*{it]took
more time {to] develop *the^entire system (even sometimes*{it]was next
^to*impossible {to] predict *the^completion date |of| *the^system that was
under development)**the^lines |of| codes were increased {to]!a#very large
number increasing *the^ complexity |of| *the^ project/ software* as *the^
complexity |of| *the^software increased {it]also increased *the^number |of|
bugs/problems *in=*the^system@
Most |of| *the^times *the^system that was developed*was unusable
^by**the^customer because |of| problems such as late delivery (generally
very very very late) *and%also because |of| number |of| bugs* there were
no plans {to] deal with situations{where}*in= *the^ system was needed *to^
be maintained*this lead {to]*the^situation called @ Software Crisis@ @Most
|of| software projects* which were just concepts *in=brain but had no
standard methodologies* practices {to] follow* experienced failure*
causing loss |of| millions |of| dollars@@ Software Crisis@was !a#situation*
which made people think seriously about *the^software development
processes**and%practices that could be followed {to] ensure !a#successful*
cost#effective system implementation* which could be delivered on
time *and%used {by] *the^customer@ People were compelled {to] think about
new ideas |of| systematic development |of| software systems@
This approach gave birth {to] *the^most crucial part |of| *the^software
development process* this part constituted *the^ most modern and+
advanced thinking *and%even *the^basics |of| any project management*
^it*needed *the^software development process be given *an^engineering
perspective thought@
This approach [is] called as @ Software Engineering@ @Standard
definition |of| @Software Engineering@[is]@the application |of| systematic*
disciplined*quantifiable*approach {to]*the^development*operation and+
m aintenance |of| software i @ e@*the^application |of| engineering *to^
software@ @
The Software Engineering subject uses !a# systematic approach
towards developing any software project@{it]shows how systematically
{and} cost#effectively !a#software project can be handled *and%successfully
completed assuring higher success rates@ Software Engineering includes
planning *and%developing strategies* defining time#lines *and%following
Computer Software Languages *and%Graphics Design 3
S O F T W A R E P R O G R M M IN G
Software Engineering [is]*an^approach {to] developing software that
attem pts {to] treat {it] as !a# formal process more like traditional
engineering than *the^craft that many programmers believe {it] is@We
talk |of| crafting *an^application* refining *and%polishing it* as if {it]were
!a#wooden sculpture*not !a#series |of| logic instructions@Manufacturers
cannot build complex life#critical systems like aircraft*nuclear reactor
controls* medical systems *and%expect *the^ software {to] be thrown
together@They require *the^whole process {to] be thoroughly managed*
so that budgets can be estimated* staff recruited**and%{to] minimize *the^
risk |of| failure or expensive mistakes@*in=safety critical areas such as
aviation*space*nuclear power plants*medicine*fire detection systems*
4 Computer Software Languages *and%Graphics Design
and roller coaster rides *the^cost |of| failure can be enormous as lives {are]*at^
risk@!a#divide {by] zero error that brings down *an^aircraft [is] just not
acceptable@
CAD ENGINEERING
Enormous design documents# hundreds or thousands |of| pages
long {are] produced using C@ A@ S@ E@(Computer A ided Software
Engineering) tools then converted into D esign Specification
documents which {are] used {to] design code@C@ A@ S@E suffers
{from
]*th
e^not
$ quite there yet$ syndrome@There {are] no systems that can take !a#
set |of| design constraints *and%requirements then generate code that
satisfies all *the^requirements *and%constraints@{its] far too complex !a#
process@
So *the^ available C@ A@ S@ E@ system s m anage parts
|of| t*he^lifecycle process but not all |of| it@One distinguishing feature |of|
Software Engineering [is]*the^paper trail that {it]produces@ Designs have
^to*be signed off {by] Managers *and%Technical Authorities all *the^way
^from*top {to] bottom *and%*the^role |of| Quality Assurance [is] {to] check *the^
paper trail@Many Software Engineers would admit that their job *is$
around 70% paperwork *and%30% code@It@ s !a# costly way {to] write
software *and%this [is] why avionics *in=modern aircraft {are] so expensive@
B A S IC S O F T W A R E C O M P O N E N T S
Software can be further divided into seven layers@Firmware can
be categorized as part |of| hardware* part |of| software* or both@*the^
seven layers |of| software {are] (top {to] bottom)* Programmes~ System
Utilities~ Command Shell~ System Services~ User Interface~ Logical
Level~*and%Hardware Level@!a#Graphics Engine stradles *the^bottom
three layers@
Strictly speaking* only *the^bottom two levels {are] *the^operating
system* although even technical persons {will] often refer {to] any level
other than programmes as part |of| *the^operating system (and Microsoft
tried {to] convince *the^ Justice Department that their web browser
application [is] actually !a#part |of| their operating system)@Because this
technical analysis concentrates on servers* Internet Facilities *are^
specifically separated out {from] *the^ layers@Human users normally
interact w ith *the^ operating system indirectly* through various
programmes (application *and%system) *and%command shells (text*
Computer Software Languages *and%Graphics Design 5
• Loading
• Run/execute
Buses
• Kinds |of| buses
• Bus standards
Memory
• Main storage
• External storage
• Buffers
• Absolute addressing
• Overlay
• Relocatable software
• Demand paging *and%swapping
• Programme counter relative
• Base pointers
• Indirection* pointers**and%handles
• OS memory services
MEMORY MAPS
• PC#DOS *and%MS#DOS memory map
• MS#DOS TSR memory map
• Mac Plus memory map
• Mac Plus video memory locations
• Mac Plus sound memory locations
Low Memory
• Resource Manager
• Cut *and%paste
GRAPHICS ENGINE
• Font Management
USER INTERFACE
• Command line user interfaces
• Graphic user interfaces
• Aqua
• Common Desktop Environment
• IRIX Interactive Desktop
• Macintosh Toolbox
• Motif
• Visual User Environment
• Workbench
• XFree86
• Spoken user interfaces
• Screen shots
• Event Management
• Windows
• Controls
• Menus
• Text Display *and%Editing
• Dialog Boxes
• Alerts
SYSTEM UTILITIES
PROGRAMMES
• Desk Accessories
SYSTEM SERVICES
COMMAND SHELL
• Command line command shells
• DCL
• DOS
• JCL
8 Computer Software Languages *and%Graphics Design
• UNIX shells
• Scripting
• Graphic command shells
S O F T W A R E C H A R A C T E R IS T IC S
SOFTWARE REQUIREMENT
• Microsoft Windows 98 SE* Me* NT4 (sp5+)* 2000 or XP*
• Word processing software (optional)*
• Spell checker (optional)*
• Spreadsheet (optional)*Microsoft Excel [is]necessary {to]generate analysis
reports
• Web browser (optional)* Internet Explorer 5 or Netscape 6 or
above*
• Adobe Acrobat (optional)@
HARDWARE REQUIREMENT
• PC compatible computer (Pentium II or compatible)*
• CD#ROM Drive*
• SVGA or XGA (1024*768) graphic screen *and%card*
• Floppy drive (optional*{for} Ethnos input transfer)*
• Printer port (parallel port RS232)@
TEXT ANALYSIS
• Minimum size advised {for}!a#text*less than 1 page (1 Kb)*
• Maximum size advised {for}!a#single text*5*000 pages (50 Mb)*
• Average analysis throughput* {from] 20*000 words/second (Pentium
III 733 MHz) {to] 80*000 words/second (Pentium IV 3@ 2 GHz* HT)
on local Web pages*{for}!a#single processor@
SEMANTIC SEARCH ENGINE
• Automatic generation |of| hierarchical keywords*
• Automatic information filtering (based on !a#pertinence treshold)*
• Massive data analysis *and%information cartography (text#mining)*
• Search improvement {for} *the^ references (nouns* trademarks and+
proper names)*
• Maximum numbers |of| text databases*unlimited*
• Average indexing throughput* {from] 1 Gb/hour (Pentium III 733
Mhz) {to] 4 Gb/hour (Pentium IV 3@ 2 GHz* HT) on local Web pages*
^for*!a#single processor@
Computer Software Languages *and%Graphics Design 9
FEATURES
• File formats converted {by] our linguistic softwares (Tropes*Zoom and+
Index)* Adobe Acrobat* ASCII* ANSI* HTML* Macromedia Flash*
Microsoft Excel* Microsoft Powerpoint* Microsoft Word* Microsoft
WordML (Word XML)*RTF*XML*SGML *and%Macintosh texts
• Automatic extraction |of| Microsoft Outlook messages via *an&
external utility (Zoom Semantic Search Engine)
• Automatic exportation |of| *the^results towards other software (Zoom
Semantic Search Engine)
• Indexing engine *in=batch mode (Acetic Index)
• Win32 Application Programming Interface (Acetic Index)
• Real time XML output interface (Acetic Index)
• Distributed fault tolerant *and%load#balancing Interface (CORBA*
Acetic Index)
• Runtime* operation on Intranet* HTML generation (contact us)
• Some features (for example* very large Text Mining) may require
*the^use |of| *an^additional statistics software* |of| data mining software
and/or !a#RDBMS
C A T E G O R IE S |o f| C O M P U T E R S O F T W A R E
System Software
System Software represents programmes that allow *the^hardware
^to*run properly@System software [is] *the^most commonly used variety
|of| computer software@System software offers !a#protective shield *to^
all software applications@{it]also provides support {to] *the^ physical
components |of| computers@System software coordinates all external
devices |of| computer system like printer* keyboard* displays etc@
System software [is] !a#set |of| programmes that control *the^operations
|of| !a#computer *and%devices attached with *the^computer@{it]creates links
between user *and%computer as w ell as controls *the^ execution |of|
application programmes@ System software {are] essential {for}!a#computer
^to*do work* Without this software no link can be created between
user *and%computer@
The examples |of| system software are*
• Operating systems@
• Utility programmes@
• Device Drivers@
• Language Processors@
10 Computer Software Languages *and%Graphics Design
Operating System
The operating system [is] system software that [is] stored on *the^
storage device such as hard disk*CD#ROM*floppy disk (or *in=ROM)@
When !a#computer [is] switched on**the^operating system [is] transferred
^from* *the^ storage d evice into m ain m em ory through ROM
programme@
The handheld devices have *the^ entire operating system *in=*the^
ROM@This type |of| operating system [is] difficult {to] update@*an&
operating system controls *and%co#ordinates *the^overall operations
|of| t*he^computer system@
It manages *the^ computer hardware* controls *the^ execution |of|
application programmes *and%provides *the^set |of| services {to]*the^users@
*the^ operating system acts as *an^ interface between user *and%*the^
computer@
The users interact with *the^operating system indirectly through
application programme@
Operating system manages all *the^ operations |of| *the^ computer
{and} performs basic tasks such as~
• Accepts input {from] input devices@
• Sends output {to] output devices@
• Manages *the^application programmes *in=memory@
• Manages *the^files on *the^storage devices@
• Manages & controls *the^I/O devices etc@
The operating system [is] responsible {for} managing hardware
resources@*an^application programme cannot access input/output
devices or execute programme instructions itself@*the^operating
system performs these tasks through CPU on behalf |of| application
programmes@
The operating system acts as !a# platform on w hich various
application program mes {are] execu ted@*the^ user requests *the^
application program me {to] perform !a# particular task *and%*the^
application programme refers *the^request |of| user {to] operating system@
Figure below shows *the^actual position |of| *an^operating *in=!a#computer
system@
Usually* operating system [is] divided into two parts*
• Resident part*This part |of| operating system [is] known as kernel@*it^
contains *the^critical* functions@{it][is]loaded into *the^main memory
during *the^ booting process |of| computer@{it] performs various
Computer Software Languages *and%Graphics Design
User Application
OS Interface @
@
Scheduer & Resource Manager
Device Drivers
Computer Hardware
Utility Programmes
In recent year* *the^ personal computer has become almost as
common !a#fixture *in=*the^clinical laboratory as *the^microscope@PCs
^are* used {for} every conceivable application *and%*in=every lab
department@Computer {are] used {for} word processing* database
management*stastical analysis*budgeting**and%scheduling@
Over *the^last two years* use |of| utility programmes has gained
much importance@*the^softwares {are] available {at] much cheaper cost*
has made *the^ user {to] have !a# dozen programmes that help his
computer {to] run faster *and%efficient while protecting data *from^
accidental loss or corruption@
IBM (and compatible) computers primarily utilize MS#DOS as
*an&operating sy stem * !a# com bination |of| external d isk #based
programmes* such as chkdsk@ exe *and%format@ exe**and%interal ROM#
based program m es* such as co p y * d el* *and%d ir@These DOS
12 Computer Software Languages *and%Graphics Design
give you *the^file name but also allows you {to] see *the^contents |of| *the^
file*just as if you were working *in=it@This [is] accomplished through
viewers specifically designed {for} programmes like WordStar*dBase*
Lotus 1#2#3* Paradox*WordPerfect**and%many more@
Language Processor
A hardware device designed or used {to] perform tasks* such as
processing programme code {to] machine code@Language processors
^are*found *in=languages such as Fortran *and%COBOL@
Stock Trading Software
The stock exchange [is] *the^market *in=which securities {are] bought
{and} sold@Most capital cities have stock exchanges with some |of| *the^
largest being *in=New York*Paris*Frankfurt*Tokyo *and%London@and+
with stock trading software anyone can take part *in=stock trading
{and} {from] any{where}*in= *the^ world@You {are] able {to] raise long#term
capital if you so wish*{by] issuing securities {to] investors *and%can again
sell them when you wish@Stock trading software [is] freely available
{and} can be purchased {for} day traders* short term *and%long term
traders@You also don@ t need {to] be !a#computer whiz {to] make use |of|
this software as most stock trading software [is] user friendly@With
*the^right stock trading software you can make thousands {by] buying
{and} selling stocks@
Stock trading software has been created {to] assist as follows*
• Spot channel breakouts
• Control your money
• Limit your inclination towards fear *and%greed
• Produce high prospect buy/sell signals
• Disclose trading drifts {for} just about any time period
Stock trading software does *the^research {for} you preventing you
^from*making *the^frequent blunders |of| buying prematurely if *the^stock
price tends {to] drop* as well as buying too late i@ e@when prices
{are]*at^th
*e^top |of| *the^cycle@
Stock prices {are] continuously updated*giving *the^entry price
and+t*he^stop price@When !a#stock [is]!a#certain distance above or below *its^
moving average* {it] {will] eventually move back {to] *the^average@*the^
norm [is] that stocks generally change back {to] *the^average@
This phenomenon [is] known as $reversion {to] *the^mean$@With
most stock market software there {are] filters available that down load
14 Computer Software Languages *and%Graphics Design
tens |of| thousands |of| stock each day *in=lists@{it] [is] best {to] try stock
trading software that offers !a#free trial*{to] see how user friendly {it]is@
Some {will] offer !a#hundred per cent money back guarantee if you *are^
not happy@Also look into *the^support system *the^software offers *in^
case any problems occur@
Astrology Software
Astrology [is]!a#pseudo#science which attempts {to] make predictions
about w orldly events *and%p eo p le@ s day {to] day lives through
interpreting *the^supposed influences |of| *the^ position *and%motion |of|
celestial bodies* principally *the^sun* moon *and%planets@
Today there [is] astrology software {to] aid people interested *in^
doing this@Astrology software [is] vast (although not !a#hard *and%fast
rule* obviously depending on *the^astrology software you purchase)
{and} comes *in=three types |of| programmes*
1@ Calculations
2@ Interpretation or report writing
3@ Research
Astrology software packages {are] able {to] create precise and+
enlightening interpretations *and%thereafter provide !a#function {for}you
^to*print these astrological reports@*the^majority |of| astrology software
*is]user friendly*powerful *and%can calculate *and%integrate astrological
charts with high astronomical accuracy *and%professional quality@
There {are]!a#variety |of| options {to] choose from#house systems*zodiacal
reference etc@ @@
Before purchasing your astrology software* you {will] have *to^
define your needs *in=order {to] see what you want {it]{for}*and%what you
would like {to] achieve@*the^top priority [is] {to] ensure you purchase !a#
w ell#crafted program m e@Ensure you understand *the^ product
descriptions* feature lines* screen shots *and%read *the^ professional
rev iew s@Majority |of| astrology softw are {will] give !a# detailed
astrological report* including interpretation help {for} each symbol
present on *the^chart@
Astrological computations such as birth charts*chart comparisons
{and} prediction methods can all be carried out through *the^relative
calculation software programmes@After completing all your tasks
*it^is*]then possible {to] print out all your chart wheels* tables* maps and+
graphs that you have created@
Computer Software Languages *and%Graphics Design 15
A P P L IC A T IO N S O F T W A R E
Represents programmes that allow users {to] do something besides
simply run *the^hardware@ Some experts also include !a#third category*
programming software* though others put those programmes into
one |of| *the^ other p rev io u sly m en tion ed ca teg o ries@!a# set |of|
programmes used {to] solve particular problems |of| user through
com puter [is] called A pplication softw are@{it] [is] also know n as
application package@
The ready packages {are] also available *in= market on CDs *for^
various purposes@These {are] used {by] user who does not know *the^
computer programming@*the^users solve their problems {by] using
ready packages more easily *and%quickly@
Some |of| application packages are*
• Word processing software@
• Spreadsheet software@
• Database Management System software@
• Graphics software@
• Communication software@
Word Processing Software
This software [is] used {to] create *and%{to] edit documents such as
letters* reports* essays etc@*the^word processing software provides
several features {for} document editing *and%formatting@In@editing
process*text [is] entered into *the^document* deleted*copied or moved
^to*another location etc@
In formatting process* different formats can be applied on *the^
text {to] make *the^ document more attractive before {to] print on *the^
printer@*the^most popular word processing software programmes are*
Microsoft Word* Word Perfect etc@
Spreadsheet Software
Spreadsheet software [is] used {to] store *and%process data *in=*an&
electronic sheet having columns *and%rows@*the^data [is] entered into
*the^cells |of| *the^sheet@
The intersection |of| !a# row *and%!a#column [is] known as cell@Each
cell [is]!a#unique address@*the^numbers *and%formulas {are] entered into
*the^cells *and%*the^computer can automatically perform *the^calculation
on numerical data *in=cells@
Computer Software Languages *and%Graphics Design 17
T Y P E S |o f| C O M P U T E R S O F T W A R E
Programming Software
This [is] one |of| *the^ most commonly known *and%popularly used
forms |of| computer software@These software come *in=forms |of| tools
that assist !a# program mer *in= w riting com puter program m es@
Computer programmes {are] sets |of| logical instructions that make !a#
computer system perform certain tasks@*the^tools that help *the^
programmers *in=instructing !a#computer system include text editors*
compilers *and%interpreters@
18 Computer Software Languages *and%Graphics Design
System Software
It helps *in=running *the^computer hardware *and%*the^computer system@
System software [is] !a#collection |of| operating systems~ devise drivers*
servers* windowing systems *and%utilities@System software helps *an&
application programmer *in=abstracting away {from] hardware* memory
{and} other internal complexities |of| !a#computer@
Application Software
It enables *the^ end users {to] accomplish certain specific tasks@
Business software* databases *and%educational software {are] some
forms |of| application software@Different word processors*which *are^
dedicated {for} specialized tasks {to] be performed {by] *the^user*{are] other
examples |of| application software@
Inventory Management Software
This type |of| software helps *an^organization *in=tracking {its] goods
{and} materials on *the^basis |of| quality as well as quantity@
Warehouse
inventory management functions encompass *the^internal warehouse
movements *and%storage@Inventory software helps !a# company *in^
organizing inventory *and%optim izing *the^ flow |of| goods *in=*the^
organization* thus leading {to] *an^improved customer service@
Utility Software
Also known as service routine* utility software helps *in=*the^
management |of| computer hardware *and%application software@*it^
performs !a#small range |of| tasks@
Disk defragmenters*systems utilities
{and} virus scanners {are] some |of| *the^ typical examples |of| utility
software@
Data Backup *and%Recovery Software
An id eal data backup *and% recovery softw are p rovid es
functionalities beyond simple copying |of| data files@This software
often supports user needs |of| specifying what [is] {to] be backed up and+
w h e n @Backup *and%recovery softw are preserve *the^ original
organization |of| files *and%allow *an^easy retrieval |of| *the^backed up data@
Computer Games Software
A form |of| entertainment software that has many genres@
Some |of|
these genres include MMOs (Massive Multiplayer Online games)*
Computer Software Languages *and%Graphics Design 19
B L O C K D IA G R A M |o f| C O M P U T E R
Primary Storage
Stores *and%provides very fast@This memory [is] generally used *to^
hold *the^programme being currently executed *in=*the^computer**the^
data being received {from] *the^ input unit**the^intermediate *and%final
results |of| *the^ programme@*the^primary memory [is] temporary *in^
nature@
The data [is] lost* when *the^computer [is] switched off@*in=order *to^
store *the^ data permanently* *the^ data has {to] be transferred {to] *the^
secondary memory@*the^cost |of| *the^primary storage [is] more compared
^to**the^secondary storage@Therefore most computers have limited
primary storage capacity@
Secondary Storage
Secondary storage [is] used like *an^ archive@{it] stores several
programmes* documents* data bases etc@*the^programmes that you
run on *the^ computer {are] first transferred {to] *the^ primary memory
before {it] [is] actually run@Whenever *the^results {are] saved* again they
get stored *in=*the^secondary memory@*the^secondary memory [is] slower
{and} cheaper than *the^primary memory@Some |of| *the^commonly used
secondary memory devices {are] Hard disk*CD* etc@ *
MEMORY SIZE
All digital computers use *the^binary system*i@
e@0@
s *and%1@
s@Each character
or !a#number [is] represented {by]*an^8 bit code@
The set |of| 8 bits [is] called !a#byte@
A character occupies 1 byte space@
A numeric occupies 2 byte space@
Byte [is] *the^space occupied *in=*the^memory@
The size |of| *the^primary storage [is] specified *in=KB (Kilobytes) or
MB (Megabyte)@One KB [is] equal {to] 1024 bytes *and%one MB [is] equal
^to*1000KB@*the^size |of| *the^ primary storage *in=!a#typical PC usually
starts {at] 16MB@PCs having 32 MB* 48MB* 128 MB* 256MB memory
^are*quite common@
OUTPUT UNIT
The output unit |of| !a# computer provides *the^ information and+
results |of| !a# computation {to] outside world@Printers* Visual Display
Unit (VDU) {are] *the^commonly used output devices@ Other commonly
used output devices {are] floppy disk drive* hard disk drive* and
22 Computer Software Languages *and%Graphics Design
bH > ° b= [ > C a #0 °
A B C A B C A C
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
S O F T W A R E G E N E R A T IO N S
First Generation
During *the^ 1950@ s *the^ first computers were programmed *by^
changing *the^wires *and%set tens |of| dials *and%switches@One {for} every
bit sometimes these settings could be stored on paper tapes that
looked like !a# ticker tape {from] *the^ telegraph # !a# punch tape # or
punched card@With these tapes *and%or cards *the^machine was told
what* how *and%when {to] do something@
To have !a#flawless programme !a#programmer needed {to] have !a#
very detailed knowledge |of| *the^ computer{where}he or she worked
on@!a#small mistake caused *the^computer {to] crash@
Second Generation
Because *the^first generation $languages$ were regarded as very
user unfriendly people set out {to] look {for} something else*faster and+
easier {to]understand@*the^result was *the^birth |of| *the^second generation
languages (2GL) {at] *the^mid |of| *the^1950@s@These generation made use
|of| symbols *and%{are] called assemblers@*an^assembler [is]!a#programme
that translates symbolic instructions {to] processor instructions@(See
above {for} *an^example) But deep *in=*the^1950@ s there was still not !a#
single processor but !a#whole assembly rack with umpteen tubes and+
or relays@
A programmer did no longer have {to] work with one@ s *and%zero@ s
when using *an^assembly language@ He or she can use symbols instead@
These symbols {are] called mnemonics because |of| *the^ mnemonic
character these symbols had (STO = store)@Each mnemonic stands
^for*one single machine instruction@
But *an^assembler still works on !a#very low level with *the^machine@
^for*each processor !a#different assembler was written@
Third Generation
At *the^end |of| *the^1950@ s *the^@natural language@interpreters and+
compilers were made@ But {it]took some time before *the^new languages
were accepted {by] enterprises@
About *the^oldest 3GL [is] FORTRAN (Formula Translation) which
was developed around 1953 {by] IBM@This [is] !a# language primarily
intended {for} technical *and%scientific purposes@Standardization of
Computer Software Languages *and%Graphics Design 27
part |of| *the^ computer@ s memory capacity than 3GL@ s@But hardware
|of| technologically high standard [is] made more available every day*
not necessarily cheaper*so *in=*the^long run restrictions {will] disappear@
Considering *the^arguments one can say that *the^costs saved *in^
d evelop m en t could now be in v ested *in= hardware |of| higher
performance *and%stimulate *the^development |of| *the^4GL@ s@
In *the^1990@ s *the^ expectations |of| !a# 4GL language {are] too high@
{and} *the^ use |of| {it] only {will] be picked up {by] Oracle *and%SUN that
have enough power {to] pull {it] through@However *in=most cases *the^
4GL environment [is] often misused as !a# documentation tool *and%!a#
version control implement@*in=very few cases *the^use |of| such programs
^are*increasing productivity@*in=most cases they only {are] used {to] lay
*the^basis {for} information systems@*and%programmers use all kinds |of|
libraries *and%toolkits {to] give *the^product {its] final form@
Fifth Generation
This term [is] often misused {by] software companies that build
programming environments@Till today one can only see vague
contours@When one sees !a#nice graphical interface {it] [is] tempting *to^
call that !a#fifth generation@But alas changing *the^makeup does not
make !a#butterfly into *an^eagle@
Yes some impressions {are] communicated {from] professional circles
that {are] making these environments *and%sound promising@
But again *the^Fifth generation only exist *in=*the^brains |of| those
trying {to] design this generation* YET$Many attempts {are] made but
^are*stranding on *the^limitations |of| hardware**and%strangely enough
on *the^views *and%insight |of| *the^use |of| natural language@We need !a#
different speak {for} this$
But {it] [is] !a#direction that {will] be taken {by] these languages* no
longer prohibiting {for} *the^ use |of| natural language *and%intuitive
approach towards *the^programme (language) {to] be developed
The basis |of| this [is] laid *in=*the^1990@ s {by] using sound* moving
images *and%agents #!a#kind |of| advanced macro@ s |of| *the^1980@
s@
*it^is]*only natural that neural networks {will] play *an^important role@
*and%
Software {for}*the^end user {will] be (may be) based on principles |of|
knowbot#agents@*an^autonomous self changing piece |of| software that
creates new agents based on *the^ interaction |of| *the^ end user and+
interface@!a#living piece |of| software*as you may say@*and%were human
alike D N A /R N A (intelligent#) algorithms can play !a#big role@
Computer Software Languages *and%Graphics Design 29
C O M PU TER LAN G U AG ES
INTRODUCTION
The term computer language includes !a#wide variety |of| languages
used {to] communicate with computers@{it][is]broader than *the^more
com m only#u sed term program m ing lan gu age@Program m ing
languages {are] !a#subset |of| computer languages@{for}example* HTML
*is] !a#markup language *and%!a#computer language* but {it] [is] not
traditionally considered !a#programming language@Machine code
*is$a#!computer language@{it]can technically be used {for} programming*
{and} has been (e@ g@*the^original bootstrapped {for}Altair BASIC)*though
most would not consider {it]!a#programming language@
Computer languages can be divided into two groups*high#level
languages *and%low #level languages@H igh#level languages *are^
designed {to] be easier {to] use* more abstract**and%more portable than
lo w #level lan gu ages@Syntactically correct programs *in= som e
languages {are] then compiled {to] low#level language *and%executed
*by^t*he^computer@Most modern software [is] written *in=!a#high#level
language*compiled into object code**and%then translated into machine
instructions@
Computer languages could also be grouped based on other
criteria@ Another distinction could be made between human#readable
{and} non#human#readable languages@ Human#readable languages *are^
designed {to] be used directly {by] humans {to] communicate with *the^
computer@
N on#human#readable languages* though they can often be
partially understandable*{are] designed {to]be more compact *and%easily
processed* sacrificing readability {to] meet these ends@
TYPES |of| COMPUTER LANGUAGES
Language can be categories broadly into three categories@
Machine Language
The most elementary *and%first type |of| computer* which was
invented* was machine language@Machine language was machine
dependent@!a#programme written *in=machine language cannot be run
on another type |of| computer without significant alterations@
Machine
language [is] some times also referred as *the^binary language i#e* the
30 Computer Software Languages *and%Graphics Design
S O F T W A R E C R IS IS
Indeed**the^problem |of| trying {to] write *an^encyclopedia [is] very
much like writing software@Both running code *and%!a#hypertext/
encyclopedia {are] wonderful turn#ons {for} *the^ brain**and%you want
more |of| {it] *the^more you see* like !a#drug@
As !a#user*you want {it]{to] do everything* as !a#customer you don@ t
really want {to]pay {for} it**and%as !a#producer you realise how unrealistic
*the^customers are@
Requirements {will] conflict *in=functionality vs affordability*
and+in
*&
completeness vs timeliness@
Computer Software Languages *and%Graphics Design 31
Software Development
Software development today [is] more |of| !a# craft than !a#science@
Developers {are] certainly talented *and%skilled*but work like craftsmen*
relying on their talents *and%skills *and%using techniques that cannot
be measured or reproduced@On *the^other hand* software engineers
place emphasis on reproducible* quantifiable techniques#the marks
|of| science@*the^software industry [is] still many years away *from^
b ecom ing !a# m ature engineering d iscip lin e@Formal software
engineering processes exist*but their use [is] not widespread@!a#crisis
similar {to] *the^software crisis [is] not seen *in=*the^hardware industry*
^where* well documented*formal processes {are] tried *and%true**and%ad
hoc hardware development [is] unheard of@{to] make matters worse*
software technology [is] constrained {by] hardware technology@Since
hardware develops {at] !a#much faster pace than software* software
developers {are] constantly trying {to] catch up *and%take advantage |of|
hardware improvements@
Management often encourages ad hoc software development
*in^a*n&attempt {to] get products out on time {for} *the^ new hardware
architectures@D esign * docum entation* *and%evaluation {are] |of|
secondary importance *and%{are] omitted or completed after *the^fact@
However* as *the^ statistics show* *the^ad hoc approach just doesn@ t
work@ Software developers have classically accepted !a#certain number
|of| errors *in=their work as inevitable *and%part |of| *the^job@That mindset
becomes increasingly unacceptable as software becomes embedded
*in&more *and%more consumer electronics@Sixty errors per thousand
lines |of| code [is] unacceptable when *the^code [is] embedded *in=!a#toaster*
automobile* ATM machine or razor (let your imagination run free
^for*!a#moment)@
Computer Science *and%Product Orientation
Software developers pick up *the^ ad hoc approach {to] software
development early *in=their computer science education*{where}they
^are* taught !a# $product orien tation $ approach {to] softw are
development@*in=*the^many undergraduate computer science courses
I took**the^existence |of| software engineering processes was never even
mentioned@
Computer science education does not provide students with *the^
necessary skills {to] become effective software engineers@They are
Computer Software Languages *and%Graphics Design 33
taught *in=!a#way that encourages them {to] be concerned only with *the^
final outcome |of| their assignments#whether or not *the^programme
runs* or whether or not {it] runs efficiently* or whether or not they
used *the^best possible algorithm@Those concerns *in=themselves *are^
not bad@But on *the^ other hand* they should not be *the^ focus |of| !a#
project@
The focus should be on *the^complete process {from] beginning *to^
end *and%beyond@Product orientation also leads {to] problems when
*the^student enters *the^ work force#not having seen how processes
affect *the^final outcome*individual programmers tend {to] think their
work {from] day {to] day [is] too $small$ {to] warrant *the^application |of|
formal methods@
Fully Supported Software
As w e have seen*most software projects do not follow !a#formal
p rocess@*the^ result [is] !a# product that [is] poorly designed and+
documented@Maintenance becomes problematic because without !a#
design *and%documentation* it@ s difficult or impossible {to] predict
what sort |of| effect !a#simple change might have on other parts |of| *the^
system @
Fortunately there [is] *an^awareness |of| *the^ software crisis**and%*it^
has inspired !a#worldwide movement towards process improvement@
Software industry leaders {are] beginning {to] see that following !a#formal
software process consistently leads {to] better quality products* more
efficient teams *and%individuals* reduced costs**and%better morale@
Ratings range {from] Maturity Level 1* which [is] characterized *by^
ad hoc development *and%lack |of| !a# formal software development
process* up {to] Maturity Level 5*{at] which *an^organization not only
has !a#formal process* but also continually refines *and%improves it@
Each maturity level [is] further broken down into key process areas
that indicate *the^areas *an^organization should focus on {to] improve
^its*software process (e@ g @requirement analysis* defect prevention* or
change control)@
Level 5 [is] very difficult {to] attain@*in=early 1995*only two projects*
one {at] Motorola *and%another {at] Loral (the on#board space shuttle
software project)* had earned Maturity Level 5@Another study
showed that only 2% |of| reviewed projects rated *in=*the^top two
Maturity Levels**in=spite |of| many |of| those projects placing *an^extreme
emphasis on software process improvement@
34 Computer Software Languages *and%Graphics Design
S O F T W A R E E N G IN E E R IN G
PROCESS
Software engineering process *and%practices {are] *the^ structures
imposed on development |of| !a#software product@There {are] different
models |of| software process (software lifecycle [is]!a#synonym) used *in^
different organizations *and%industries@ RAL has identified three levels
|of| software process {for} {its] projects@These levels balance *the^different
needs |of| different types |of| projects@Scaling *the^process {to] *the^project
*is]vital {to] {its] success* too much process can be as problematic as too
little~ too much process can slow down !a#purely R&D exploration*
too little process can slow down !a#large development project with
hard deliverables@*the^levels {are] briefly identified as follows*
Level 1*R&D
• No software products delivered* pure research
• Minimal software process
Level 2*Research system
• Larger development team* informal software releases
• Moderate software process
Level 3*Delivered system
• Large software development team*formal software releases
• More formal software process
Computer Software Languages *and%Graphics Design 35
If *the^system [is] capable |of| creating some kind |of| database* then
*the^automated system#level testing should create one *and%then use
external (separately written) tools {to] verify *the^database@ s integrity@
It@s possible that *the^unit tests {will] serve some |of| these needs**and%all
unit tests should be run *in=sequence during *the^integration* build*
{and} packaging process@
Field Testing
Field testing usually begins internally@That means employees
|of| t*he^organization that produced *the^software package {will] run {it] on
their own computers@This should ultimately include all $production
level$ systems $ desktops* laptops**and%servers@
The statement you want {to] be able {to] make {at] *the^time you ask
customers {to] run !a#new software system (or !a# new version |of| *an&
existing software system) [is] $w e run {it] ourselves@$ *the^ software
developers should be available {for} direct technical support during
internal field testing@Ultimately {it] {will] be necessary {to] run *the^
softw are externally* m eaning on custom ers@(or prospective
customers@ ) computers@It@ s best {to] pick $friendly$ customers {for} this
exercise since it@ s likely that they {will] find !a#lot |of| defects $ even
some trivial *and%obvious ones $ simply because their usage patterns
{and} habits {are] likely {to] be different {from] those |of| your internal users@
The software developers should be close {to] *the^ front |of| *the^
escalation path during external field testing@Defects encountered
during field testing need {to] be triaged {by] senior developers and+
technical marketers* {to] determine which ones can be fixed *in=*the^
documentation*which ones need {to]be fixed before *the^current version
*is]released**and%which ones can be fixed *in=*the^next release (or never)@
Support
Software defects encountered either during field testing or after
*the^software has been distributed should be recorded *in=!a#tracking
system@These defects should ultimately be assigned {to] !a#software
engineer who {will] propose !a# change {to] either *the^ definition and+
documentation |of| *the^system* or *the^definition |of| !a#module* or {to]*the^
implementation |of| !a#module@ These changes should include additions
^to**the^unit and/or system#level tests**in=*the^form |of| !a#regression test
^to*show *the^defect *and%therefore show that {it] has been fixed (and *to^
keep {it] {from] recurring later)@
Computer Software Languages *and%Graphics Design 39
S O F T W A R E Q U A L IT Y A T T R IB U T E
Product Revision
The product revision perspective identifies quality factors that influence
*the^ability {to] change *the^software product* these factors are*
• Maintainability**the^ability {to] find *and%fix !a#defect@
• Flexibility* *the^ ability {to] make changes required as dictated
*by^t*he^business@
• Testability**the^ability {to] Validate *the^software requirements@
Product Transition
The product transition perspective identifies qu ality factors that
influence *the^ability {to] adapt *the^software {to] new environments*
• Portability* *the^ ability {to] transfer *the^ software {from] one
environment {to] another@
• Reusability**the^ease |of| using existing software components *in=!a#
different context@
• Interoperability**the^extent* or ease*{to] which software components
work together@
Product Operations
The product operations perspective identifies qu ality factors that
influence *the^extent {to] which *the^software fulfils {its] specification*
• Correctness**the^functionality matches *the^specification@
• Reliability**the^extent {to] which *the^system fails@
• Efficiency* system resource (including cpu* disk* memory*
network) usage@
• Integrity* protection {from] unauthorized access@
• Usability* ease |of| use@
2
S o f tw a r e A r c h ite c tu r e
The primary goal |of| software architecture [is] {to] define *the^non
functional requirements |of| !a# system *and%define *the^environment@
The detailed design [is] followed {by]!a#definition |of| how {to] deliver
*the^functional behaviour within *the^architectural rules@
Architecture [is] important because it*
• Controls complexity
• Enforces best practices
• Gives consistency *and%uniformity
• Increases predictability
• Enables re#use@
OOP
OOP [is] !a# design philosophy@{it] stands {for} Object Oriented
Programming@Object#Oriented Programming (OOP) uses !a#different
set |of| programming languages than old procedural programming
languages (C* Pascal* etc@ )@Everything *in=OOP [is] grouped as self
sustainable $objects$@Hence*you gain re#usability {by] means |of| four
main object#oriented programming concepts@
In order {to] clearly understand *the^ object orientation* let@ s take
your $hand$ as *an^example@*the^$hand$ [is] !a# class@Your body has
two objects |of| type hand* named left hand *and%right hand@
Their main functions {are] con trolled/ m anaged {by] !a# set |of|
electrical signals sent through your shoulders (through *an^interface)@
So *the^shoulder [is]*an^interface which your body uses {to] interact with
your hands@
The hand [is]!a#well architected class@*the^hand [is] being re#used *to^
create *the^ left hand *and%*the^right hand {by] slightly changing *the^
properties |of| it@
OBJECT
An object can be considered !a#$thing$ that can perform !a#set |of|
related activities@*the^set |of| activities that *the^object performs defines
*the^object@ s behaviour@{for}example**the^hand can grip something or
!a#Student (object) can give *the^name or address@*in=pure OOP terms
*an&object [is] *an^instance |of| !a#class@
CLASS
A class [is] simply !a# representation |of| !a# type |of| object@{it][is]*the^
blueprint/ plan/ template that describe *the^details |of| *an^object@
Computer Software Languages *and%Graphics Design
A class [is] *the^ blueprint {from] which *the^ individual objects *are^
created@Class [is] composed |of| three things*!a#name* attributes* and+
operations@
p u b lic c la s s S tu d e n t
}
According {to]*the^sample given below we can say that *the^student
object*named objectStudent*has created out |of| *the^Student class@
S tu d e n t o b je c tS tu d e n t = new S t u d e n t ( ) ~
In real world*you@ ll often find many individual objects all |of| *the^
same kind@As *an^example*there may be thousands |of| other bicycles
*in&existence* all |of| *the^same make *and%model@Each bicycle has built
^from* *the^same blueprint@*in=object#oriented terms* we say that *the^
bicycle [is]*an^instance |of| *the^class |of| objects known as bicycles@*in=*the^
software world* though you may not have realised it* you have
already used classes@{for} example**the^TextBox control*you always
used*[is] made out |of| *the^TextBox class*which defines {its] appearance
{and} capabilities@Each time you drag !a# TextBox control* you *are^
actually creating !a#new instance |of| *the^TextBox class@
IDENTIFICATION *and%DESIGN |of| !a# CLASS
This [is]*an^art~each designer uses different techniques {to] identify
classes@However according {to] Object Oriented Design Principles*
there {are] five principles that you must follow when design !a#class*
• SRP#The Single Responsibility Principle #
A class should have one**and%only one* reason {to] change@
• OCP#The Open Closed Principle #
You should be able {to] extend !a# classes behaviour* without
modifying it@
Computer Software Languages *and%Graphics Design 45
{
p u b lic S tu d e n tR e g is t r a r ()~
{
new R e c o r d M a n a g e r ( ) @I n i t i a l i s e () ~
}
}
In this case we can say that there [is] *an^ association between
StudentRegistrar *and%RecordManager or there [is] !a# directional
a ssociation {from ] StudentR egistrar {to ] RecordM anager or
StudentRegistrar use !a#(*Use*) RecordManager@Since*!a#direction *is$
exp licitly sp e c ifie d * *in= this case *the^ controller class [is] *the^
StudentRegistrar@
p u b lic c la s s E x c e p tio n
{
p u b lic c la s s IO E x c e p t io n * E x c e p tio n
{
Computer Software Languages *and%Graphics Design 51
POLYMORPHISMS
Polymorphisms [is]!a#generic term that means @ many shapes@ @More
precisely Polymorphisms means *the^ability {to] request that *the^same
operations be performed {by]!a#wide range |of| different types |of| things@
At times* I used {to] think that understanding Object Oriented
Programming concepts have made {it] difficult since* they have
grouped under four main concepts* while each concept [is] closely
related with one another@Hence* one has {to] be extremely careful *to^
correctly understand each concept separately* while understanding
*the^way each related with other concepts@
In OOP *the^polymorphisms [is] achieved {by] using many different
techniques named method overloading* operator overloading and+
method overriding*
METHOD OVERLOADING
The method overloading [is] *the^ability {to] define several methods
all with *the^same name@
p u b lic c la s s M yLogger
{
p u b lic v o id L o g E rr o r(E x c e p tio n e)
{
// I m p le m e n t a t i o n goes h e re
}
p u b lic b o o l L o g E r r o r (E x c e p tio n e * s t r in g m essage)
{
// I m p le m e n t a t i o n goes h e re
}
OPERATOR OVERLOADING
The operator overloading (less commonly known as ad#hoc
polymorphisms) [is]!a#specific case |of| polymorphisms *in=which some
or all |of| operators like +*# or == {are] treated as polymorphic functions
{and} as such have different behaviours depending on *the^types |of| *its^
arguments@
p u b lic c la s s C o m p le x
{
p r iv a t e in t r e a l~
p u b lic in t Real
{ get { re tu rn r e a l~ } }
p r iv a t e in t im a g in a r y ~
52 Computer Software Languages *and%Graphics Design
p u b lic in t Im a g i n a r y
{ get { re tu rn im a g in a r y ~ } }
p u b lic C o m p le x (in t r e a l* in t im a g i n a r y )
{
t h i s @r e a l = r e a l~
t h i s @i m a g i n a r y = i m a g i n a r y ~
}
p u b lic s t a t ic C o m p le x o p e r a t o r + (C o m p le x c 1 * C o m p le x c 2 )
{
re tu rn new C o m p l e x ( c 1 @R e a l + c 2 @R e a l * c 1 @I m a g i n a r y +
c 2 @I m a g i n a r y ) ~
}
}
In above example I have overloaded *the^plus operator {for} adding
two complex numbers@There *the^ two properties named Real and+
Imaginary has been declared exposing only *the^ required $get$
method*while *the^object@ s constructor [is] demanding {for} mandatory
real *and%imaginary values with *the^user defined constructor |of| *the^
class@
METHOD OVERRIDING
Method overriding [is] !a#language feature that allows !a#subclass
^to*override !a# specific implementation |of| !a# method that [is] already
provided {by] one |of| {its] super#classes@
A subclass can give {its] own definition |of| methods but need *to^
have *the^same signature as *the^method *in={its]super#class@This means
that when overriding !a#method *the^ subclass@ s method has {to] have
*the^same name *and%parameter list as *the^ super#class@ s overridden
method@
u s in g S y s te m ~
p u b lic c la s s C o m p le x
{
p r iv a t e in t r e a l~
p u b lic in t Real
{ get { re tu rn r e a l~ } }
p r iv a t e in t im a g in a r y ~
p u b lic in t Im a g in a r y
{ get { re tu rn im a g in a r y ~ } }
p u b lic C o m p le x (in t r e a l* in t im a g in a r y )
{
t h i s @r e a l = r e a l~
t h i s @i m a g i n a r y = i m a g i n a r y ~
Computer Software Languages *and%Graphics Design 53
}
p u b lic s t a t ic C o m p le x o p e r a t o r + (C o m p le x c 1 * C o m p le x
c2 )
{
re tu rn new C o m p l e x ( c 1 @R e a l + c 2 @R e a l * c 1 @Im a g i n a r y +
c 2 @I m a g i n a r y ) ~
}
p u b lic o v e r r id e s t r in g T o S t r i n g ()
{
re tu rn ( S t r i n g @F o r m a t ( $ { 0 } + { 1 } i $* r e a l * im a g in a r y ))~
}
}
In above example I have extended *the^ implementation |of| *the^
sample Complex class given under operator overloading section@ This
class has one overridden method named $ToString$* which override
*the^default implementation |of| *the^ standard $ToString$ method *to^
support *the^correct string conversion |of| !a#complex number@
C o m p le x num1 = new C o m p le x ( 5 * 7 ) ~
C o m p le x num2 = new C o m p le x ( 3 * 8 ) ~
/ / A d d tw o C o m p le x n u m b e rs u s i n g *the^
// o v e r lo a d e d p lu s o p e ra to r
C o m p le x sum = num1 + num 2~
/ / P r i n t *th e ^ n u m b e rs *and% *the^ sum
// u s i n g *the^ o v e r r i d e n T o S tr in g m e th o d
C o n s o l e @W r i t e L i n e ( $ ( { 0 } ) + ({1}) = { 2 } $* num 1* num2* s u m )~
C o n s o l e @R e a d L i n e ( ) ~
< Property>
+ UniveristyChanoellor 0* Chanoellor
Faculty
U niv ersity *
♦ -----------
CollectionB ase
Chancellor
• N am e * String
Same w ay* as another example* you can say that* there [is] !a#
composite relationship in#between !a#KeyValuePairCollection *and%!a#
KeyValuePair@*the^two mutually depend on each other@
N et *and%Java uses *the^ Com posite relation {to] define their
Collections@I have seen Composition [is] being used *in=many other
ways too@ However *the^more important factor*that most people forget
*is] *the^life time factor@*the^life time |of| *the^two classes that has bond
with !a#composite relation mutually depend on each other@
If you take the@net Collection {to] understand this*there you have
*the^Collection Element define inside (it [is]*an^inner part*hence*called
^it*[is]composed of) *the^Collection*farcing *the^Element {to] get disposed
with *the^Collection@ If not*as *an^example*if you define *the^Collection
{and} it@ s Element {to] be independent* then *the^relationship would be
more |of| !a# type Aggregation* than !a#Composition@So *the^point is* if
Computer Software Languages *and%Graphics Design 55
ABSTRACTION *and%GENERALISATION
Abstraction [is] *an^emphasis on *the^idea* qualities *and%properties
rather than *the^particulars (a suppression |of| detail)@*the^importance
|of| abstraction [is] derived {from] {its] ability {to] hide irrelevant details
and+^ from**the^use |of| names {to] reference objects@Abstraction [is] essential
*in^t*he^construction |of| programmes@{it]places *the^emphasis on what *an&
object [is] or does rather than how {it] [is] represented or how {it] works@
Thus* {it] [is] *the^primary means |of| managing complexity *in= large
programmes@
While abstraction reduces complexity {by] hiding irrelevant detail*
generalisation reduces complexity {by] replacing multiple entities
w h ich perform sim ilar fu nction s w ith !a# sin g le con stru ct@
Generalisation [is]*the^broadening |of| application {to] encompass !a#larger
domain |of| objects |of| *the^ same or different type@Programming
languages provide generalisation through variables* parame#
terisation*generics *and%polymorphism@{it]places *the^emphasis on *the^
similarities between objects@Thus*{it]helps {to] manage complexity *by^
collecting individuals into groups *and%providing !a#representative
which can be used {to] specify any individual |of| *the^group@Abstraction
56 Computer Software Languages *and%Graphics Design
C o m p u te r G r a p h ic s D e s ig n
{and} S y s t e m
INTRODUCTION
CGI was first used *in=movies *in=1973**in=*the^science fiction film*
Westworld@*the^film was *the^story |of| !a#society *in=which humans *and%robots
were integrated*working *and%living together@{its]sequel*Futureworld (1976)
featured *the^first use |of| 3D wireframe imagery@*the^third film ever {to] use
this technology was Star Wars (1977)* designing *the^Death Star *and%*the^
targeting computers *in=*the^X#wings *and%*the^Millenium Falcon*Han Solo@ s
ship@ Later on**the^Black Hole (1979) used raster wire#frame model rendering
^to*create !a#black hole onscreen@That same year*James Cameron@ s Alien
used *the^raster wireframe model {to]render *the^image |of| navigation monitors
*in&*the^scene{where}*the^ spaceship follows !a#beacon {for} landing guidance@
Long before this*computer engineers {at]MIT *and%Cornell were *in=*the^midst
|of| creating *the^very basics that eventually enabled these filmmakers *to^
utilize computer animation technology@{it]all began *in=1963@
1960s
• 1963* Ivan Sutherland presented his Ph@ D@dissertation**an&
interactive design on !a#vector graphics display monitor with !a#light
Computer Software Languages *and%Graphics Design 61
Fig@*the^Graphic System
THE PROCESSOR
Within *the^processor box*two types |of| processing take place@*the^
first [is]picture formation processing@*in=this stage**the^user programme
or commands {are] processed@*the^picture [is] formed {from] *the^elements
(lines*text) available *in=*the^system using *the^desired attributes@Such
as line colour *and%text font@*the^ user interface [is] !a# part |of| this
processing@*the^picture can be specified *in=!a#number |of| ways* such
as through *an^interactive menu#controlled painting programme or
via !a#C programme using !a#graphics library@*the^physical processor
used *in=this stage [is] often *the^processor *in=*the^workstation or host
computer@
The second kind |of| processing [is] concerned with *the^display
|of| t*he^picture@*in=!a#raster system**the^specified primitives must be scan
converted@*the^screen must be refreshed {to] avoid flicker@Input
*from^th*e^user might require objects {to] be repositioned on *the^display@*the^
kind |of| processor best suited {for} these jobs [is] not *the^standard type
|of| processor found *in=most computers@Instead* special boards and+
chips {are] often used@As we have already noted*one |of| *the^elements
that distinguishes real#time graphics systems [is] their use |of| display
processors@Since we have agreed {to] stay {at] *the^block#diagram level
^for*now* however* we shall not explore these architectures *in=any
detail until later@
MEMORY
There {are] often two distinct types |of| memory em ployed *in^
graphics systems@{for} *the^processing |of| *the^ user programme* the
64 Computer Software Languages *and%Graphics Design
memory [is] similar {to] that |of| !a#standard computer* as *the^picture *is$
form ed {by] !a# standard type |of| arithmetic processing@D isplay
processing* however* requires high#speed display memory that can
be accessed {by] *the^display processor*and**in=raster systems*memory
^for**the^frame buffer@This display memory usually [is] different *in=both
^its*physical characteristics *and%{its] organization {from] what [is] used
*by^t*he^picture processor@{at] this point* we need not consider details |of|
how memory can be organized@You should be aware that *the^way
*the^internals |of| our processor *and%memory boxes {are] organized
distinguishes !a# slow system {from] !a# real#time picture#generating
system * such as !a# flight simulator@H owever* {from] our present
perspective*we shall emphasize that all implementations have {to] do
*the^same kinds |of| tasks {to] produce output@
OUTPUT DEVICES
Our basic system has one or more output devices@As raster
displays {are] *the^ dominant type* we shall assume there [is] !a#raster#
scan CRT on our system@We shall consider *the^frame buffer {to] be
part |of| *the^ display memory@*in=!a#self#contained system such as !a#
workstation* *the^ display [is] *an^integral part |of| *the^ system* so *the^
transfer |of| information {from] *the^processor {to] *the^display {will] happen
rapidly@When *the^ display [is] separate* such as w ith !a# graphics
terminal**the^speed |of| *the^connection [is]much slower@ Terminals with
raster displays usually must have their own frame buffers* so *the^
displays can be refreshed locally@*in=our simple system* we might
also have other displays* such as !a#plotter* {to] allow us {to] produce
hardcopy@
INPUT DEVICES
A simple system may have only !a#keyboard {to] provide whatever
input [is] necessary@Keyboards provide digital codes corresponding
^to*sequences |of| keystrokes {by] !a# user@These sequences {are] usually
interpreted as codes {for} characters@ If individual keystrokes or groups
|of| keystrokes {are] interpreted as graphical input**the^keyborad can be
used as !a# complex input device@{for} example* *the^ $arrow$ keys
available on most keyboards can be used {to] direct *the^movement
|of|a#!cursor on *the^screen@Most graphics systems {will] provide {at] least
one other input device@*the^most common {are]*the^mouse**the^lightpen*
*the^joystick* *and%*the^data tablet@Each can provide positional
Computer Software Languages *and%Graphics Design 65
HISTORICAL BACKGROUND
|of| COMPUTER GRAPHICS
Today there {are] very few aspects |of| our lives not affected *by^
computers@Practically every cash or monetary transaction that takes
place daily involves !a#computer@*in=many cases**the^same [is] true |of|
com puter graphics@W hether you see them on telev isio n **in^
newspapers**in=weather reports or while {at] *the^ doctor@ s surgery*
computer images {are] all around you@
$A picture [is] worth !a#thousand words$[is]!a#well#known saying* and+
highlights *the^advantages *and%benefits |of| *the^visual presentation |of|
our data@We {are] able {to] obtain !a#comprehensive overall view |of| our
data *and%also study features *and%areas |of| particular interest@
A w ell#chosen graph [is] able {to] transform !a# complex table |of|
numbers into meaningful results@Such graphs {are] used {to] illustrate
papers* reports* *and%theses* as w ell as providing *the^ basis *for^
p resen tation m aterial *in= *the^ form |o f| slid es *and% overhead
transparencies@!a#range |of| tools *and%facilities {are] available {to] enable
users {to] visualise their data**and%this document provides !a# brief
summary *and%overview @Computer graphics {are] used *in= many
disciplines *and%subjects but {for}*the^purpose |of| this document*we *will^
split *the^topic |of| computer graphics into *the^following fields*
CHARTING
One |of| *the^prime uses {for} graphical software {at] *the^University
*is$t^
o*produce graphs *and%charts@Everyone has data |of| one kind or
another*whether on paper**in=*the^computer* or just *in=*the^mind@We
often need {to] know *the^significance *and%properties |of| *the^data* or *to^
be able {to] compare different parts |of| {it] against other data sets@
66 Computer Software Languages *and%Graphics Design
One |of| *the^simplest aspects |of| data display [is] *the^production |of|
charts@ This [is]{where}you would want {to]put your data into !a#graphical
form {to] show relationships *and%comparisons between sets |of| values@
There may be !a#number |of| reasons w hy you would want {to] pu t your
data into !a#chart*
• To illustrate differences between different sets |of| data*
• To show trends between two variables*
• To show patterns |of| behaviour *in=one variable@
There {are] basically two broad areas |of| graphs*
• Presentation charts *and%graphs |of| *the^ kind used {to] illustrate !a#
few principal points@We see these on news *and%current affairs
programmes on television@!a#bar chart or !a#pie chart [is] used *to^
indicate results |of| data obtained so far *and%*the^general trends@
They {are] often liberally decorated with bright colours {to] increase
their visual appeal *and%attractiveness {to] *the^viewers *and%{to] hold
their attention@They {are] used {for} visual impact *and%getting !a#
simple point over clearly *and%effectively@
• Scientific charts *and%graphs {are] more concerned with ensuring
that *the^detail *in=*the^data [is] represented accurately *and%faithfully@
We may have some results obtained {from] experim ental
measurements *and%wish {to] display them@We may want *to^
compare *the^results {from] *the^ data measurements with *the^results
we would expect according {to] !a#particular theoretical model@We
may want {to] draw !a#curve through *the^data points (i@ e@interpolate
*the^data) *and%display this along with *the^original points@
The aims |of| *the^ two {are] different**and%so *the^facilities you *will^
want {from] your charting package {will] also be different@Presentation
charting has more {to] do with impressive presentation graphics *where^
*the^aim [is] {to] put !a#salient point across {to]*an^audience@As !a#result *the^
priority w ith this sort |of| charting [is] not alw ays accuracy |of|
representation@You want charts with strong colours**an^impressive
look *and%special effects@*the^effect |of| !a#presentation can be enhanced
^by*u sin g 3D graphs* adding pictures {to] *the^ graph* or usin g
pictograms@ These sorts |of| charts {are] rarely produced *in=isolation but
as part |of| !a# general presentation@Therefore* some presentation
packages also have their own charting module {for}this purpose@ Word
{and} PowerPoint use !a#module called Microsoft Graph *and%Excel@ s
charting module has some very powerful presentation graphics
features@Origin *and%Gsharp*both dedicated charting packages* also
provide professional presentation charting facilities on *the^ PC
Computer Software Languages *and%Graphics Design 67
PRESENTATIONS
Presentation softw are [is] used {to] create m aterial used *in^
presentations*such as OHP transparencies *and%35mm slides@*the^term
*is]also commonly used when !a#presentation [is] given using *the^output
^from*!a#computer screen@*the^use |of| presentation software [is]becoming
|of| increasing importance as higher standards become expected *in^
courses *and%presentations@This {will] often include making use |of|
colour* graphics *and%*the^University logo@
Course materials produced using presentation packages can be
delivered *in=!a#number |of| w ays@*the^simplest way [is] {to] print the
Computer Software Languages *and%Graphics Design
DRAWING*PAINTING *and%DESIGN
Drawing *and%painting software [is] available on most platforms
*at^t*he^U niversity@H ow ever* there {are] many differences betw een
software intended primarily {for} drawing *and%that intended *for^
painting@Drawing software {will] provide *the^ user w ith !a# set
|of|entities@
@ used {to]construct *the^drawing (an entity [is]!a#drawing element
such as !a#line*circle* or text string)@Drawing entities can range *from^
simple lines* points *and%curves *in=2D {to] their equivalents *in=3D and+
may include 3D surfaces@Advanced versions |of| drawing packages
used {for} design {are] referred {to] as Computer Aided Design (CAD)
systems@Painting software tends {to] work on !a#conceptually lower
layer@ Whilst {it]may provide some entities {for} constructing geometric
shapes (these tend {to] be 2D geometric shapes)*!a#painting package
^will* also provide control over individual pixels *in=*the^image* i@ e@*it^
provides direct control over *the^bitmap@{it][is]worth remembering that
opening any image *in=!a#painting package causes {it] {to] become
pixelated@
Computer Software Languages *and%Graphics Design 69
CAD applications {are] very powerful tools that can be used {by]!a#
designer@*the^speed *and%ease with which !a#drawing can be prepared
{and} modified using !a#computer have !a#tremendous advantage over
hand#based drawing techniques@ CAD#based drawings can be created
very easily using *the^ drawing primitives made available {by] *the^
software (2D /3D lines* arcs* curves* 3D surfaces* text etc@ )@*the^
drawing can be shared {by] !a#number |of| designers over !a#computer
network who could all be specialists *in=particular design areas and+
located {at] different sites@CAD also allows drawings {to] be rapidly
edited *and%modified* any number |of| times@
Drawings can also be linked into databases that could hold
material specifications* material costs etc@ * thereby providing !a#
comprehensive surveillance {from] design through {to] manufacturing@
*in&engineering applications*CAD system specifications can be passed
through {to] numerically controlled (NC) machines {to] manufacture
parts directly@
For creating three#dimensional objects* most CAD systems *will^
provide 3D primitives (such as boundary representations |of| spheres*
cubes* surfaces |of| revolution *and%surface patches)@They may also
provide !a# solid m odelling facility through Constructive Solid
Geometry (CSG)@Using CSG*basic 3D solids (usually cubes*spheres*
wedges* cones* cylinders *and%tori) more complex composite solids
can be created using three basic operations*joining (union) solids*
removing (subtraction) solids *and%finding *the^ common volume
(intersection) |of| solids@With solid modelling*mass properties |of| solids
(e@ g @moments |of| inertia* principal moments etc@ ) can be quickly
calculated@
There [is] virtually no limit {to] *the^kind |of| drawings *and%models
that can be prepared using !a#CAD system*if {it]can be created {by] hand*
!a#CAD system {will] allow {it] {to] be drawn *and%modelled@Some |of| *the^
applications{where}CAD [is] used are*architectural *and%interior design*
almost all engineering disciplines (e@ g @electronic* chemical* civil*
mechanical* automotive *and%aerospace)* presentation drawings*
topographic maps* musical scores* technical illustration* company
logos *and%line drawing {for} fine art@
Most CAD models can be enhanced {for} further understanding
{and} presentation {by] *the^ use |of| advanced rendering animation
techniques (by adding material specifications* light sources and
Computer Software Languages *and%Graphics Design 71
camera motion paths {to] *the^model) {to] produce realistic images and+
interactive motion through *the^ m odel@AutoCad [is] *the^ primary
general purpose CAD system *in=use *in=engineering**and%allows 3D
solid modelling as well as 2D /3D draughting@*an^extension* AEC*
^for*architectural *and%construction applications*[is] also available@
SCIENTIFIC VISUALISATION
Scientific Visualisation [is] concerned with exploring data and+
information graphically # as !a# means |of| gaining insight into and+
understanding *the^data@{by]displaying multi#dimensional data *in=*an&
easily#understandable form on !a#2D screen*{it] enables insights into
3D *and%higher dimensional data *and%data sets that were not formerly
p o ssib le@*the^ difference betw een scientific visualisation and+
presentation graphics [is] that *the^latter [is] primarily concerned with
*the^communication |of| information *and%results that {are] already
understood@*in=scientific visualisation we {are] seeking {to] understand
*the^data@
The recent upsurge |of| interest *in=scientific visualisation has been
brought about principally {by] *the^ provision |of| powerful *and%high#
level tools coupled with *the^availability |of| powerful workstations*
excellent colour graphics**and%access {to] supercomputers if required@
This symbiosis provides !a# powerful *and%flexible environment *for^
visualising all kinds *and%quantities |of| data@
This was once regarded as *the^exclusive domain |of| expert system
{and} application programmers who could write *the^large programmes
required* incorporate *the^algorithms {for} *the^graphics* get rid |of| *the^
bugs *in=*the^resulting programme (a non#trivial *and%time#consuming
task)**and%then process *the^ data@Most |of| this now comes already
available @ off *the^ shelf@# all *the^ users have {to] do [is] activate {it] and+
plug *in=their data sets@
Visualisation tools range {from] lower#level presentation packages*
through turnkey graphics packages *and%libraries* {to] higher#level
application builders@*the^former {are] used {for} simple *and%modest
requirements on small {to] medium sized data sets *and%{are] often used
on PCs@*the^second take larger *and%more complex data sets *and%have
!a#variety |of| facilities {for} analysis *and%presentation |of| *the^data *in=two
{and} three dim ensions@*the^ latter enable users {to] specify their
requirements *in=terms |of| their application *and%@build@!a#customised
72 Computer Software Languages *and%Graphics Design
Multimedia
There [is] joint provision {for} networked colour printing* graphics*
slides *and%video {by] Information Systems Services *and%*the^Print &
Copy Bureau@
On#line Services* Printers*Slide Makers *and%Scanners
A4 monochrome (black *and%white) *and%colour postscript printers
^are*available on *the^network@Users can send electronic picture and+
text information {for}direct output on {to]paper or OHP foil@
Additional
printing facilities {are] provided {by] Media Services{where}users can
also discuss converting draft electronic information into pre#designed
images with design staff@
Computer#Based Video Production
Data can be displayed or animated *in=real#time on !a#high#powered
workstation@However**the^audience [is] clearly limited {to] those who
can sit {at] *the^ w orkstation@{for} research sem inars* conference
presentations**and%grant proposals {it] [is] often more useful {to] be able
^to*record *the^real#time image sequences on video tape *and%present
them {to] *the^audience via !a#video player or video projector@{to]ensure
such presentations {are] effective* they have {to] be {at] !a#professional
standard |of| presentation@All |of| us have become unconsciously
accustom ed {to] !a# high quality |of| presentation {from] w atching
programmes on television@ Anything less than this immediately looks
inferior *and%can often reflect on *the^content |of| what [is]being presented@
can save your Graphic Organizer files *in=*the^PDF file format@If you
save Graphic Organizer files *in=*the^PDF format*you can share them
with everyone**and%*the^file {will] print exactly as you created it@
OPEN OFFICE (OPEN SOURCE)
The catch with sharing Graphic Organizers that {are] saved *in=*the^
PDF file format [is] that you cannot make changes {to] them without
expensive software@ However**the^viewer programme that opens and+
prints *the^files [is] free *and%most people who connect {to] *the^Internet
have *the^ Acrobat Reader programme@We have included *the^latest
version {to] save you {from] having {to] download {it] {from] *the^Internet@
SOFTWARE THAT [is] !a#GRAPHIC ORGANIZER
There {are] !a# lot |of| software products on *the^ market that *are^
Graphic Organizers@
The majority |of| these products call themselves*$Mind Mapping$
software@
The competition *in=this market [is]very strong*so all vendors seem
^to*offer free trials |of| their products@{it][is]possible that !a#teacher could
use !a#different trial version |of| these products each month**and%never
purchase !a#copy@
The only catch [is] that *the^ formats |of| *the^ various products *are^
proprietary@This means that you cannot open *the^ files you create
w ith another com p an y@ s p rod u ct@ Inspiration(TM ) and+
Kidspiration(TM) {are] products that fall into this category**and%these
products {are] often available *in= school districts@Inspiration and+
Kidspiration {are] easy {to] use*but low#end products@
that we start {at] *the^back end |of| *the^ pipeline* with *the^frame#buffer
operations (also called raster operations) *and%end {at] *the^CPU@Note
also that while any single primitive (usually !a#triangle)*{by] definition*
has !a#single bottleneck*over *the^course |of| !a#frame *the^bottleneck most
likely changes@ Thus*modifying *the^workload on more than one stage
*in&*the^pipeline often influences performance@{for} example*!a#low#
polygon skybox [is] often bound {by] fragment shading or frame#buffer
access~!a#skinned mesh that maps {to] only !a#few pixels on screen *is$
often bound {by] CPU or vertex p rocessing@{for} this reason**it^
frequently helps {to]vary workloads on *an^object#by#object*or material#
by#material*basis@
Fig@
Bottleneck Flowchart
^for* each pipeline stage*we also mention *the^GPU clock {to] which
it@
s tied (that is* core or memory)@This information [is] useful *in^
conjunction with tools such as PowerStrip (EnTech Taiwan 2003)*
which allows you {to] reduce *the^ relevant clock speed *and%observe
performance changes *in=your application@
Raster Operations
The very back end |of| *the^pipeline*raster operations (often called
*the^ROP)*[is] responsible {for} reading *and%writing depth *and%stencil*
doing *the^depth *and%stencil comparisons*reading *and%writing colour*
{and} doing alpha blending *and%testing@As you can see* much |of| *the^
ROP workload taxes *the^available frame#buffer bandwidth@*the^best
way {to] test if your application [is] frame#buffer#bandwidth bound
*is$t^
o*vary *the^bit depths |of| *the^ colour or *the^depth buffers* or both@If
reducing your bit depth {from] 32#bit {to] 16#bit significantly improves
Computer Software Languages *and%Graphics Design 79
A lg o r ith m S o f t w a r e *in^
T e c h n o lo g y D e s ig n
OVERVIEW
Advanced distribution design *and%analysis software solutions
streamline *the^design |of| overhead *and%underground transmission and+
distribution lin es* optim ize designs {for} project cost* building
standards *and%system reliability**and%integrate seam lessly with
existing utility business systems {for} improved data accuracy and+
reliability throughout *the^utility@
LD#PRO
A powerful design solution {for} overhead *and%under#ground
electric distribution lines* gas distribution lines *and%joint use
applications@Capable |of| saving energy providers 15 {to] 20 Per cent
on materials *and%Labour* this application covers *the^ entire design
process@
LD#Pro [is] !a# p ow erfu l to o l {for} d esig n in g overhead and+
underground electric distribution lines* gas distribution lines and+
joint#use applications@LD#Pro integrates design data {from] multiple
sources *and%produces detailed* compliant designs@
90 Computer Software Languages *and%Graphics Design
GREEDY ALGORITHM
Greedy algorithms {are] simple *and%straightforward@They *are^
shortsighted *in=their approach *in=*the^sense that they take decisions
on *the^basis |of| information {at]hand without worrying about *the^effect
these decisions may have *in=*the^future@They {are] easy {to] invent*easy
^to*implement *and%most |of| *the^ time quite efficient@Many problems
cannot be solved correctly {by] greedy approach@Greedy algorithms
^are*used {to] solve optimization problems
GREEDY APPROACH
Greedy Algorithm works {by] making *the^decision that seems most
promising {at]any moment~{it]never reconsiders this decision*whatever
situation may arise later@
As *an^example consider *the^problem |of| $Making Change$@
Coins available are*
• Dollars (100 cents)
• Quarters (25 cents)
• Dimes (10 cents)
• Nickels (5 cents)
• Pennies (1 cent)
Problem Make !a#change |of| !a# given amount using *the^ smallest
possible number |of| coins@
Informal Algorithm
• Start with nothing@
• At every stage without passing *the^given amount@
# Add *the^largest {to] *the^coins already chosen@
Formal Algorithm
Make change {for} n units using *the^least possible number |of| coins@
MAKE# CHANGE ( n)
C # {100* 2 5 * 10* 5 * 1 } / / c o n s t a n t @
Sol # {}~/ / s e t t h a t { w i l l ] h o l d *the^ s o l u t i o n
set@
Sum # 0 sum | o f | i te m *in= s o l u t i o n s e t
WHILE sum n o t = n
x = l a r g e s t i te m *in= s e t C su c h t h a t sum + x £
n
IF no s u c h ite m THEN
92 Computer Software Languages *and%Graphics Design
RETURN $No S o l u t i o n $
S # S {va l ue | o f | x}
sum # sum + x
RETURN S
Example Make !a#change {for} 2@89 (289 cents) here n = 2@89 *and%*the^
solution contains 2 dollars* 3 quarters* 1 dime *and%4 pennies@*the^
algorithm [is] greedy because {at] every stage {it]chooses *the^largest coin
w ithout worrying about *the^ consequences@Moreover* {it] never
changes {its] mind *in=*the^sense that once !a#coin has been included
*in^t*he^solution set*{it]remains there@
CHARACTERISTICS *and%FEATURES
To construct *the^solution *in=*an^optimal w ay@
Algorithm maintains
two sets@One contains chosen items *and%*the^other contains rejected
items@
The greedy algorithm consists |of| four (4) function*
• A function that checks whether chosen set |of| items provide !a#
solution@
• A function that checks *the^feasibility |of| !a#set@
• The selection function tells which |of| *the^ candidates [is] *the^ most
promising@
• An objective function*which does not appear explicitly* gives *the^
value |of| !a#solution@
SAMPLE PROBLEM
There [is] !a#long list |of| stalls* some |of| which need {to] be covered
with boards@ You can use up {to] N (1 ^ N ^ 50) boards*each |of| which
may cover any number |of| consecutive stalls@Cover all *the^necessary
stalls* while covering as few total stalls as possible@
THE IDEA
The basic idea behind greedy algorithms [is]{to]build large solutions
up {from] smaller ones@Unlike other approaches* however* greedy
algorithms keep only *the^best solution they find as they go along@ Thus*
^for**the^sample problem*{to] build *the^answer {for} N = 5* they find *the^
best solution {for} N = 4**and%then alter {it]{to]get !a#solution {for} N = 5@No
other solution {for}N = 4 [is]ever considered@ Greedy algorithms {are] fast*
generally linear {to] quadratic *and%require little extra m em ory@
Unfortunately* they usually aren@ t correct@But when they do work*
they {are] often easy {to] implement *and%fast enough {to] execute@
PROBLEMS
There {are] two basic problems {to] greedy algorithms@
How {to] Build
How does one create larger solutions {from] smaller ones#*in^
general* this [is] !a#function |of| *the^ problem@{for} *the^sample problem*
*the^most obvious way {to] go {from] four boards {to] five boards [is]*to^
pick !a#board *and%remove !a#section* thus creating two boards *from^
one@ You should choose {to] remove *the^largest section {from] any board
94 Computer Software Languages *and%Graphics Design
which covers only stalls which don@ t need covering (so as {to] minimize
*the^total number |of| stalls covered)@
To remove !a#section |of| covered stalls*take *the^board which spans
those stalls**and%make into two boards*one |of| which covers *the^stalls
before *the^section* one |of| which covers *the^stalls after *the^second@
WORK
The real challenge {for} *the^ Programmemer lies *in=*the^fact that
greedy solutions don@ t always work@Even if they seem {to] work
*for^t*he^sample input*random input**and%all *the^cases you can think of*if
there@ s !a#case{where}it w on@ t work*{at] least one (if not more$) |of| *the^
judges@test cases {will] be |of| that form@{for}*the^sample problem*{to] see
that *the^ greedy algorithm described above works* consider *the^
following* Assume that *the^ answer doesn@ t contain *the^ large gap
which *the^ algorithm removed* but does contain !a# gap which *is$
smaller@{by]combining *the^two boards {at] *the^end |of| *the^smaller gap
{and} splitting *the^board across *the^larger gap**an^answer [is] obtained
which uses as many boards as *the^original solution but which covers
fewer stalls@This new answer [is] better* so therefore *the^assumption
*is]wrong *and%w e should always choose {to] remove *the^largest gap@
If *the^answer doesn@ t contain this particular gap but does contain
another gap which [is] just as large* doing *the^ same transformation
yields *an^answer which uses as many boards *and%covers as many
stalls as *the^ other answer@This new answer [is] just as good as *the^
original solution but no better* so we may choose either@Thus* there
exists *an^optimal answer which contains *the^ large gap* so {at] each
step* there [is] always *an^optimal answer which [is] !a#superset |of| *the^
current state@Thus**the^final answer [is] optimal@
Algorithm
The sequence has three parts**the^part which {will] be 1 when *in^
sorted order* 2 when *in=sorted order**and%3 when *in=sorted order@
*the^ greedy algorithm swaps as many as possible |of| *the^1@ s *in=*the^2
part with 2@ s *in=*the^1 part* as many as possible 1@ s *in=*the^3 part with
3@ s *in=*the^1 part**and%2@ s *in=*the^3 part with 3@s *in=*the^2 part@
Once none |of| these types remains**the^remaining elements out |of|
place need {to] be rotated one way or *the^other *in=sets |of| 3@You can
optimally sort these {by] swapping all *the^1@ s into place *and%then all
*the^2@ s into place@
Computer Software Languages *and%Graphics Design 95
0 0 0 1 0 1 2
0 0 0 1 1 0
The number |of| bits that change when *the^increment produces !a#
number n [is] {at] most 1+floor(lg n)@(That@ s just *the^number |of| bits
*in^t*he^binary representation |of| n@ ) Thus**in=!a#sequence |of| n increments*
worst#case cost per increment [is] bounded {by] n(1+floor(lg n)) = O(n
log n)@
But* what [is] our *amortized* cost per increment#
A nsw er* 2@
Proof 1 (aggregate method)*how often do we flip A[0]#
A nsw er* every time@how often do w e flip A[1]#
A nsw er* every other time@How often do w e flip A[2]#
A nsw er* every 4th time@Etc@So* total cost spent on flipping A[0]
*is]n* total cost |of| A[1] [is] floor(n/2)* total cost on A[2] [is] floor(n/4)*
etc@So**the^total cost is* total cost = n + floor(n/2) + floor(n/4) +@ @
@
total cost ^ n + n /2 + n /4 + n/8 +@ @@^ 2n
So *the^ total cost [is] 2n* which means *the^ amortized cost |of| *an&
increment [is] 2@
Proof 2 (banker@ s method)*Let@ s us !a#kind |of| accounting trick@On
every bit that [is]!a#1*let@ s keep !a#dollar on that bit@So {for} example*if *the^
current count [is] 6*w e@ d have*
$ $
a r r a y * 0 @@@@ 0 1 1 0
We@ ll use *the^convention that whenever we toggle !a#bit*w e must
pay !a#dollar {to] do that@
Let@ s say w e allocate $2 {to] do *an^increment@Let@ s see how much
^it*costs {to] do *the^ increment@*in=general*!a#bunch |of| low order bits
change {from] 1 {to] 0**and%then one bit changes {from] !a# 0 {to]!a#1**and%*the^
process terminates@{for}each |of| *the^bits that changes {from] 1 {to] 0*we
have !a#dollar sitting on *the^bit {to] pay {for} toggling that bit@{for}*the^bit
that changes {from] !a#0 {to]!a#1*w e have {to] pay !a#dollar {to] toggle *the^bit*
then put !a#dollar on that bit (for future use)@Thus* having allocated
$2 {for} *the^ increment always guarantees that we {will] have enough
money {to]pay {for}*the^work*no matter how costly *the^increment actually
is@ This completes proof 2 that *the^amortized cost |of| *the^increment [is]2@
Example 2*Implementing !a#FIFO queue with two stacks Say you
have !a#stack data type**and%you need {to] implement !a#FIFO queue@
*the^ stack has *the^usual POP *and%PUSH operations**and%*the^cost |of|
each operation [is] 1@
98 Computer Software Languages *and%Graphics Design
keeping count |of| *the^number |of| elements |of| *the^array that {are] *in=use@
When w e {are] about {to] overflow *the^available space (k=L)*we allocate
*an&array twice as large*move *the^data over {to] *the^new array*free *the^
old array**and%double L@This operation [is] called $doubling$@{it] *will^
be convenient {to] Analyse {it]as thought {it]was !a#separate operation on
*the^data strucure* that occurs only when k=L@
If *the^stack [is] full**and%has size L**and%w e apply *the^ doubling
operation**the^cost |of| *the^operation [is] L*because we have {to] move L
items into *the^new array@ (The cost |of| allocating *and%freeing *the^arrays
*is]O(L)@ )
Starting {from] *an^empty stack* doing any sequence n pushes and+
pops* how much does this cost#
First analysis* Total cost {for} pushes *and%pops [is] n@
Total cost {for} doubling [is] {at] worst 1 + 2 + 4 + @ @
@n / 2 + n < 2 n So*
*the^total cost [is] 3n@Therefore w e can say that *the^amortized cost
|of| a*n&operation [is] 3@Second an alysis* Again* w e use *the^ financial
approach@We@ ll keep money lying around *the^data structure *in=*the^
following w ay@
$ $ $ $
$ $ $ $
+-------------------------- +
|x|x|x|x|x|x|x|x|x|x|x|x| | | | |
+-------------------------- +
A
|
m id p o i n t
We@ ll keep $2 on each element stored *in=*the^stack that is
Beyond *the^ Midpoint |of| *the^ current array@*in=*the^normal case
when we do !a#push (the array [is] not full)*w e need $1 {to] do *the^work*
{and} then {at] most $2 {to] put onto *the^ the new item w e just pushed@
Thus *the^cost [is] $3@(pop [is] even cheaper@ ) Now what happens if we
have {to] do !a#doubling operation#
Before doubling*
$ $ $ $ $ $ $ $
$ $ $ $ $ $ $ $
+-------------------------- +
|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|
-------------------------- +
A
100 | Computer Software Languages *and%Graphics Design
m id p o i n t
<------------ L------------ >
Af t er d o u b lin g *
+-------------------------- +-------------------------- +
|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x|x| | | | | | | | | | | | | |
| | |
+-------------------------- +-------------------------- +
A
|
m id p o i n t
You can see that *the^money that w e had on *the^items (L) was
sufficient {to] pay {for} all *the^ work |of| doubling *the^ array (L)@We
conclude that if w e allocate $3 {for} each operation* w e@ ll never run
out |of| money@
Thus *the^amortized cost |of| *an^operation [is] 3@*in=these examples*
*the^financial m odel was not really necessary {to] get *the^ desired
results@However* later w e@ ll see examples{where}this approach *is$
necessary@
end i f
i n s e r t x i n t o A rra y
Number = Number + 1
end i n s e r t
In !a#sequence |of| operations on !a#data structure often *the^worst
case can not occur *in=each operation@*the^worst case cost |of| inserting
*an&element *in=!a#dynamic array [is] N + 1@
N = size |of| *the^array before *the^insertion
But you can@ t get two worst cases *in=!a#row$
Amortized Analysis gives *the^ average performance |of| each
operation *in=*the^worst case
Three methods used *in=amortized analysis*
• Aggregate Method
• Accounting Method
• Potential Method
Example*Incrementing !a#k#bit binary counter
Let A[0@ @
k#1] be *an^array |of| bits representing !a#number X
A[0] # low order bit* so
K# 1
X = ^ A[J]2j
J=0
length[A] = k
Start with X = 0
I n c r e m e n t (A)
J = 0
w h i l e J < le n g th [ A ] *and% A[ J] == 1 do
!a#[ J] = 0
J = J + 1
end w h i l e
i f J < l e n g th [ A ] t h e n
A[ J] = 1
end i f
end I n c r e m e n t
Count bits flipped@
Worst Case@
Increment flips k bits *in=worst case@
Sequence |of| n Increment operations takes O(nk)@
AGGREGATE METHOD
T(n) = all work done *in=worst case *in=sequence |of| n operations
Amortized cost per operation [is] T(n)/n
Computer Software Languages *and%Graphics Design 103
i
J=0 2J
J=0
< n $ ^2 J#= 2n
POTENTIAL METHOD
Assign *an^amortized cost {to] each operation*If amortized cost *is$
more than *the^actual cost |of| *the^operation assign *the^difference *the^
entire data structure as potential energy ck= actual cost |of| operation
k
Ck = amortized cost |of| operation k
Dk = *the^state |of| *the^data structure after applying k@
th operation
^to*Dk*
O (Dk) = potential associated with Dk
c k + °( Dk ) # °(D k_ i)
£ C k = £ (Ck + O (D k) # O(Dk#i))
k=1 k=1
= £ ck + o(Dn) _ o (d o )
k=1
Computer Software Languages *and%Graphics Design 105
Policy
When table becomes full move {to] table twice *the^size When table
contracts {to] 1 /4 full*move {to] table 1 /2 size Let load = (Size |of| table)/
(number |of| items *in=*the^table) Amortized Cost*
Inserting when load ^ 1 / 2
3 units
Inserting when load < 1 /2
0 units
Deleting when load > 1 /2
0 units
Deleting when load ^ 1 / 2
2 units
X X X X
X X X X Y(2)
X X X X
X X X (1)
X X (1) (1)
X X
Approach
SOLUTION SPACES
Backtracking [is]!a#refinement |of| *the^brute force approach* which
systematically searches {for}!a#solution {to]!a#problem among all available
options@{it]does so {by] assuming that *the^solutions {are] represented *by^
vectors (vr @v v m) |of| values *and%{by] traversing**in=!a#depth first manner*
*the^domains |of| *the^ vectors until *the^ solutions {are] found@When
invoked**the^algorithm starts with *an^empty vector@{at] each stage *it^
extends *the^partial vector with !a#new value@Upon reaching !a#partial
vector (vv @*v t) which can@
@ t represent !a#partial solution**the^algorithm
backtracks {by] removing *the^trailing value {from] *the^ vector**and%then
proceeds {by] trying {to] extend *the^vector with alternative values@
ALGORITHM t r y ( v 1 @@@*v i)
IF ( v 1 @@@*v i ) [ is] !a# s o l u t i o n THEN RETURN
( v 1 @@@*vi )
FOR e a c h v DO
IF ( v 1 @@@*v i *v) [ i s ] a c c e p t a b l e v e c t o r THEN
s o l = t r y ( v 1 @@@*v i *v)
IF s o l $= () THEN RETURN s o l
END
Computer Software Languages *and%Graphics Design
END
RETURN ()
If Si [is] *the^domain |of| v #*then S1 x@
@
@x Sm[is] *the^solution space
|of| t*he^problem@*the^validity criteria used *in=checking {for} acceptable
vectors determines what portion |of| that space needs {to] be searched*
{and} so {it] also determines *the^ resources required {by] *the^ algorithm@
*the^ traversal |of| *the^ solution space can be represented {by] !a# depth#
first traversal |of| !a#tree@*the^tree itself [is] rarely entirely stored {by] *the^
algorithm *in=discourse~instead just !a#path toward !a#root [is] stored**to^
enable *the^backtracking@
LINKED LIST VS@DYNAMIC ARRAY LIST
Table@Amortized Costs Per Operation over n Operations
linked List Dynamic Array]
Insertion 1 call {to] new lg(n)/n call {to] new
set two links 3 data moves
Deletion two links 3 data moves
after find 1 delete lg(n)/n call {to] delete
TRAVELING SALESPERSON
The problem assumes !a#set |of| n cities**and%!a#salesperson which
needs {to] visit each city exactly once *and%return {to] *the^base city {at]*the^
end@*the^solution should provide !a#route |of| minimal length@
The route (a*b*d*c) [is] *the^shortest one {for}*the^following one*
and+i^
ts*length [is] 51@
108 Computer Software Languages *and%Graphics Design
@
b Jo @
b
The algorithm requires O(n log n) time {for} sorting *the^points* and+
O(n) time {to] select *an^appropriate subset@
GENERATING PERMUTATIONS
A permutation can be obtained {by] selecting *an^element *in=*the^
given set *and%recursively permuting *the^remaining elements@
Computer Software Languages *and%Graphics Design 111
p e r m u t e (i )
i f i == N o u t p u t A[N]
else
f o r j = i {to] N do
swap(A[i]* A[j])
permute(i+1)
swap(A[i]* A[j])
The redu ction *in= aircraft em ission s [is] also !a# regulated
requirement@ While small aircraft engines contribute *an^insignificant
am ount |of| p o llu tio n they {are] still *the^ targets |of| increased
environmental scrutiny@Regulatory requirements {are] targeted *at^
Nitrous Oxides (NOx)*Carbon Monoxide (CO) *and%visible particulate
emissions@CFD analysis techniques specific {to] combustion processes
^will*be *the^major tool used {to] lower aeropropulsion emissions@
5
D e v e l o p m e n t |o f| C o m p u t e r
{and} S o f t w a r e E n g i n e e r in g
SOFTWARE CHARACTERISTICS
SOFTWARE REQUIREMENT
• Microsoft Windows 98 SE* Me* NT4 (sp5+)* 2000 or XP*
• Word processing software (optional)*
• Spell checker (optional)*
• Spreadsheet (optional)* Microsoft Excel [is] necessary {to] generate
analysis reports
• Web browser (optional)* Internet Explorer 5 or Netscape 6 or
above*
• Adobe Acrobat (optional)@
HARDWARE REQUIREMENT
• PC compatible computer (Pentium II or compatible)*
• CD#ROM Drive*
• SVGA or XGA (1024 x 768) graphic screen *and%card*
• Floppy drive (optional*{for} Ethnos input transfer)*
• Printer port (parallel port RS232)@
MINIMUM ADVISED CONFIGURATION
Software Processor RAM Disk space System (3)
memory (1)
Tropes basic 200 Mhz 64 (128) Mb 16 Mb Win 98*
2000*XP
Tropes 200 Mhz 128 (256) Mb 50 Mb Win 98*
Zoom (2) 2000* XP
Ethnos 200 Mhz 128 Mb 50 Mb Win 98*
2000* XP
Acetic Index 400 Mhz 128 (256) Mb 2 Gb Win NT4
(SP6)* 2000*
XP*dedicated
Hardware appliance
• Under Windows 2000 *and%XP {it] [is] advised {to] install !a#minimum
|of| 256 Mb |of| RAM memory so that system works with optimal
performances@
• 512 Mb |of| memory RAM *and%2 Go |of| disk space |of| swapfile
advised {to] make decision#making analysis (on consequent
documentary bases) with Tropes Zoom@
• For Tropes* Zoom *and%Index**the^conversion |of| PDF files works
only under Windows 2000 or XP@
Computer Software Languages *and%Graphics Design 127
MAXIMUM VOLUMETRY
SOFTWARE MEASUREMENT
{and} METRICS
The m easurem ent in form ation m od el [is] !a# structure
linking information needs {to] *the^relevant entities *and%attri#butes |of|
concern@Entities include processes*products*projects**and%resources@
*the^ m easurem ent in form ation m od el describes how *the^
relevant attributes {are] quantified *and%converted {to] indicators that
provide !a#basis {for} decision#making@
The selection or definition |of| appropriate measures {to] address
*an&information need begins with !a#measurable concept**an^idea |of|
which measurable attributes {are] related {to] *an^information need and+
how they {are] related@*the^measurement planner defines measurement
constructs that link these attributes {to] !a#specifiedinformation need@
Each construct may involve several types or levels |of| measures@
This measurement information model (see Figure) identifies *the^
basic terms *and%concepts with which *the^measurement analyst must
d e a l@*the^ m easurem ent m od elh elp s {to] determ ine w hat *the^
measurement planner needs {to] specify during measurement planning*
performance**and%evaluation@
ENTITY
An entity [is] *an^object (for example*!a#process* product* project*
or resource) that [is] {to] be characterized {by] measuring {its] attributes@
Typical software engineering objects can be classified as products
(e@ g@* design document* source code**and%test case)* processes (e@ g@*
design process* testing process* requirements analysis process)*
projects**and%resources (e@ g @**the^programmers *and%*the^testers)@
*an&entity may have one or more properties that {are] |of| interest {to]meet
*the^information needs@*in=practice**an^entity can be classified into
more than one |of| *the^above categories@
MEASURABLE ATTRIBUTE
An attribute [is] !a#property or characteristic |of| *an^entity that can
be distinguished quantitatively or qualitatively {by] human or
automated means@*an^entity may have many attributes* only some
|of| which may be |of| interest {for}measurement@*the^first step *in=defining
!a#specific instantiation |of| *the^measurement information model [is]*to^
select *the^ attributes that {are] m ost relevant {to] *the^ measurement
130 Computer Software Languages *and%Graphics Design
user@
s information needs@!a#given attribute may be incorporated *in^
multiple measurement constructs supporting different information
needs@
BASE MEASURE
A base measure [is] *an^attribute *and%*the^method {for} quantifying
it@!a#base measure [is] functionally independent |of| other measures@
!a#base measure captures information about !a#single attribute@Data
collection involves assigning values {to] base measures@ Specifying *the^
expected range an d/ or type |of| values |of| !a# base measure helps *to^
verify *the^quality |of| *the^data collected@
Measurement Method
A measurement method [is] !a# logical sequence |of| operations*
described generically* used *in=quantifying *an^attribute with respect
^to*!a#specified scale@
The operations m ay in v o lv e activities such as cou n tin g
occurrences or observing *the^passage |of| time@*the^same measurement
method may be applied {to] multiple attributes@
However*each unique combination |of| *an^attribute *and%!a#method
produces !a#different base measure@Some measure#ment methods may
be im p lem en ted * i n = m u ltip le w a y s @ !a# m easurem ent
procedure describes *the^specific implemen#tation |of| !a#measurement
method within !a#given organizatio#nal context@
Type |of| Measurement Method
The type |of| measurement method depends on *the^nature |of| *the^
operations used {to] quantify *an^attribute@Two types |of| method may
be distinguished*
1@ Subjective*Quantification involving human judgment
2@ Objective* Quantification based on numerical rules such as
counting@These rules may be implemented via human or
automated means@
Scale
A scale [is] *an^ordered set |of| values* continuous or discrete* or !a#
set |of| categories {to] which *the^attribute [is] mapped@*the^measurement
method maps *the^magnitude |of| *the^measured attribute {to]!a#value on
!a#scale@!a#unit |of| measurement often [is] associated with !a#scale@
Computer Software Languages *and%Graphics Design 131
Measurement Function
A measurement function [is]*an^algorithm or calculation performed
^to*combine two or more base m easures@*the^ scale *and%unit
|of| t*he^derived measure depend on *the^ scales *and%units |of| *the^ base
m easures {from] w hich {it] [is] com posed as w ell as how they *are^
combined {by] *the^function@
INDICATOR
A n indicator [ i s ] * a n ^ estim ate or evalu ation | o f |
sp ecified attributes d erived {from] !a# m od el w ith respect *to^
defined information needs@Indicators {are] *the^basis {for} analysis and+
d ecisio n #m ak in g@These {are] w hat sh ou ld be presented *to^
measurement users@
Measurement [is] always based on imperfect information* so
quantifying *the^uncertainty*accuracy* or importance |of| indicators
*is$a*n&essential component |of| presenting *the^ actual indicator value@
Therefore**an^interpretation |of| indicat#ors [is] performed {to] provide
*the^desired information product@
Measurement Model
A measurement model [is]*an^algorithm or calculation combining
one or more base and/ or derived measures with associated decision
criteria@{it][is]based on *an^understanding of* or assumptions about*
*the^expected relationship between *the^component measures and/ or
their behaviour over time@Models produce estimates or evaluations
relevant {to] defined information needs@*the^scale *and%measurement
method affect *the^choice |of| analysis techniques or models used *to^
produceindicators@
Decision Criteria
Decision criteria {are] numerical thresholds or targets used *to^
determine *the^need {for} action or further investigation* or {to] describe
*the^level |of| confidence *in=!a#given result@Decision criteria help *to^
interpret *the^ results |of| m easurem ent@Decision criteria may be
calculated or based on !a# conceptual understanding |of| expected
behaviour@
Decision criteria may be derived {from] historical data*plans* and+
heuristics* or computed as statistical control limits or statistical
confidence limits@
Computer Software Languages *and%Graphics Design
MEASURABLE CONCEPT
A m easurable con cept [is] *an ^ abstract relationsh ip
between attributes |of| entities *and%information needs@{for} example*
*an&Information need may be *the^ need {to] compare *the^ software
development productivity |of| !a# project group against !a#target rate@
*the^ Measurable Concept *in=this case [is] $software developm ent
productivity rate$@{to] evaluate *the^concept might require measuring
*the^size |of| *the^software products *and%*the^amount |of| resource applied
^to*create *the^ products (d ep en d in g on *the^ chosen m odel |of|
productivity)@Additional examples |of| Measurable Concepts include
quality*risk*performance*capability*maturity**and%customer value@
SOFTWARE METRICS
Effective management |of| any process requires quantification*
measurement**and%modeling@ Software metrics provide !a#quantitative
basis {for} *the^development *and%validation |of| models |of| *the^software
development process@Metrics can be used {to] improve software
productivity *and%quality@ This module introduces *the^most commonly
used software metrics *and%reviews their use *in=constructing models
|of| *the^software development process@
134 Computer Software Languages *and%Graphics Design
SOFTWARE COMPONENTS
A com puter system consists |of| three major com pon en ts*
hardw are* softw are* *and% hum ans (users* program m ers*
administrators*operators*etc@ )@Software can be further divided into
seven layers@Firmware can be categorized as part |of| hardware* part
|of| software* or both@
The seven layers |of| software {are] (top {to] bottom)* Programs~
System Utilities~ Command Shell~ System Services~ User Interface~
Logical Level~*and%Hardware Level@!a#Graphics Engine stradles *the^
bottom three layers@
Strictly speaking* only *the^ bottom two levels {are] *the^ operating
system* although even technical persons {will] often refer {to] any level
other than programs as part |of| *the^operating system (and Microsoft
tried {to] convince *the^ Justice Department that their web browser
application [is] actually !a#part |of| their operating system)@Because this
technical analysis concentrates on servers* Internet Facilities *are^
specifically separated out {from] *the^ layers@
Command Shell
System Services
li@
i Operating System
EXAMPLES
The following {are] examples |of| each category*
• Programs* Examples |of| Programs include your word processor*
spreadsheet* graphics programs* music software* games* etc@
• System Utilities* Examples |of| System Utilities include file copy*
hard drive repair**and%similar items@On *the^Macintosh* all *the^
Desk Accessories (calculator* key caps* etc@ ) *and%all |of| *the^Control
Panels {are] examples |of| System Utilities@
• Command Shell**the^Command Shell on *the^Macintosh [is] *the^Finder
{and} was *the^first commercially available graphic command shell@
On W indow s* *the^ Command Shell [is] !a# poorly integrated
comination |of| *the^File Manager *and%*the^Programme Manager@The
136 Computer Software Languages *and%Graphics Design
Curtain Raiser
Like any other set |of| engineering products* software products
^are*also oriented towards *the^customer@{it][is]either market driven or
^it*drives *the^market@Customer Satisfaction was *the^buzzword |of| *the^
80@ s@Customer Delight [is] today@s buzzword *and%Customer Ecstasy
*is$t*he^buzzword |of| *the^new millennium@
Computer Software Languages *and%Graphics Design 139
But each |of| these phases [is] not done very formally or thoroughly@
^by*using this prototype* *the^client can get *an^ $actual feel$ |of| *the^
system*since *the^interactions with prototype can enable *the^client *to^
better understand *the^requirements |of| *the^desired system@
Prototyping [is] *an^ attractive idea {for} complicated *and%large
systems {for} which there [is] no manual process or existing system *to^
help determining *the^requirements@
In such situations letting *the^ client $plan$ with *the^ prototype
provides invaluable *and%intangible inputs which helps *in=determining
*the^requirements {for} *the^ system@{it] [is] also *an^ effective method *to^
demonstrate *the^feasibility |of| !a#certain approach@
This might be needed {for} novel systems{where}it [is]not clear those
constraints can be met or that algorithms can be developed *to^
implement *the^requirements@*the^process model |of| *the^prototyping
approach [is] shown *in=*the^figure below@
Start
Requirement Quick Building
Gathering Design Prototype
i
r
Stop Refining Customer
Engineer
Product Prototype Evaluation
Prototyping Model
Fig@Prototyping Model@
The basic reason {for} little common use |of| prototyping [is] *the^
cost involved *in=this built#it#twice approach@However*some argue
that prototyping need not be very costly *and%can actually reduce
*the^ overall developm ent co st@*the^ prototype {are] usually not
com plete system s *and%many |of| *the^ details {are] not built *in=*the^
p r o to ty p e @ *the^ g oal [is] {to] p r o v id e !a# sy ste m w ith o v era ll
functionality@
In addition**the^cost |of| testing *and%writing detailed documents
^are*reduced@These factors helps {to] reduce *the^cost |of| developing *the^
prototype@On *the^ other hand* *the^ experience |of| developing *the^
prototype {will] very useful {for} developers when developing *the^final
system@
This experience helps {to] reduce *the^cost |of| development |of| *the^
final system *and%results *in=!a#more reliable *and%better designed
system @
144 Computer Software Languages *and%Graphics Design
There [is] also !a#great temptation {for} most developers {to] create !a#
prototype *and%stick {to] {it] even though {it] has flaws@Since prototypes
^are*not yet complete software programs*there [is] always !a#possibility
|of| !a#designer flaw@When flawed software [is] implemented*{it] could
mean losses |of| important resources@
Lastly*integration could be very difficult {for}!a#prototype model@
This often happens when other programs {are] already stable@*the^
prototype software [is] released *and%integrated {to] *the^company@ s suite
|of| software@But if there@ s something wrong *the^prototype* changes
^are*required not only with *the^ software@It@ s also possible that *the^
stable software should be changed *in=order {for} them {to] be integrated
properly@
Prototype Models Types
There {are] four typ es |o f | P rototype M odels based on
their development planning**the^Patch#Up Prototype*Nonoperational
Prototype* First#of#a#Series Prototype *and%Selected Features
Prototype@
Patch Up Prototype
This type |of| Prototype Model encourages cooperation |of| different
developers@Each developer {will] work on !a# specific part |of| *the^
programme@
After everyone has done their part* *the^ programme {will] be
integrated with each other resulting *in=!a#whole new programme@ Since
everyone [is] working on !a#different field*Patch Up Prototype [is]!a#fast
development model@
If each developer [is] highly skilled*there [is] no need {to] overlap
*in^a#!specific function |of| work@
This type |of| software development model only needs !a# strong
project m anager w h o can m onitor *the^ d evelop m en t |of| *the^
programme@*the^manager {will] control *the^work flow *and%ensure there
*is]no overlapping |of| functions among different developers@
Non#Operational Prototype
A non#operational prototype model [is] used when only !a#certain
part |of| *the^programme should be updated@Although it@ s not !a#fully
operational programme**the^specific part |of| *the^programme {will] work
or could be tested as planned@*the^main software or prototype [is] not
146 Computer Software Languages *and%Graphics Design
affected {at] all as *the^ dum m y programme [is] applied w ith *the^
application@ Each developer who [is] assigned with different stages *will^
have {to] work with *the^dummy prototype@This prototype [is] usually
im plem ented w hen certain problems *in=!a# specific part |of| *the^
programme arises@Since *the^software could be *in=!a#prototype mode
^for*!a#very long time* changing *and%maintenance |of| specific parts *is$
very important@ Slowly {it]has become !a#smart way |of| creating software
^by*introducing small functions |of| *the^software@
First |of| !a#Series Prototype
Known as !a#beta version* this Prototype Model could be very
efficient if properly launched@*in=all beta versions* *the^software *is$
launched *and%even introduced {to] *the^ public {for} testing@It@ s fully
functional software but *the^aim |of| being *in=beta version [is] {to] as *for^
feedbacks* suggestions or even practicing *the^firewall *and%security
|of| *the^ software@{it]could be very successful if *the^First |of| !a# Series
Prototype [is] properly done@But if *the^programme [is] half heartedly
done* only aiming {for} additional concept* {it] {will] be susceptible *to^
different hacks* ultimately backfiring *and%destroying *the^prototype@
Selected Features Prototype
This [is] another form |of| releasing software *in= beta version@
However*instead |of| giving *the^public *the^full version |of| *the^software
*in&beta* only selected features or limited access {to] some important
tools *in=*the^programme [is] introduced@
Selected Features Prototype [is] applied {to] software that {are] part
|of| !a#bigger suite |of| programs@Those released {are] independent |of| *the^
suite but *the^full version should integrate with other software@This
*is]usually done {to] test *the^independent feature |of| *the^software@
RAPID APPLICATION DEVELOPMENT
(RAD) MODEL
The RAD modelis !a# linear sequential software development
process that emphasizes *an^extremely short development cycle@
The RAD m odel [is] !a# $high speed$ adaptation |of| *the^ linear
sequential model *in=which rapid development [is] achieved {by] using
!a#com ponent#based construction approach@Used primarily *for^
information systems applications**the^RAD approach encompasses
*the^following phases*
Computer Software Languages *and%Graphics Design 147
Business Modeling
The information flow among business functions [is] modeled *in=!a#
way that answers *the^following questions*
• What information drives *the^business process#
• What information [is] generated#
• Who generates it#
• Where does *the^information go#
• Who processes it#
Data Modeling
The information flow defined as part |of| *the^business modeling
phase [is] refined into !a#set |of| data objects that {are] needed {to] support
*the^business@*the^characteristic (called attributes) |of| each object *is$
identified *and%*the^relationships between these objects {are] defined@
Process Modeling
The data objects defined *in= *the^ data#m odeling phase *are^
transformed {to] achieve *the^information flow necessary {to] implement
!a#business function@Processing *the^ descriptions {are] created *for^
adding* modifying* deleting* or retrieving !a#data object@
Application Generation
The RAD model assumes *the^use |of| *the^RAD tools like VB*VC++*
Delphi etc@ @
@rather than creating software using conventional third
generation programming languages@*the^RAD model works {to] reuse
existing programme components (when possible) or create reusable
components (when necessary)@*in=all cases*automated tools {are] used
^to*facilitate construction |of| *the^software@
Testing *and%Turnover
Since *the^RAD process emphasizes reuse*many |of| *the^programme
components have already been tested@ This minimizes *the^testing and+
development time@
COMPONENT ASSEMBLY MODEL
Object technologies provide *the^ technical framework {for} !a#
component#based process model {for} software engineering@*the^object
oriented paradigm emphasizes *the^creation |of| classes that encapsulate
both data *and%*the^algorithm that {are] used {to] manipulate *the^data@If
148 Computer Software Languages *and%Graphics Design
needs that {are] combined together {for} study@!a#lot |of| assumptions *are^
made during market study@Assumptions {are] *the^ very important
factors *in=*the^development or start |of| !a#product@
s development@*the^
assumptions which {are] not realistic can cause !a#nosedive *in=*the^entire
venture@Although assumptions {are] conceptual* there should be !a#
move {to] develop tangible assumptions {to] move towards !a#successful
product@ Once *the^Market study [is] done**the^customer@ s need [is] given
^to**the^Research *and%Development Department {to] develop !a# cost#
effective system that could potentially solve customer@ s needs better
than *the^competitors@Once *the^system [is] developed *and%tested *in=!a#
hypothetical environment**the^development team takes control |of| it@
*the^ development team adopts one |of| *the^ software development
models {to] develop *the^proposed system *and%gives {it]{to]*the^customers@
Advantages
Simple *and%easy {to] use@
Easy {to] manage due {to] *the^rigidity |of| *the^model # each phase has
specific deliverables *and%!a#review process@
Phases {are] processed *and%completed one {at]!a#time@
Works well {for} smaller projects{where}requirements {are] very well
understood@
Disadvantages
Adjusting scope during *the^life cycle can kill !a#project
No working software [is] produced until late during *the^life cycle@
High amounts |of| risk *and%uncertainty@
Poor model {for} complex *and%object#oriented projects@
Poor model {for} long *and%ongoing projects@
Poor model{where}requirements {are] {at] !a#moderate {to] high risk |of|
changing@
150 Computer Software Languages *and%Graphics Design
SPIRAL MODEL
The spiral model [is] !a#variant |of| $dialectical spiral$*and%as such
provides useful insights into *the^ life cycle |of| *the^ system @Can be
considered as !a#generalization |of| *the^proto#typing model@That why
^it*[is]usually implemented as !a#variant |of| prototyping model with *the^
first iteration being !a#prototype@*the^spiral model [is] similar {to] *the^
incremental model*with more emphases placed on risk analysis@
The spira l m odel has fo u r p h a ses * Planning* Risk A n alysis*
Engineering *and%Evaluation@!a#software project repeatedly passes
through these phases *in=iterations (called Spirals *in=this model)@*the^
baseline spiral* starting *in=*the^planning phase* requirements *are^
gathered *and%risk [is] assessed@
Each subsequent spirals builds on *the^baseline spiral@ Requirements
^are*gathered during *the^planning phase@*in=*the^risk analysis phase*!a#
process [is] undertaken {to] identify risk *and%alternate solutions@
A prototype [is] produced {at] *the^end |of| *the^ risk analysis phase@
Software [is] produced *in=*the^engineering phase* along with testing
*at^t*he^end |of| *the^phase@
The evaluation phase allows *the^customer {to] evaluate *the^output
|of| *the^project {to] date before *the^project continues {to] *the^next spiral@
*in^t*he^spiral model**the^angular component represents progress**and%*the^
radius |of| *the^spiral represents cost@
Evaluation Engineering
Advantages
• High amount |of| risk analysis
• Good {for} large *and%mission#critical projects@
• Software [is] produced early *in=*the^software life cycle@
Disadvantages
• Can be !a#costly model {to] use@
• Risk analysis requires highly specific expertise@
• Project@s success [is] highly dependent on *the^risk analysis phase@
• Doesn@ t work well {for} smaller projects@
EVOLUTIONARY PROTOTYPING MODEL
This [is] kind |of| m ix |of| W aterfall m odel *and%prototyp in g@
Presuppose gradual refinement |of| *the^ prototype until !a# usable
product em erge@Might be suitable *in= projects{where}*the^ main
problem [is] user interface requirements* but internal architecture *is$
relatively w ell established *and%static@Can help {to] cope w ith
organizational sclerosis@One variant involves so called $binary$
software implementation model using !a# scripting language plus
statically typed language@
In this case system first [is] coded *in=!a#scripting language and+
then gradually critical com ponents {are] rewritten *in= *the^ lower
language@
OSS DEVELOPMENT MODEL
It [is] *the^ latest variant |of| evolutionary prototype m odel@
*the^waterfall
$ model$ was probably *the^first published model *and%as !a#
specific model {for} military {it]was not as naive as some proponents |of|
other models suggest@
The model was developed {to] help cope w ith *the^ increasing
complexity |of| aerospace products@*the^waterfall model followed !a#
documentation driven paradigm@
Prototyping model was probably *the^first realistic |of| early models
because many aspects |of| *the^ syst4m {are] unclear until !a#working
prototype [is] developed@
A better model* *the^$spiral model$ was suggested {by] Boehm *in^
1985@*the^spiral model [is]!a#variant |of| $dialectical spiral$*and%as such
provides useful insights into *the^life cycle |of| *the^system@
Computer Software Languages *and%Graphics Design 153
Advantages
• Simple *and%easy {to] use@
• Each phase has specific deliverables@
• Higher chance |of| success over *the^ waterfall model due {to] *the^
development |of| test plans early on during *the^life cycle@
• Works well {for} small projects{where}requirements {are] easily
understood@
Disadvantages
• Very rigid*like *the^waterfall model@
• Little flexibility *and%adjusting scope [is] difficult *and%expensive@
• Software [is] developed during *the^ implementation phase* so no
early prototypes |of| *the^software {are] produced@
• Model doesn@ t provide !a# clear path {for} problems found during
testing phases@
INCREMENTAL MODEL
The incremental model [is] *an^intuitive approach {to] *the^waterfall
model@ Multiple development cycles take place here*making *the^life cycle
!a#$multi#waterfall$ cycle@Cycles {are] divided up into smaller*more easily
managed iterations@Each iteration passes through *the^requirements*
design* implementation *and%testing phases@!a#working version |of|
software [is] produced during *the^first iteration* so you have working
software early on during *the^software life cycle@Subsequent iterations
build on *the^initial software produced during *the^first iteration@
Computer Software Languages *and%Graphics Design
Advantages
• Generates working software quickly *and%early during *the^software
life cycle@
• More flexible*Less costly {to] change scope *and%requirements@
• Easier {to] test *and%debug during !a#smaller iteration@
• Easier {to] manage risk because risky pieces {are] identified and+
handled during {its] iteration@
• Each iteration [is] *an^easily managed milestone@
Disadvantages
• Each phase |of| *an^iteration [is] rigid *and%do not overlap each other@
• Problems may arise pertaining {to] system architecture because not
all requirements {are] gathered up front {for} *the^entire software life
cycle@
6
C o m p u t e r G r a p h i c s S o f tw a r e
THE ACM@
GRAPHICS MODEL
When you create !a#picture using *the^acm@ graphics package*you
do so {by] arranging graphical objects {at] various positions on !a#
background called !a#canvas@*the^underlying model [is] similar {to] that
|of| !a#collage *in=which *an^artist creates !a#composition {by] taking various
objects *and%assembling them on !a#background canvas@
Computer Software Languages *and%Graphics Design
r e m o v e (o v a l ) ~
the parts |of| *the^ underlying rectangle that had previously been
obscured would reappear@
In this tutorial* *the^ order *in=which objects {are] layered on *the^
canvas {will] be called *the^ stacking order@(In more mathematical
descriptions* this ordering [is] often called z#ordering* because *the^z#
axis [is] *the^one that projects outward {from] *the^ screen@ ) Whenever !a#
new object [is] added {to] !a#canvas*{it] appears {at] *the^front |of| *the^stack@
Graphical objects {are] always drawn {from] back {to] front so that *the^
frontmost objects overwrite those that {are] further back@
/*
* F i l e * F e l t B o a r d @ja v a
*
* Thi s programme o f f e r s !a# s i m p l e example |of| *the^ acm@ graphics
package
* t h a t draws ! a # r e d r e c t a n g l e *and% !a# g r e e n o v a l @ *the^
d i m e n s i o n s of
* t h e r e c t a n g l e { a r e ] c h o s e n so t h a t { i t s ] s i d e s {are] *in^
proportion to
* t h e $g o l d e n r a t i o $ t h o u g h t {by] *the^ Greeks { t o ] r e p r e s e n t
*the^ most
* a e s t h e t i c a l l y p le a sin g geometry@
*/
i m p o r t acm@ p r og r a m m e @* ~
i m p o r t acm@ g r a p h i c s @* ~
i m p o r t j a v a @a w t @* ~
p u b l i c c l a s s F e l tB o a r d ex te n d s GraphicsProgram {
/ ** Runs *t he^ programme * /
p u b l i c v o i d r u n () {
GRect r e c t = new G R e ct (1 00 * 50* 100* 100 / P H I ) ~
r e c t @s e t F i l l e d ( t r u e ) ~
r e c t @s e t C o l o r ( C o l o r @ RED) ~
add(rect)~
GOval o v a l = new G 0 v a l ( 1 5 0 * 50 + 50 / PHI* 100* 100 /
PHI)~
o v a l @s e t F i l l e d ( t r u e ) ~
o v a l @s e t C o l o r ( C o l o r @ GREEN) ~
add(oval)~
}
/ ** C o n s t a n t r e p r e s e n t i n g *the^ g o l d e n r a t i o */
p u b l i c s t a t i c f i n a l d o u b l e PHI = 1 @618~
}
Program m e*Code {for} *the^ FeltBoard@
Computer Software Languages *and%Graphics Design
coordinates {to] integers can introduce rounding errors that distort *the^
geometry |of| *the^displayed figures@
Judging {from] *the^ experience |of| *the^ instructors who tested *the^
acm@ graphics package while {it]was *in=development**the^change *from^
ints {to] doubles causes no confusion but instead represents *an&
important conceptual sim plification@*the^ only aspect |of| Java@ s
coordinate system that students find problematic [is] *the^fact that *the^
origin [is]*in=!a#different place {from] what they know {from] traditional
Cartesian geometry@Fortunately*{it] doesn@ t take too long {to] become
familiar with *the^Java model@
The GPoint* GDimension**and%GRectangle Classes
Although {it] [is] usually possible {to] specify individual values *for^
coordinate values*{it] [is] often convenient {to] encapsulate *an^x *and%!a#y
coordinate as !a# point*!a#w idth *and%!a#height value as !a# composite
indication |of| *the^ dimensions |of| *an^ object* or all four values as *the^
bounding rectangle {for}!a#figure@Because *the^coordinates {are] stored
as doubles *in=*the^acm@ graphics package* using Java@ s integer#based
Point* Dim ension**and%Rectangle classes w ould entail !a# loss |of|
precision@{to] avoid this problem *the^acm@ graphics package exports
*the^classes GPoint* GDimension**and%GRectangle* which have *the^
same semantics as their standard counterparts except {for}*the^fact that
their coordinates {are] doubles@
As *an^example**the^declaration
GDimension g o l d e n S i z e = new GDimension(100* 100 / P H I ) ~
introduces *the^variable goldenSize *and%initializes {it]{to]!a#GDimension
object whose internal width *and%height fields {are] *the^dimensions
|of| t*he^golden rectangle illustrated *in=*the^earlier example@*the^advantage
|of| encapsulating these values into objects [is] that they can then be
passed {from] one method {to] another using !a#single variable@
The GMath Class
Computing *the^coordinates |of| !a#graphical design can sometimes
require *the^use |of| simple trigonometric functions@Although functions
like sin *and%cos {are] defined *in=Java@
s standard Math class* students
find them con fu sin g *in= graphical ap p lication s becau se |of|
inconsistencies *in=*the^way angles {are] represented@*in=Java@
s graphics
libraries* angles {are] measured *in=degrees~*in=*the^Math class* angles
must be given *in=radians@{to]minimize *the^confusion associated with
162 Computer Software Languages *and%Graphics Design
d o u b l e g e tW i d th ( )
Returns *the^width |of| *the^object@
double getH eight()
Returns *the^height |of| *the^object@
GPoint g e t L o c a t i o n ( )
Returns *the^location |of| this object as !a#GPoint@
GDimension g e t S i z e ( )
Returns *the^size |of| this object as !a#GDimension@
GRectangle getBounds()
Returns *the^bounding box |of| this object@
Methods {to] Change *the^Object’s Location
v o i d s e t L o c a t i o n ( d o u b l e x * d o u b l e y) o r s e t L o c a t i o n ( G P o i n t
pt )
Sets *the^location |of| this object {to] *the^specified point@
v o i d m o v e ( d o u b l e d x * d o u b l e dy)
Moves *the^object using *the^displacements dx *and%dy@
void movePolar(double r * double th e ta )
Moves *the^object r units *in=direction theta*measured *in=degrees@
Methods {to] Set *and%Retrieve *the^Object’s Colour
v o i d s e t C o l o r ( C o l o u r c)
Sets *the^colour |of| *the^object@
Colour getC olor()
Returns *the^object colour@If this value [is] null**the^package uses
*the^colour |of| *the^container@
Methods {to] Change *the^Stacking Order
v o id sendToFront() o r s e n d T o B a c k ()
Moves this object {to]*the^front (or back) |of| *the^stacking order@
v o i d s e nd For w a rd () o r s e n d B a c k w a rd ()
Moves this object forward (or backward) one position *in=*the^
stacking order@
Method {to] Determine whether *an^Object Contains !a#Particular Point
boolean contains(double x * double y) or c o n t a i n s ( G P o i n t
pt )
Checks {to] see whether !a#point [is] inside *the^object@
Determining *the^Location *and%Size |of| !a#GObject
The first several methods make {it] possible {to] determine *the^
location *and%size |of| any GObject@*the^getX* getY* getWidth* and
Computer Software Languages *and%Graphics Design 167
Color@ LIGHT_GRAY
Color@ WHITE
Color@ RED
Color@ YELLOW
Color@ GREEN
Color@ CYAN
Color@ BLUE
Color@ MAGENTA
Color@ ORANGE
Color@ PINK
It [is] also possible {to] create additional colours using *the^
constructors *in=*the^Colour class@*in=either case*you need {to] include
*the^import line
import j a v a @a w t @* ~
at *the^beginning |of| your programme@
The setColor method sets *the^colour |of| *the^ graphical object
*to^t*he^specified value~*the^corresponding getColor method allows you
^to*determine what colour that object currently is@
This facility allows you {to] make !a# temporary change {to] *the^
colour |of| !a# graphical object using code that looks something like
this*
Colour oldColor = g o b j @ getC olor() ~
gob j @s e t C o l o r ( C o l o r @ RED) ~
@@ @ *and% t h e n { a t ] some l a t e r t i m e @ @ @
g o b j @s e t C o l o r ( o l d C o l o r ) ~
Controlling *the^Stacking Order
A set |of| methods that make {it] possible {to] control *the^stacking
order@*the^sendToFront *and%sendToBack methods move *the^object
^to**the^front or back |of| *the^stack*respectively@*the^sendForward and+
sendBackward methods move *the^ object one step forward or
backward *in=*the^stack so that {it]jumps ahead |of| or behind *the^adjacent
object *in=*the^stack@
Changing *the^stacking order also redraws *the^display {to] ensure
that underlying objects {are] correctly redrawn@
For example* if you add *the^statement~
o v a l @s e n d B a c k w a rd ( ) ~
to *the^end |of| *the^FeltBoard programme**the^picture on *the^display
would change as follows*
Computer Software Languages *and%Graphics Design 169
p u b l i c c l a s s Checkerboard ex te n d s GraphicsProgram {
/** Runs *t he^ programme */
public void ru n () {
do u b l e s q S i z e = (double) g e t H e i g h t ( ) / NROWS~
^for* ( i n t i = 0~ i < NROWS~ i ++) {
f o r ( i n t j = 0 ~ j < NCOLUMNS~ j++) {
double x = j * s q S i z e ~
double y = i * s q S i z e ~
GRect sq=new GRect(x* y * s q S i z e * s q S i z e ) ~
s q @s e t F i l l e d ( ( i + j) % 2 $= 0 ) ~
add(sq)~
}
}
/* P r i v a t e c o n s t a n t s */
p r i v a t e s t a t i c f i n a l i n t NROWS = 8 ~ / * Number | o f | rows */
p r i v a t e s t a t i c f i n a l i n t NCOLUMNS = 8 ~ / * Number | o f |
columns */
}
174 Computer Software Languages *and%Graphics Design
Computer Art
• Computer graphics methods {are] widely used *in=both fine {are] and+
commercial art applications@
• The artist uses !a#combination |of| 3D modelling packages* texture
mapping* drawing programmes *and%CAD software@
• Pen plotter with specially designed software can create $automatic
art$@
• $Mathematical Art$ can be produced using mathematical
functions* fractal procedures@
• These methods {are] also applied *in=commercial art@
• Photorealistic techniques {are] used {to] render images |of| !a#product@
• Animations {are] also used frequently *in=advertising**and%television
commercials {are] produced frame {by] frame@Film animations
require 24 frames {for} each second *in=*the^animation sequence@
• A common graphics method employed *in=many commercials *is$
morphing*{where}one object [is] transformed into another@
Entertainment
• CG methods {are] now commonly used *in=making motion pictures*
music videos *and%television shows@
• Many TV series regularly employ computer graphics method@
• Graphics objects can be combined with !a#live action@
Education *and%Training
• Computer#generated models |of| physical* financial *and%economic
systems {are] often used as educational aids@
• For some training applications* special systems {are] designed@
Eg@Training |of| ship captains* aircraft pilots etc@
• Some simulators have no video screens* but most simulators
provide graphics screen {for} visual operation@Some |of| them
provide only *the^control panel@
Visualization
• The numerical *and%scientific data {are] converted {to] !a#visual form
^for*analysis *and%{to] study *the^behaviour called visualization@
• Producing graphical representation {for} scientific data sets {are] calls
scientific visualization@
• And business visualization [is] used {to] represent *the^ data sets
related {to] commerce *and%industry@
• The visualization can be either 2D or 3D@
Computer Software Languages *and%Graphics Design 179
Image Processing
• Computer graphics [is] used {to] create !a#picture@
• Image processing applies techniques {to] modify or interpret
existing pictures@
• To apply image processing methods**the^image must be digitized
first@
• Medical applications also make extensive use |of| image processing
techniques {for} picture enhancements* simulations |of| operations*
etc@
Graphical User Interface
• Nowadays software packages provide graphics user interface
(GUI) {for} *the^user {to] work easily@
• A major component *in=GUI [is]!a#window@
• Multiple windows can be opened {at]!a#time@
• To activate any one |of| *the^ window**the^user needs just {to] check
on that window@
• Menus *and%icons {are] used {for} fast selection |of| processing
operations@
• Icons {are] used as shortcut {to] perform functions@*the^advantages
|of| icons {are] which takes less screen space@
• And some other interfaces like text box* buttons**and%list {are] also
used@