Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter Four Software Basics: The Ghost in the Machine.

Similar presentations


Presentation on theme: "Chapter Four Software Basics: The Ghost in the Machine."— Presentation transcript:

1

2 Chapter Four Software Basics: The Ghost in the Machine

3  1999 Addison Wesley Longman4.2 Chapter Outline Processing with Programs Application Software: Tools for Users System Software: The Hardware- Software Connection The User Interface: The Human- Machine Connection

4  1999 Addison Wesley Longman4.3 Processing with Programs Software programs: –Are invisible and complex –Must be clear –Must be free of errors –Are a set of instructions that tell a computer what to do

5  1999 Addison Wesley Longman4.4 A Fast, Stupid Machine Computers: –Have limited capabilities –Can only do basic mathematics and logical comparisons –Must be instructed with programs what to do

6  1999 Addison Wesley Longman4.5 The Language of Computers Programmers begin with an algorithm, which is: –A set of step-by-step instructions (written in a natural language, e.g., English) Algorithms are translated into the vocabulary of a programming language

7  1999 Addison Wesley Longman4.6 Flow Chart (I) process decision terminal joint flow line

8  1999 Addison Wesley Longman4.7 Flow Chart (II) predefined procedure input output I/O

9  1999 Addison Wesley Longman4.8 Control Structures sequential execution ( concatenation ) conditional execution ( alternation ) looping ( iteration )

10  1999 Addison Wesley Longman4.9 Top-Down Structure Design define the problem design the algorithm as procedures refine the procedures into pseudo code code the program

11  1999 Addison Wesley Longman4.10 Programming languages bridge the gap between the natural language of the human and the numeric codes (zeros and ones) understood by the computer Examples include: –COBOL, BASIC, and C++ Programming Languages

12  1999 Addison Wesley Longman4.11 Programming Languages low level languages –machine language –assembly language (symbolic language) high level languages –machine independent –problem oriented –familiar notations

13  1999 Addison Wesley Longman4.12 High Level Languages 1957FortranZ=X+Y 1960COBOLADD X TO Y GIVING Z 1965BASICZ=X+Y 1971Pascalz:=x+y; 1972Cz=x+y;

14 High Level Languages 1980 Ada 1985 C++ 1990 Java

15  1999 Addison Wesley Longman4.14 Sorting ( Ordering ) internal sort external sort

16  1999 Addison Wesley Longman4.15 Internal Sort straight –exchange ( bubble sort ) –insertion sort –selection sort advanced –shell sort –heap sort –quick sort

17  1999 Addison Wesley Longman4.16 Bubble Sort 44 55 12 42 94 18 06 67 06 44 55 12 42 94 18 67 06 12 44 55 18 42 94 67 06 12 18 44 55 42 67 94 06 12 18 42 44 55 67 94

18  1999 Addison Wesley Longman4.17 Bubble Sort 1000 REM bubblesort subroutine 1010 FOR M = 2 to N 1020 FOR I=N to M step -1 1030 IF A(I-1) <= A(I) THEN 1070 1040 TEMP = A(I-1) 1050 A(I-1) = A(I) 1060 A(I) = TEMP 1070 NEXT I 1080 NEXT M 1090 RETURN

19  1999 Addison Wesley Longman4.18 Insertion Sort 44 55 12 42 94 18 06 67 44 55 12 44 55 12 42 44 55 94 12 18 42 44 55 94 06 12 18 42 44 55 94 06 12 18 42 44 55 67 94

20  1999 Addison Wesley Longman4.19 Insertion Sort procedure straightinsertion var i,j: index; x:integer; begin for i := 2 to n do begin x := a[i]; a[0] := x; j := i-1; while x< a[j] do begin a[j+1] := a[j]; j := j-1 end; a[j+1] := x; end end;

21  1999 Addison Wesley Longman4.20 Selection Sort 44 55 12 42 94 18 06 67 06 55 12 42 94 18 44 67 06 12 55 42 94 18 44 67 06 12 18 42 94 55 44 67 06 12 18 42 44 55 94 67 06 12 18 42 44 55 67 94

22  1999 Addison Wesley Longman4.21 Selection Sort for (i=1;i<n; i++) { min = i; for( j= i+1; j<n; j++) if (a[j] < a[min]) min= j; temp= a[i]; a[i] = a[min]; a[min] = temp; };

23  1999 Addison Wesley Longman4.22 Shell sort 44 55 12 42 94 18 06 67 4 sort 44 18 06 42 94 55 12 67 2 sort 06 18 12 42 44 55 94 67 1 sort 06 12 18 42 44 55 67 94 each pass profits from previous pass diminishing increment yields better result

24  1999 Addison Wesley Longman4.23 Heap sort 44 55 12 42 | 94 18 06 67 44 55 12 | 42 94 18 06 67 44 55 | 06 42 94 18 12 67 44 | 42 06 55 94 18 12 67 | 06 42 12 55 94 18 44 67 12 42 18 55 94 67 44 | 06 18 42 44 55 94 67 | 12 06 42 55 44 67 94 | 18 12 06

25  1999 Addison Wesley Longman4.24 Quick sort 44 55 12 42 94 06 18 67 18 06 12 42 94 55 44 67

26  1999 Addison Wesley Longman4.25 Application Software: Tools for Users Software applications include: –Consumer software –Integrated software –Vertical-market and custom software

27  1999 Addison Wesley Longman4.26 There are thousands of different consumer software titles Consumer software differs based on: –Documentation –Upgradability –Compatibility –Warranty –Extent of ownership/license Consumer Applications

28  1999 Addison Wesley Longman4.27 Documentation Documentation includes: –Printed tutorial and reference manuals that explain how to use the software –On-line manuals and help screens which offer immediate help to the user

29  1999 Addison Wesley Longman4.28 Upgrades Rather than buy the latest version and discard your old one, often you can pay a fee to the software maker and upgrade the old version to the new one Newer versions of a software company’s product usually have additional features and fewer bugs

30  1999 Addison Wesley Longman4.29 Compatibility Compatibility means the software will function properly with the hardware, operating system, and any peripherals To date, there is no industry standard that software must follow

31  1999 Addison Wesley Longman4.30 Warranty Buyer beware! Software manufacturers limit their liability for software problems by selling their software “as is” Error-free software does not exist

32  1999 Addison Wesley Longman4.31 Ownership/Licensing Three categories: –Purchased software grants you a license to use the software as the software company tells you –Shareware software is free for the trying, but a nominal fee is to be paid to the programmer if you continue to use it –Public domain software is legally free and cannot be owned or licensed

33  1999 Addison Wesley Longman4.32 Integrated Applications and Suites: Multipurpose Software Multipurpose software that includes most of these modules: –Word processing –Database –Spreadsheet –Graphics –Telecommunications

34  1999 Addison Wesley Longman4.33 Integrated Software: Advantages Costs less than buying the applications individually Data is easily transferred between modules Commands used in each module are usually the same Usually there is a seamless integration of the modules

35  1999 Addison Wesley Longman4.34 Vertical-Market and Custom Software Job-specific software: –Medical billings –Library cataloging –Restaurant management –Single-client software needs

36  1999 Addison Wesley Longman4.35 System Software: The Hardware-Software Connection Operating Systems Language Processors Utility Programs

37  1999 Addison Wesley Longman4.36 Language Processors Assemblers Compilers Interpreters

38  1999 Addison Wesley Longman4.37 What the Operating System Does The operating system controls: –Communication with peripherals –Coordination of concurrent processing –Memory management –Monitoring of resources and security –Management of programs and data –Coordinating network communications

39  1999 Addison Wesley Longman4.38 Operating System to make users comfortable to make machines efficient MS-DOS –single user, single-task WINDOWS –single user, multi-task Unix –multi user, multi-task

40  1999 Addison Wesley Longman4.39 Microsoft O.S. 1980MS-DOS –text mode 1990MS-Windows 3.0 –graphic mode –multi-tasking 1995MS-Windows 95 –native O.S. –plug & play –network management

41  1999 Addison Wesley Longman4.40 Microsoft O.S.(II) 1998 MS-Windows 98 –Web integration –support multi-medium 2000 MS-Windows Me –more reliable

42  1999 Addison Wesley Longman4.41 Utility Programs Utility software controls tasks such as: –repairing damaged files –making it easy for users to copy files from one storage device to another –translating files so different software can read them –guarding against viruses

43  1999 Addison Wesley Longman4.42 The User Interface: The Human-Machine Connection The user interface is what the user sees on the screen and interacts with Two major user interface types: –Character-based interface –Graphical user interface

44  1999 Addison Wesley Longman4.43 A Character-Based User Interface: MS-DOS This is a disk operating system in which the user interacts with characters –letters –numbers –symbols

45  1999 Addison Wesley Longman4.44 A Character-Based User Interface: MS-DOS MS-DOS™ is the most widely used general-purpose operating system Features include: –Command-line interface (commands are typed) –Menu-driven interface (commands are chosen from on-screen lists)

46  1999 Addison Wesley Longman4.45 Graphical User Interfaces: Macintosh This is a disk operating system in which the user interacts with the computer by using a pointing device (e.g. a mouse) As early as 1984, the Macintosh™ computer was designed with this interface in mind

47  1999 Addison Wesley Longman4.46 Graphical User Interfaces: Windows In 1995, Windows 95™ was released as a graphical user interface for IBM™ computers and their compatibles

48  1999 Addison Wesley Longman4.47 Why WIMP Won Windows, Icons, Menus, and Pointing devices In this graphical user interface, the cursor of the pointing device (mouse) appears on the screen and can be used to point to icons, work within windows, and select from menus

49  1999 Addison Wesley Longman4.48 Tomorrow’s User Interfaces Future interfaces will probably: –Make individual applications obsolete –Support natural languages (talk to the machine and it talks back) –Include artificial intelligence and agents that fit our needs –Be based on virtual reality (data in three-dimensional physical space)

50  1999 Addison Wesley Longman4.49 Before you buy, you should consider: Rules of Thumb: Computer Consumer Concepts Cost Compatibility Capacity Customizability Capability Connectivity Convenience Company Purchasing Curve

51  1999 Addison Wesley Longman4.50 Cost Before you buy: –Determine what you can afford –Allow for “extras” –Join a user group or talk with other computer and software owners

52  1999 Addison Wesley Longman4.51 Compatibility Before you buy, make sure you know: –What is the right computer and software for what you want to do –If the computer and software you will need work well together

53  1999 Addison Wesley Longman4.52 Capacity Before you buy, make sure you know: –How much computer power you are going to need –If the processor will be able to handle your demands –If you will be able to upgrade later on

54  1999 Addison Wesley Longman4.53 Customizability Before you buy, make sure you know: –If your computer can be customized to fit your needs (such as video editing)

55  1999 Addison Wesley Longman4.54 Before you buy, make sure you know: –Which computer is the right tool for you –If the computer and software will be able to meet your demands today and years from now Capability

56  1999 Addison Wesley Longman4.55 Connectivity Before you buy, make sure you: –Have included a high-speed modem or some other network connection –Can take full advantage of the communication capabilities of your computer

57  1999 Addison Wesley Longman4.56 Before you buy, make sure you determine: –Whether portability or permanent connection of peripherals is important –Which kind of user interface will help you do your work easier –If you should have the same machine as people around you Convenience

58  1999 Addison Wesley Longman4.57 Company Before you buy, make sure you know: –if you are buying from a reputable company –if parts and service will be available if needed

59  1999 Addison Wesley Longman4.58 Purchasing Curve Most models of personal computers seem to have a useful life span of just a few years Before you buy, make sure you know: –how new or old the computer is that you want to buy –not to buy a brand new computer model –not to buy an “obsolete” computer model


Download ppt "Chapter Four Software Basics: The Ghost in the Machine."

Similar presentations


Ads by Google