Kĩ thuật lập trình - Systems analysis & programming

Phase 3: Design the system Notice that you don’t design the new system until you have done phase 2 since that establishes the requirements it must meet! Do a preliminary design Often involves prototyping Do a detail design, showing: Input requirements Output requirements Storage requirements Processing requirements System controls Backup Write a report and get approvals for next phase

ppt42 trang | Chia sẻ: huyhoang44 | Lượt xem: 641 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Kĩ thuật lập trình - Systems analysis & programming, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
1Systems Analysis & Programming10.1 Systems Development10.2 Programming: A Five-Step Procedure10.3 5 Generations of Programming Languages10.4 Programming Languages Used Today10.5 Object-Oriented & Visual Programming10.6 Markup & Scripting LanguagesChapter10McGraw-Hill/Irwin© 2007 The McGraw-Hill Companies, Inc. All rights reserved.Systems DevelopmentOrganizations can make mistakes, and big organizations can make really big mistakesMurphy’s Law: Whatever can go wrong, will go wrong, and at the worst possible timeA system A collection of related components that interact to perform a task in order to accomplish a goalSystems Development 6-phase process of gathering information about system requirements and using that to develop a new system that improves productivityWarning! Road Out!3Systems DevelopmentThe three kinds of users of a project are:UsersThe new system must ALWAYS be developed in consultation with the people who will be using the completed systemManagementManagers within an organization should be consulted about the system, as they control the budget and resourcesTechnical staffThe Information Systems or IT staff must be involved so they can make sure the technology is there4Systems DevelopmentSystems AnalystAn information specialist who performs systems analysis, design, and implementationHis or her job is to study the information and communications needs of an organization and determine what changes are needed to deliver better information to the people who need it5Systems DevelopmentThe 6 phases of systems analysis & design are:Preliminary investigationSystems analysisSystems designSystems developmentSystems implementationSystems maintenanceInformation systems are frequently revised and upgradedSteps in the cycle often overlap6Systems DevelopmentPhase 1: Conduct a preliminary investigationConduct a preliminary analysisPropose alternative solutionsInterview people within the organizationStudy what competitors are doingDecide to leave the system as is, improve it, or develop a new systemDescribe costs and benefitsSubmit a preliminary plan with recommendationsThis should be a written reportGet management approvals for next phase7Systems DevelopmentPhase 2: Analyze the systemGather dataInterview employees and managersDevelop, distribute, analyze questionnairesReview current written documentsObserve people and processes at workAnalyze the dataUse system modeling tools, such as CASE toolsCreate a data flow diagram to show how data flows through the systemWrite a report and get approvals for next phaseDocument how the current system worksDocument problems with the current systemDescribe the requirements for the new system8Systems DevelopmentPhase 3: Design the systemNotice that you don’t design the new system until you have done phase 2 since that establishes the requirements it must meet!Do a preliminary designOften involves prototyping Do a detail design, showing:Input requirementsOutput requirementsStorage requirementsProcessing requirementsSystem controlsBackupWrite a report and get approvals for next phase9Systems DevelopmentPhase 4: Develop the systemDevelop or acquire the softwareAcquire and integrate the hardwareTest the systemUnit testingSystems testing with both analysts and end-usersEnd-user testing is critical, as they don’t know the software and will show the developers where they forgot something10Systems DevelopmentPhase 5: Implement the systemChoose a strategy to convert to the new systemDirect implementationParallel implementationPhased implementationPilot implementationTrain the usersDocument the systemGive classes or train the trainers11Systems DevelopmentPhase 6: Maintain the systemPerform periodic evaluationsMake changes to the system based on new conditionsDocument those changes12Programming: A Five-Step ProcedureA program is a list of instructions that the computer must follow to process data into informationThe five steps areClarify/define the problemClarify the program objectives & usersClarify outputsClarify inputsClarify processing tasksStudy the feasibility of the programDocument the analysisDesign the programCode the programTest the programDocument and maintain the program13Programming: A Five-Step ProcedureStep 2: Design the programCreate an algorithm or set of steps to solve the problemTraditional structured programming approachDetermine program logic using top-down approach & modulesDesign details using pseudocode or flow chartsAlternative object-oriented approachUse “Use Case” approach to determine program objects, object inheritance, and actions or functions each object can performIdentify major program components and organize related functions and associated data into object classesThis is the approach used by object-oriented languages such as Java, C#, Lisp, Visual Basic, and C++For more information on object-oriented programming, visit or 14Programming: A Five-Step ProcedureA hierarchy chart15Programming: A Five-Step ProcedurePanel 10.13PseudocodeSTARTDO WHILE (SO LONG AS) THERE ARE RECORDS Read a customer billing account record IF today’s date is greater than 30 days from date of last customer payment Calculate total amount due Calculate 5% interest on amount due Add interest to total amount due to calculate Grand total Print on invoice overdue amount ELSE Calculate total amount due ENDIF Print out invoiceEND DOEND16Programming: A Five-Step Procedure ● PANEL 10.14Example of a programflowchart andexplanation offlowchart symbolsThis example represents aflowchart for a payrollprogram.17Programming: A Five-Step ProcedureIteration and sequence control structures18Programming: A Five-Step ProcedureStep 3: Code the programTranslate the logic requirements into a programming languageProgramming language is a set of rules that tells the computer what operations to doEach programming language has a syntax, or set of grammatical rules to follow to write valid expressionsSyntax rules must be followed or there will be syntax errorsComputers don’t understand what you want, only what you type in19Programming: A Five-Step ProcedureStep 4: Test the programDesk checking is done by the programmer who checks for syntax errors and logic errorsDebugging is the process of detecting, locating, and removing all errors in a computer programBeta testing is the process of testing the program using real dataOne phase of testing uses correct dataOnce the program works, the next phase of testing uses invalid data and untrained users to root out hidden errors20Programming: A Five-Step ProcedureStep 5: Document & Maintain the programDocumentation is written descriptions of what a program is and how to fix itThere are several types of documentation that should be writtenUser documentation – for the people who will use your programOperator documentation – for the people who run the large computers the program runs on – so they know what to do if the program or computer malfunctionsProgrammer documentation – for the next programmer who must modify and maintain what you have writtenMaintain the programFix any errors that are noticed once the program is in productionUpdate the program to reflect new requirements215 Generations of Programming Languages1945 – 1st Generation – Machine LanguageThe basic language of the computer – all zeros and onesEach CPU architecture had a different machine languageMid-1950s – 2nd Generation – Assembly LanguageMid-1950s to 60s – 3rd Generation – High-level Languages (procedural languages) such as FORTRAN, COBOL, BASIC, CEarly 1970s – 4th Generation – Problem-oriented Languages such as Intellect, NOMAD, FOCUSEarly 1980s – 5th Generation – Natural Languages 225 Generations of Programming Languages1945 – 1st Generation – Machine LanguageMid-1950s – 2nd Generation – Assembly LanguageMnemonic version of machine languageFaster to program in than machine languageEach CPU architecture had a different assemblerMid-1950s to 60s – 3rd Generation – High-level Languages (procedural languages) such as FORTRAN, COBOL, BASIC, CEarly 1970s – 4th Generation – Problem-oriented Languages such as Intellect, NOMAD, FOCUSEarly 1980s – 5th Generation – Natural Languages235 Generations of Programming Languages1945 – 1st Generation – Machine LanguageMid-1950s – 2nd Generation – Assembly LanguageMid-1950s to 60s – 3rd Generation – High-level Languages (procedural languages) such as FORTRAN, COBOL, BASIC, CThese languages are portable (the same across all CPUs)The programmer writes, then interprets or compiles the programsThe compiler or interpreter translates the code into the CPU-specific assemblerEarly 1970s – 4th Generation – Problem-oriented Languages such as Intellect, NOMAD, FOCUSEarly 1980s – 5th Generation – Natural Languages245 Generations of Programming Languages1945 – 1st Generation – Machine LanguageMid-1950s – 2nd Generation – Assembly LanguageMid-1950s to 60s – 3rd Generation – High-level Languages (procedural languages) such as FORTRAN, COBOL, BASIC, CEarly 1970s – 4th Generation – Problem-oriented Languages such as Intellect, NOMAD, FOCUSEasier to program in than 3rd generation languagesThree types are:Report generatorsQuery languagesApplication generatorsEarly 1980s – 5th Generation – Natural Languages255 Generations of Programming Languages1945 – 1st Generation – Machine LanguageMid-1950s – 2nd Generation – Assembly LanguageMid-1950s to 60s – 3rd Generation – High-level Languages (procedural languages) such as FORTRAN, COBOL, BASIC, CEarly 1970s – 4th Generation – Problem-oriented Languages such as Intellect, NOMAD, FOCUSEarly 1980s – 5th Generation – Natural LanguagesProgramming languages that use human language to give people a more natural connection with computersPart of the field of artificial intelligence26Programming Languages Used TodayFORTANThe language of mathematicsThe first high-level language writtenA machine-independent procedural languageCOBOLThe most-frequently used language for business legacy applications on mainframe computersWriting COBOL is like writing an outlineHas 4 divisions: Identification, Environment, Data, and ProcedureA machine-independent procedural language27Programming Languages Used TodayBASICDesigned to be an easy language to useUsually run from an interpreter, but can be compiledProcedural languageSupplanted by Microsoft’s Visual Basic for commercial/business use PascalDesigned to be a language to teach programmingStructured, compiled languageNot used in business or commercial companies28Programming Languages Used TodayCGeneral-purpose machine-independent compiled languageThe language used to write the Unix operating systemThe precursor to C++ and C#Permits very efficient coding and low memory utilization through direct allocation and manipulation of computer memoryC++ Object-oriented language that was developed after CPermits encapsulation, object inheritance, and object reuseOften used to write computer games and CPU- and graphics-intensive applicationsTougher to program in than Visual Basic, Java, or C#29Programming Languages Used TodayJavaObject-oriented programming language developed at Sun Microsystems by James Gosling and colleagues in the early 1990sDerivative of C++ with simpler memory management and syntaxIs platform-independent, but is licensed by Sun Microsystems, which owns development rights to JavaUsed in many US businessesC#Microsoft’s answer to losing the Java licensing agreement infringement lawsuit to SunContains a similar syntax to Java, but with additional C++ and Visual Basic-like featuresUsed in many U.S. businesses – one of the hottest languages for “Help Wanted” ads in www.monster.com30Programming Languages Used TodayLISPStands for LISt ProcessorDeveloped by Prof. John McCarthy of the Massachusetts Institute of TechnologyTo develop an algebraic list processing language for Artificial Intelligence workMacsyma is a renowned LISP applicationMacsyma allows users to type in an algebraic equation such as (a x a x a) x b / (a x a) + 3 = c Macsyma then manipulates the equation and simplifies it while keeping it in its algebraic form to derive the solution, which would be c = a x b + 3This is very different from most programs that allow you to enter numbers and produce numeric solutions but can’t show you what the simplified algebraic equation looks like 31Object-Oriented & Visual ProgrammingIn Object oriented Programming (OOP) data and processing instructions are combined into an object that can be reusedObjectSelf-contained module consisting of reusable codeMessageThe instruction received by the object indicating it is time to perform an actionMethodThe processing instructions within the object to perform the specified action32Object-Oriented & Visual ProgrammingBlack Box Objects are like a black box in that the actions and the objects are specified, but the methods used are internal to the objectThis means the programmer that uses an object does not need to know how the program inside the object does what it doesFor example, Microsoft Excel is like an objectMost of us use Excel without understanding what the programmers at Microsoft did to make Excel workIf we had to know that, it would take a lot longer to learn how to use Excel!Programmers who use objects can write programs a lot faster, because objects save so much work33Object-Oriented & Visual Programming3 basic concepts of OOPEncapsulationOne object contains (encapsulates) both DataRelevant processing instructionsInheritanceOne object can be used as the foundation for other objectsObjects can be arranged in hierarchies – classes and subclassesObjects can inherit actions and attributes from each otherPolymorphismAllows a single definition to be used with different data types and different functionsMeans a message produces different results depending on the object it is sent to34Object-Oriented & Visual ProgrammingThe “Door” classActions performed by a doorSubclasses of doors inherit from the door class, but also have their own unique actions and attributesNotice we only list the actions & attributes when they differ from those of classExample of Inheritance Hierarchy with Specialization35Object-Oriented & Visual ProgrammingVisual Basic is an example of visual programmingUsing a mouse, the programmer drags and drops objects on screenThe objects are arranged to make up the graphical user interface for the program being writtenBy double-clicking on those objects, the programmer can get into a coding window and write the programs to control the actions and behaviors of those objectsThis makes it fast and easy to build prototype user interfaces and get end-user approval before doing a lot of programmingIf you have Visual Basic installed on your school’s computers, this would be a great time to try it out.36Markup & Scripting LanguagesA markup language is a kind of coding or “tags” inserted into text that embeds details about the structure and appearance of the text.Open up a text editor such as Notepad or Wordpad, and enter the following text:Then save the file on your desktop. Name it sample.htmNow open your internet browser and view it by clicking “file open” and navigating to your desktop My name is your nameAnd I love this class!!!37Markup & Scripting LanguagesSo how did thisTurn into this? By HTML tags My name is your nameAnd I love this class!!! My name is your nameAnd I lovethis class!!! The tag defines the page colorThe tag means a heading of size 2The tag means a heading of size 1The tag means to italicize the textThe tag means to bold the textThe tag means to start a new paragraphAnd the / inside a tag means to end that formatThere are a LOT of other HTML tags38Markup & Scripting LanguagesHTML Hypertext markup languageUsed to create web pagesAlso lets you insert a hypertext link in a web pageVRMLVirtual Reality Modeling for Markup Language is used to create three-dimensional web pages including interactive animationRequires special VRML browser to view those pages39Markup & Scripting LanguagesXMLeXtensible Markup Language is a metalanguage written in SGML that allows one to facilitate easy document interchange on the internetXML lets you create your own tagsXML statements define data contentJavaScriptNot the same language as JavaAn object-oriented scripting language that adds interactive functions to web pages40Markup & Scripting LanguagesActiveXDeveloped by Microsoft as an alternative to Java for creating interactivity on web pagesA set of controls or components that enable programs or content of almost any type to be embedded in a web pageOften used by crackers to propagate viruses and/or trojansBefore you allow an ActiveX component to download from your browser to your PC, make sure you trust that website!41Markup & Scripting LanguagesPerlA general-purpose programming language developed for text manipulation.Developed in 1987 by Larry WallNow used for web development, network programming, system administration, GUI development, other tasksWidely used for web server programs to perform automatic tasks such as updating user accounts and newsgroup postings42

Các file đính kèm theo tài liệu này:

  • pptchap010_0036.ppt