You are on page 1of 7
[BB])Lesson Discussion Aas Problem solving is a part of our everyday life. In computer programming, problem solving is inevitable too and its actually one of the main reasons why a program is created. In this lesson, we will learn the various concepts on how to plana program's output, step by step, using algorithm applied to pseudacode and flowchart. Identifying variables and the corresponding data types will also be discussed in this lesson, WHAT IS AN ALGORITHM? Generally, an algorithm is a step-by-step procedure to scive problems. A guide for installing new software, a manual for assembling appliances, and even recipes are examples of an algorithm. in programming, making an algorithm is exciting—they are expressed ina programming language or ina pseudocode. Algorithm makes the whole procedure more efficient as welll as consistent. It also helps in identifying decision points, processes, and essential variables to solve the problem. A programmer can also see and determine easily the errors in a particular process using an algorithen, WHATS A PSEUDOCODE? A pseudocode is a description of an algorithm or a computer program using natural language. Because the aim of pseudocode is to make reading program easier, some codes that are not essential for human understanding are omitted. This tanguage is commonly used in planning out the structure of a program or a system, like the blueprint for creating a house or a building. If student's grade is greater than or equal to 60 Print “Passed” else Print “Failed” Algorithm for Classifying Student's Grade The example above is an algorithm of determining whether a student with a specific mark should passed or failed. With the help of pseudocode, one can easily understand it without having to know the technicalities. WHAT IS A FLOWCHART? Uke pseudocodes, fowchart is also a description of an algorithm or a computer program. Italso serves as the program's blueprint during the! Programm Development Process. ‘The difference is that flowchart is a graphical representation of it. Flowcharts help in the effective analysis of the problem as well as the application's or program's maintenance, thus Providing ease in identifying potential improvements of the system or program. it consists of 7 standard symbols namely: Terminal tor, Process, Decision, On-page €or Fy nnector, Off-page Connector, Input/Qutput operation, and Arrows, ‘Syenbat ¢ } Temminalor Description ] or the end of a Signffes the beginning program Denotas.a process to be done like adiiton or tobe made default is from left to right and top to battom Use the a set of hyperfinks between two “i process shape and a separate flowchart page | Process assignment of a variable Oo ons |store f_/ InpuvOuleuteperation | Signifles dala input or output er ‘Arow Indicates the logic flew’s direction. The. Cc) On-paye Connector [use to connect flowcharts that excaed-2 single page LJ copage Connect | D2585012 flowchart or between 2 Si that shows the steps in that sub-process Print "Below Freezing” o Simple Flowchart for Classifying Temperature, The flowchart on the previous page solves the problem of determining whether the temperature is below freezing or above freezing point. As you can see, the flowchart started from Start terminater. Next is the parallelogram symbol which indicates the process of getting the input “temperature? An arrow after it leads to 3 diamond symbol which signifies that a decision must be made, this time it must be answered by Yes or No, which the corresponding answer would lead ta another paratlelogram symbol that signifies an output. After getting the desired output, a flowchart must end again with a terminator. Let us now relate the Program Development Process we learned in the past lessor. in creating flowchart or pseudocades, Generally, making pseudocodes and flowchart for a specific system or application falls In the process of Planning and used again for Documentation processes. Planning is the first stage of the Program Development Process while Documentationis the fourthand second to the last stage. For thislesson, we will discuss the relationship of Planning stage with regards to creating flowcharts and pseudocodes. ‘wHaT (ISTHE RELATIONSHIP OF FLOWCHARTS AND PSEUDOCODES IN PLANNING? Identifying System Specification and Requirements In this substage of Planning, the needed description of the system. or application is acquired. Purposes, system and user Interfaces, database requirements, quallty standards, operations, overview of the whole application, and other requirements needed for the project development is defined, This substage helps the programmers as well as the clients. in foreseeing the scope and limitation of the application to be made. After identifying all the needed details, programmers can now create the application or system's pseudocode and flowchart, Creating the Applicable Diagram Based on the Acquired Requirement This substage Is ail about creating flowcharts and pseudocodes based on the Tequirements acquired from the previous substage, specifically from the identifying the system and user Interface as well as the database requirements. From those given data, programmers may now start creating the applicable diagram that will serve as the blueprint for the logical processes of the system Itself, . Obtaining Design Documentation Design documentation |s the written description of the overall design or architecture of the system to be made, Imagine this substage as creating the architecture ofa building and the system or application is the building itself It has four parts: Responsibllity-driven design, Architectural Design, User Interface Design, and Procedural Design, * — Responsibility-driven Design - describes the roles of each object in the user interface and the information they share, + Architectural Design - establishes the input and Output flaw of the program. Flowchart-making is one of the components of this design. * — User-Interface Design — focuses on user's interaction towards GUI. * Procedural Design — lets the programmers use the praposed system’ flowchart ‘or pseudocode and translate them into code.