*PropertyofSTI J0005
SOFTWARE:DEVELOPMENT
ProgramPlanningandDevelopment StructuredDesign ProgrammingParadigm ProgrammingLanguage CompilersandInterpreters
1 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
FiveStagesinProgramDevelopmentDefiningtheproblemDesigningasolutionWritingtheprogramCompiling,Debugging,andTestingtheprogramDocumentingtheprogram
2__________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
1st Stage:DefiningtheProblemrecognizetheneedforinformationdefinewhatoutputsarerequiredfromtheprogram
2nd Stage:DesigningaSolutionbreakingtheproblemintodiscretestepsknownasalgorithmuseflowcharttoillustratethesequenceofsteps
flowchart agraphicalrepresentationofthesequenceofoperationsacomputeristoperform
3 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
FlowchartingTerminalGeneralInput/Output OperationProcessComparisonConnectorPredefinedProcessDocumentManualInput
4__________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:PayrollFlowchartStart
Readhoursworkedandpayscale
Endofdata?
1
YES
CalculateEmployeesPay
Printcheck
1 Printreports Stop
NO
5 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
PseudocodeA versionoftheinstructionsdescribingeachstepthecomputermustfollowExample:PayrollPseudocodeStartRead employee's hours worked and hourly wageDo until end of items
Multiply hours worked by hourly wage to get gross payIf gross pay is greater than 70KThen tax rate is 20%
Else tax rate is 15%Multiply tax rate by gross pay to give taxSubtract tax and union dues from gross to get net payPrint checkRead next employee's hours worked and hourly wage
End loop (no more data)Print reports
6__________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
3rd Stage:WritingaProgramWritetheprograminaspecificprogramminglanguageTypesofProgrammingStatements
CommentsDeclarationsInput/outputstatementsComputationsTransferofcontrolComparison
7 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
QualitiesofaProgramEasytoreadandunderstandEfficientReliableRobustMaintainable
8__________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
4th Stage:Compiling,Debugging,andTestingtheProgram
A compilerisaspecialprogramforeachprogramminglanguageloadedintothecomputerwhenthatlanguageisusedCommonCompilationErrors
SpellingerrorsSyntaxerrorsImproperlysequencedstatementsImproperlylabeledstatementsConflictinvariablenamesIllegalnamesorstatementsMissingpunctuations
9 _________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
LogicalerrorsaredetectedbytheprogrammerinadebuggingprocessTobesurethattheprogramwillgivethecorrectoutput,theprogramhastobetestedbyrunningtheprogramandinputtingdatawithknownoutputs
10 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
5th Stage:DocumentationoftheProgramConsistsofwrittendescriptionsandexplanationsofprogramsandothermaterialsassociatedwithanorganizationsdataprocessingsystemServesasaguidetoprogrammersandanalystswhomustmodifyorupdateexistingprogramsandsystemproceduresOtherDescriptions
Acompletedescriptionofthecontentsandformatsofalldatainputs,outputsandfilestobeusedA statementofthehardwarerequirementsforrunningtheprogramaswellasestimatedprocessingtimeandstoragerequirementsA statementofsoftwarerequirementssuchasutilityprogramsandlibraryprograms
11 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
EachmajorstepintheprogrammustbedevelopedasindependentmoduleandrepresentedintheflowchartasaseparateblockProgramcodeswillbeeasiertounderstandandmoremaintainableifyoubreakthelogicintosteps,andencompasseachstepinitsownsubroutineorfunctionBenefits
EarlydetectiondesignflawsProgramscanbeeasilymodifiedClearandcompletedocumentationModulardesigntoimprovetesting
12 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Topdownvs BottomupTopdown
Donebyrecognizingthemajorcomponentsofthesolution,expressingthesolutionasasequenceofthesemajorcomponents,andthenexpandingthemajorcomponentssimilarly
BottomupStartsbyidentifyingsmallfunctionsandsubroutinespresentinthedesignandmovinguptowardsmorecomplexprocedures
13 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
UsingFlowchartsGenerallyinvolvesatopdownanalysisoftheproblemBasedontheassumptionthattherearefourbasiclogicpatterns
SimplesequenceSelectionpatternLooppatternBranchpattern
14 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
SimpleSequence SelectionPattern
15 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
LoopPattern BranchPattern
16 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
DoWhileStructure CaseStructure
17 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
ParadigmAnexample,model,orpatternAnidealizedpatternofusageunderwhichsomeagentcanoperate
ProgrammingParadigmA wayofthinkingaboutproblemsandtheirsolutions,oranapproachonhowtouseacomputertoimplementthosesolutions
18 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
MajorProgrammingParadigmsImperativeLogicalFunctionalObjectOriented
19 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
ImperativeParadigmCharacterizedbyprogrammingwithstatesandcommandsthatmodifythestatesImpliesprocedures(orprograms)ordirectionsforperforminganactionAnabstractionofrealcomputers,whicharebasedontheVonNeumannmachineAssumesthatacomputercanmaintain,throughenvironmentvariables,anychangeinthecomputationprocess
20 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
AdvantageCanbeeasilytranslatedtoanefficientmachinecode,sotheyareconsideredhighlyefficient
DisadvantageSomeproblemsarehardtomodelusingthisparadigm
Example:ImperativeprogramthatwillcomputethefactorialofagivennumberFunction factorial(n){ var x = 1;
while(n>0) {x = x*n;n = n-1; }
return x;}
21 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
LogicalParadigmTakesadeclarativeapproachtoproblemsolvingCanbedividedintothree(3)steps1. Aseriesofdefinitions/declarationsthatdefinethe
problemdomain2. Statementsofrelevantfacts3. StatementsofgoalsintheformofqueriesAdvantagesThesystemsolvestheproblemsoprogrammingstepsarekepttoaminimumSinceitislargelybasedonmathematicallogic,provingthevalidityofagivenprogrambecomessimple
22 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:Anillustrationofalogicalparadigm
23 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
FunctionalParadigmBasedonfunctionalexpressionsandtheevaluationoftheseexpressionViewsallprogramsasfunctionsinamathematicalsenseAdvantages
Provideahighlevelofabstraction;theprogrammingbecomesmodularandremovesthepossibilityofcreatingseveralerrorsNotheavilydependentontheassignmentoperation,sotheprogramscanbeevaluatedwithmanydifferentordersMuchmoreamenabletomathematicalproofandanalysisthanimperativeones
24 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
DisadvantagesHardtoimplementefficiently,becauseitishardtodetermineifdatastoragecanbereusableDifficulttosolveproblemsinvolvingmanyvariablesoralotofsequentialactivity
25 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:FactorialfunctionFactorial n = If n = 1 then 1Else
n * Factorial(n-1);
26 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:FunctionforcomputingtheaverageoftwonumbersFunction for computing the average of two
numbers:
(defun avg(X Y) (/ (+ X Y) 2.0))
Function is called by:> (avg 10.0 20.0)
Function returns:15.0
27 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
ObjectOrientedParadigmA paradigminwhichrealworldobjectsareviewedasseparateentitieshavingtheirownstateandexhibitingtheirownbehaviorFocusesontheobjectsthattheprogrammerisrepresenting
28 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Illustratesobjectsandhowtheyareencapsulatedintomodules
Object interface
DATA Methods
29 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Canbedividedintofoursteps1. Identifytheproblem2. Identifytheobjectsneededforthesolution3. Identifymessagestobesenttotheobjects4. Createasequenceofmessagestotheobjectsthat
solvetheproblem
30 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:1. Problemidentification:Computerthesumoftwo
numbersandprintouttheresult2. Objectidentification:
Num1 firstnumber(object)Num2 secondnumber(object)Sum resultoftheadditionofthetwonumbers
3. Messageidentification:+aNum senttothereceiverobjectwithparameteraNumprint displaysthevalueofthereceiverobject
4. Objectmessagesequences:(Num1+Num2)print
31 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
OtherProgrammingParadigmsTree
ViewingcodeordatainahighlyhierarchicalmannerExpertSystem
Organizesdatabyusingalistorpoolofrulesthataresometimesrecycledthroughconstantly
StreamBasedontheideathatinputandoutputofsmallerprogramsorutilitiescanbelinkedtogether
NeuralNetworkBasedontheconceptsthatcomputersareprogrammedinthesamewayashowhumansthink
32 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
LanguageDefinedasasystemforcommunicationWrittenlanguageusesymbols(characters)tobuildwords
VocabularyReferstoentiresetofwords
SyntaxandGrammarDefinethewayinwhichthewordscanbemeaningfulwhencombined
SemanticsActualmeaningofwordsandcombinationsofwords
33 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
MachineLanguageThelowestlevelofprogramminglanguageOnlylanguageunderstoodbycomputersandconsistsofpurenumbers;takestheformof1or0Eachmachineinstructionhastwo(2)parts:
Opcode(operationcode)Operand
34 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
LowLevelLanguageAlsocalledasassemblylanguageEasiertounderstandthanmachinelanguage
35 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Programmersmustbehighlyskilledintwoareas:Mustknowagreatdealabouttheinternalworkingsofthemicroprocessor,andabroadtechnicalknowledgeofthecomputerisneededMustbeverydetailoriented;everystepofthecomputermustbecoded,andtheactualnumericaladdressoftheinstructionsanddatamustbespecified
36 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:Usingassemblylanguagetomultiply87and243andsavingtheresultinthememory
37 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
HighLevelLanguageEnablesaprogrammertowriteprogramsthataremoreorlessindependentofaparticulartypeofcomputerClosertohumanlanguagethanthemachinelanguageEasiertounderstandandallowstheprogrammertofocusonsolvingtheproblemratherthanknowinghowtoprogramthecomputerExamples:Ada,Algol,BASIC,COBOL,C,C++,FORTRAN,LISP,Pascal,Prolog
38 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
BASICBeginnersAllpurposeInstructionCodeDevelopedbyJohn Kemeny andThomas Kurtz intheearly1960sIntendedasaneasytolearninteractivelanguageforthestudentsAdvantages
SimplicityandflexibilityAllowsbasicmanipulationoftextProvidesbuiltinfunctionssuchaslogarithms,squareroot,trigonometricfunctions,andrandomnumbergenerator
39 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:UsingBASICprogramtomultiply87and243andprintingtheresult
40 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
FORTRANFormulaTranslatorTheoldesthighlevelprogramminglanguageDevelopedinthemid1950sbyJohnBackusPrimarilyintendedasahighlevellanguageusedforprogrammingscientific,mathematical,andengineeringapplications
41 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
AdvantagesProcedureorientedlanguagewithexcellentmathematicalcapabilitiesItspatternissimilartotheBASIClanguage;aprogrammerwhoisfamiliarwithFORTRANcaneasilywriteprogramsinBASIC
DisadvantagesCloselyresemblesmathematicalnotations,itisverydifficultfornonprogrammertounderstandorfindtheerrorsinaprogramNotsuitedasabusinessapplicationlanguageforitdoesnothavethecapabilitytodevelopprogramsthatinvolvefilemaintenance,editingofdata,ordocumentproduction
42 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:UsingFORTRANprogramtomultiply87and243andprintingtheresult
43 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
COBOLCommonBusinessOrientedLanguagethemostfrequentlyusedbusinessprogramminglanguageusedextensivelyinbusiness,education,andgovernmentstartedintheearly1960swhenacommitteeledbyUSDepartmentofDefenseandothercomputerusersandmanufacturersknownasCODASYL(ConferenceofDataSystemsLanguages)wantedtodevelopacommonbusinessprogramminglanguageDr.GrayMurrayHopperwasamajorcontributortothestructureanddevelopmentofthelanguage
44 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
AdvantagesEasytounderstandevenfornonprogrammersSelfexplanatoryandwelldocumentingGoodliterarycapabilitywhichmeansthatitisgoodinmanipulatingwords,sentences,orparagraphsoftextmaterialStrongfilehandlingcapabilitiesMachineindependent
DisadvantagesProgramstendtobewordyandquitelongLimitedcomputationalcapabilitieswhichmakesitinappropriateforapplicationsthatrequirecomputations
45 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:UsingCOBOLprogramtomultiply87and243andprintingtheresult
46 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
PASCALThelanguagenamedaftertheseventeenthcenturyFrenchmathematicianBlaisePascalwhoconstructedoneofthefirstaddingmachinesA highlevellanguagedevelopedbyNiklaus WirthofZurich,Switzerlandinthelate1960sOneofthefirstlanguagesdevelopedusingastructuredprogrammingapproach
47 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
CharacteristicsPascalprogramsconsistofmodules,andeachmoduleperformsaspecificfunctionThestatementsinthemodulecanbeorganizedintolevels,andthelevelofthestatementisshownbyitsdegreeofindentionfromthemargintofollowtheprogramlogiceasilyStatementsinaPascalprogramarecomposedofreservedwords,symbols,andidentifiersReservedwordsarewordsthathaveaspecialmeaningtothePascalcompilerSymbolsusedinPascalincludemathematicalsymbolsandpunctuationmarksIdentifiersarenamesthatrepresentvariousconstants,variables,procedures,orfunctions
48 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
AdvantagesRelativelyeasytolearnPowerfulandefficientlanguageStronggraphicscapabilities
DisadvantagesNotasstandardasCOBOLorBASICPoorinputandoutputcapabilitiesLimitedfilehandlingcapabilitiesDoesnotpossesstheabilitytomanipulatelargecollectionofnumbersorwords
49 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:UsingPASCALprogramtomultiply87and243andprintingtheresult
50 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
CLanguageA highlevelprogramminglanguagedevelopedbyDennisRitchieattheBellLaboratoriesin1972NamedC,becauseitwasinfluencedbyanotherlanguagecalledBdevelopedbyKenThompsonOriginallydesignedasasystemsprogramminglanguageusedtowriteoperatingsystemsprograms
51 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
AdvantagesAllowsdirectmanipulationofbits,bytesandwordsthataresimilartoassemblylanguageUsefulfornumerical,textprocessing,anddatabaseprogramsVerygoodgraphicsprogrammingcapabilities
DisadvantagesNotintendedasalanguagefornonprogrammers,unlikeBASICandCOBOL;ifyouarenotfamiliarwiththelanguage,youwillnotunderstandthestructure
52 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
Example:UsingCprogramtomultiply87and243andprintingtheresult
53 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
C++LanguageDevelopedbyBjarne Stroustrup whileworkingattheBellLaboratoriesConsideredasupersetofC,andhasthesamecapabilitiesasCwithaddedobjectorientedfeaturesExample:UsingC++programtomultiply87and243andprintingtheresult
54 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
JAVALanguagepopularprogramminglanguageforcreatingapplicationsontheWebOak,wasdevelopedinDecember1990bySunMicrosystemsReasonstoUseJava
SimpleandfamiliarObjectorientedArchitectureneutralPortableDistributedSecure
55 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005 56 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
CompilerA programthattranslatesaprogramwritteninahighlevellanguageandtranslatesitintomachinelanguageAdvantages
CompiledmachinecodesrunmuchfasterthaninterpretedonesCompiledcodesoccupylessmemoryduringexecutionOnceaprogramiscompileditcanbererunanytime
DisadvantagesTheprogramcanonlybeexecutedoncethetranslationiscompleteAnychangetothesourcecoderequiresacompleterecompilation
57 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________
*PropertyofSTI J0005
InterpreterTranslatesandexecutestheprogramlinebylineTranslateshighlevelinstructionsintoanintermediateform,whichitthenexecutesAdvantages
FasterandeasiertodetecterrorsintheinterpretedprogramthanthecompiledprogramEasierandfastertomakechangestotheprogramwhichreducesdevelopmenttimeespeciallyforlargeprograms
DisadvantagesUsesmorememoryandmuchslowerthancompiledcodesNocopyofthetranslatedcodeexist;ifyouwanttoreruntheprogramitmustbeinterpretedalloveragain
58 ________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________ ___________________________