SFC AStructuredFlowChartEditor Version2.3 User’sGuide TiaWatts,Ph.D. SonomaStateUniversity 1of35 SFC–AStructuredFlowChartEditor Version2.3 User’sGuide TableofContents 1. Introduction ..................................................................................................................... 3 2. GettingStartedwithSFC ................................................................................................ 4 3. TheSFCEnvironment..................................................................................................... 5 4. CreatingaNewStructuredFlowChart........................................................................... 7 5. OpeninganExistingStructuredFlowChart ................................................................... 8 6. InsertingaNewProcedure .............................................................................................. 8 7. InsertingControlStructures ............................................................................................ 11 a. SequentialProcessorActivity .................................................................................. 12 b. InputorOutput.......................................................................................................... 13 c. SubroutineCall.......................................................................................................... 14 d. SingleDecision ......................................................................................................... 15 e. DoubleDecision........................................................................................................ 16 f. CaseStatement .......................................................................................................... 17 g. CaseOption............................................................................................................... 18 h. TestattheTopLoop ................................................................................................. 19 i. TestattheBottomLoop............................................................................................ 20 j. CountingLoop........................................................................................................... 21 k. UserControlledExitLoop ........................................................................................ 22 8. InsertingDocumentation................................................................................................. 23 9. ModifyingControlStructures ......................................................................................... 24 10.TransformingControlStructures .................................................................................... 24 11.UsingCut,Copy,andPaste............................................................................................. 26 12.PrintingaStructuredFlowChart .................................................................................... 28 13.ViewingandPrintingPseudoCode ................................................................................ 28 14.SavingaStructuredFlowChart ...................................................................................... 29 15.ClosingaStructuredFlowChartView ........................................................................... 30 16.ExportingSVGandTXTfiles ........................................................................................ 30 17.EditingMultipleStructuredFlowCharts........................................................................ 31 18.ExitingfromSFC ............................................................................................................ 31 AppendixA:FlowChartSymbols....................................................................................... 32 AppendixB:Examples ........................................................................................................ 33 SoftwareandDocumentationCopyrightTiaWatts2001 2of35 1.Introduction Programdevelopmentcanbedescribedasasevenstepprocess: 1. Understandtheproblem. 2. Planthelogicoftheprogram. 3. Codetheprogramusingastructuredhighlevelcomputerlanguage. 4. Usingacompiler,translatetheprogramintoamachinelanguage. 5. Testanddebugtheprogram. 6. Puttheprogramintoproduction. 7. Maintainandenhancetheprogram. Planningthelogicoftheprogramrequiresthedevelopmentofalgorithms.Analgorithmisa finite,orderedsetofunambiguousstepsthatterminateswithasolutiontotheproblem.Human readablerepresentationssuchasflowchartsandpseudocodearetypicallyusedtodescribethe stepsofanalgorithmandtherelationshipsamongthesteps. Aflowchartisagraphicalrepresentationofthestepsandcontrolstructuresusedinanalgorithm. Aflowchartdoesnotinvolveaparticularprogramminglanguage,butratherusesasetof geometricsymbolsandflowcontrollinestodescribethealgorithm.Fromaflowchart,a programmercanproducethehighlevelcoderequiredtocompileanexecutableprogram. Initially,thestandardfordescribingflowchartsonlyspecifiedthetypesofshapesandlinesused toproduceaflowchart.Theintroductionofstructuredprogramminginthe1960’sand70’s broughtwithittheconceptofStructuredFlowCharts.Inadditiontoastandardsetofsymbols, structuredflowchartsspecifyconventionsforlinkingthesymbolstogetherintoacompleteflow chart. Thestructuredprogrammingparadigmevolvedfromthemathematicallyprovenconceptthatall problemscanbesolvedusingonlythreetypesofcontrolstructures: Sequence Decision(orSelection) Iterative(orlooping). Thedefinitionofstructuredflowchartsusedinthisdocumentandsoftwarefurtherdefines: 3typesofsequentialstructures: Process,Input/Output,andSubroutineCall 3typesofdecisionstructures SingleBranch,DoubleBranch,andCase 4typesofiterativestructures TestattheTop,TestattheBottom,Counting,andUserControlledExit. TheSFCprogramisdesignedtoaidtheprogrammerindesigningandpresentingstructuredflow charts.Inaddition,SFCwillautomaticallygeneratepseudocodeforaflowchartastheflow chartisbeingcreated. 3of35 2.GettingStartedwithSFC TostarttheSFCprogram: PlacethediskcontainingtheSCFprogramintheA:drive. FromtheStartmenu,selecttheRunoption. Entera:\sfcintheRundialogboxandclickonOKorpresstheenterkey. ORifyouhavecopiedtheSFCprogramontotheharddrive(C:)ofyourcomputer FromtheStartmenu,selecttheRunoption. Enterc:\sfcintheRundialogboxandclickonOKorpresstheenterkey. OnceyouhavestartedtheSFCprogram,themainwindowwillbedisplayed: Usingtheleftmousebutton,clickonOKtoproceed. Youcanmaximizethesizeofthiswindowbyclickingonthefullscreenbuttonintheupperright cornerofthewindowframe. 4of35 3.TheSFCEnvironment MinimizeMaximizeExit MenuBar ToolBar StatusBar Create Open SavePrintCutCopyPasteUndoZoom ZoomHelp New Exist- Chart In Out Flow ing to Chart Chart Disk TheFilemenuincludesoptionsallowingtheuserto: • CreateanewSFCflowchartdocument • OpenanexistingSFCflowchartdocument • SavethecurrentSFCflowchartdocumenttoafile • SavethecurrentSFCflowchartdocumenttoanewlynamedfile • ExportthecurrentSFCflowcharttoanSVGorTXTfile • PrintthecurrentSFCflowchartorpseudocodeview • PreviewtheprintversionofthecurrentSFCflowchartorpseudocodeview • Settheprintingparameters • ViewandselectfromalistofrecentSFCflowchartdocuments • ExitfromtheSFCEditor. TheEditmenuincludesoptionsallowingtheuserto: • UndothemostrecentmodificationmadetothecurrentSFCflowchart • CuttheselectedcontrolstructureorsubroutinefromthecurrentSFCflowchart • CopytheselectedflowchartelementfromthecurrentSFCflowcharttotheclipboard • CopytheselectedpseudocodefromthecurrentSFCpseudocodeviewtotheclipboard • Pastetheflowchartelementstoredontheclipboardintotheselectedinsertionpointin thecurrentSFCflowchart • InsertanewflowchartelementattheselectedinsertionpointinthecurrentSFCflow chart • ModifytheselectedcontrolstructureorsubroutineinthecurrentSFCflowchart. • TransformtheselectedcontrolstructureinthecurrentSFCflowcharttoanothercontrol structure. 5of35 TheViewmenuincludesoptionsallowingtheuserto: • VieworhidetheToolBar • VieworhidetheStatusBar • SelecttheGenericstyleofpseudocodeforthecurrentSFCflowchart • SelecttheC++styleofpseudocodeforthecurrentSFCflowchart • Includelinenumbersinthepseudocodewindow TheWindowmenuincludesoptionsallowingtheuserto: • CreateacopyofthecurrentSFCflowchartinanewwindow • DisplayacascadeoftheopenSFCflowchartdocuments • DisplayahorizontaltilingoftheopenSFCflowchartdocuments • ViewandselectfromalistoftheopenSFCflowchartdocuments. TheHelpmenuincludesoptionsallowingtheuserto: • ViewSFCversioninformation. TheleftmousebuttonisusedtoselectormodifyanelementinthecurrentSFCflowchart: • Pointingtothesymbolassociatedwithacontrolstructure,subroutine,orinsertionpoint andsingleclickingtheleftmousebuttonwillselecttheelement.Iftheselectedelementis acontrolstructureorsubroutine,selectionwillbeindicatedbyadashed-linerectangle enclosingthecompletestructureorsubroutine.Iftheselectedelementisaninsertion point,selectionwillbeindicatedbyadashed-linesquareenclosingtheinsertionpoint. • Pointingtothesymbolassociatedwithacontrolstructure,subroutine,orinsertionpoint anddoubleclickingtheleftmousebuttonwillallowtheusertomodifytheelement.Ifthe elementisacontrolstructureorsubroutine,theappropriatetextentrydialogboxwillbe displayed.Iftheelementisaninsertionpoint,theappropriateinsertiondialogboxwillbe displayed. Theleftmousebuttonisalsousedtoselectasegmentofthecurrentpseudocode. Therightmousebuttonisusedtodisplaypop-upmenus: • Pointingtothesymbolassociatedwithacontrolstructureorsubroutineandclickingthe rightmousebuttonwilldisplayapop-upmenuwithoptionsto: o Copythecontrolstructureorsubroutinetotheclipboard o Cutthecontrolstructureorsubroutineandplaceacopyontheclipboard o Deletethecontrolstructureorsubroutine
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages35 Page
-
File Size-