3 programming concepts

8
Programming Concepts *Property of STI Page 1 of 8 Data Structures and Algorithms Programming Concepts How the Computer Stores Data @ Database @ File @ Record @ Field Communicating with Computer @ Instructions aSyntax ¢ Bug ¢ Debugging

description

 

Transcript of 3 programming concepts

  • 1. Data Structures and AlgorithmsProgrammingConceptsHow the Computer Stores Data @ Database @ File @ Record @ FieldCommunicating with Computer@ InstructionsaSyntax Bug DebuggingProgramming Concepts*Property of STIPage 1 of 8

2. Data Structures and Algorithms Analyzing the problemThe given data@ Data given in the problem or provided by the user. These can be known values or general names for data, such as price, quantity and so forth.The required results@ Requirements for the output reports. This includes the information needed and the format required.The processing that is required in the problem@ List of processing required. This includes equations or other types of processing, such as sorting, searching, and so forth.A list of solution alternatives@ List of ideas for the solution of the problem.Programming Concepts *Property of STI Page 2 of 8 3. Data Structures and AlgorithmsWriting theAlgorithmsPseudocode@ an outline of a program, written in a form that can easily be converted into real programming statementsExample : Bubble Sortwhile not at end of listcompare adjacent elementsif second is greater than firstswitch themget next two elementsif elements were switchedrepeat for entire listProgramming Concepts *Property of STI Page 3 of 8 4. Data Structures and Algorithms Drawing the flowchartProgramming Concepts*Property of STIPage 4 of 8 5. Data Structures and AlgorithmsFlowchartingSymbols Flowlines are indicated by straight lines with optional arrows to show the direction of data flow. The arrowhead is necessary when the flow direction might be in doubt. Flowlines are used to connect blocks by exiting from one and entering another Flattened ellipses indicate the start and the end of a module. An ellipse uses the name of the module at the start. The end is indicated by the word end or stop for the top or control module and the word exit for all other modules. A start has no flowlines entering it and only one exiting it; an end or exit has one flowline entering it but none exiting it.Programming Concepts*Property of STIPage 5 of 8 6. Data Structures and AlgorithmsFlowchartingSymbols The rectangle indicates a processing block, for such things as calculations, opening and closing files, and so forth. A processing block has one entrance and one exit. The parallelogram indicates inout to and output from the computer memory. An I/O block has one entrance and only one exit. The diamond indicates a decision. It has one entrance and two and only two exits from the block. One exit is the action when the resultant is TRUE and the other exit is the action when the resultant is false.Programming Concepts *Property of STI Page 6 of 8 7. Data Structures and AlgorithmsFlowchartingSymbols Rectangles with lines down each side indicate the process of modules. They have one entrance and only one exit. Flowchart sections can be connected with two different symbols. The circle connects sections on the same page, and the home base plate connects flowcharts from page to pageProgramming Concepts *Property of STI Page 7 of 8 8. Data Structures and AlgorithmsTesting theSolution When a solution is complete, it is important to test it to make sure it meets the requirements of the user, and to check for errors in logic or in the setup of the expressions and equations.Programming Concepts*Property of STIPage 8 of 8