Assignment 2 - Module 3

.docx

School

Algonquin College *

*We aren’t endorsed by this school

Course

8116

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

5

Uploaded by BarristerFog13090

Report
Samantha-Rae Belanger 041059377 November 19 th 2023 Assignment #2 – Java Programming Structure: Flowchart, Pseudocode Intro to computer Programming 23F_CST8116_472 Prof: Dr. Istiaque Shahriar 1 | P a g e
Samantha-Rae Belanger 041059377 November 19 th 2023 Java Programming Structure: Flowchart, Pseudocode Algorithm W riting an algorithm 1. What steps must be followed when writing a complete algorithm? The first step is determining what you want your code to accomplish, whether it be a task or solving a problem. From there, the second step is to decide on a starting point. To decide on a starting point, you must consider what data is available and where it’s located, which formulas are applicable, the rules to the data being worked with and how the data values relate to each other. The third step is to find the end point of the algorithm. To do so, its beneficial to ask what will be learned from the process, what changes from start to end and what will be added, or no longer exist? The next step is to list the steps from start to finish, using broad steps. The fifth step is to decide how you’ll accomplish each step and incorporate some of the code into the algorithm. The last step is to review the algorithm and evaluate the process. Before using the algorithm to write your program, ensure the following questions are answered. Does your algorithm accomplish the task? Does it have defined inputs/outputs? Is the end goal specific enough? Can any of the steps be simplified? And is your algorithm guaranteed to end with the correct result? If you’re satisfied with the answers to these questions, you’re ready to start writing your program. (Showers, 2023) 2 | P a g e
Samantha-Rae Belanger 041059377 November 19 th 2023 Flowcharts Symbols 2. Which symbols are used for creating flowcharts? The 6 most used symbols for flowcharting are as follows: Symbo l Name Function Circle/ Connector Connects sections of the flowchart. This symbol is useful in a flowchart if information becomes complex or spreads over more than one page. Rectangle/ Process Any internal operations required, such as arithmetic instructions are indicated by the action/process symbol in a flowchart. Parallelogram/ Input/Output Program instructions that take input from input devices and display output on output devices is indicated using this symbol in a flowchart. Oval / Terminal Terminal is the first and last symbol in a flow chart. It indicates the start or end of the flowchart. Diamond/ Decision Represents a decision point in a flowchart. Decision based operations such as yes/no or true/false questions. Arrows/ Flow lines Arrows indicate the direction of the progression of the program. (Geeks for geeks, 2018.) Pseudocode 3. What is Pseudocode? A Pseudocode is a step-by-step description of an algorithm written in plain English. It has no syntax. It is an important part of designing an algorithm as it helps the programmer in planning the solution to the problem as well as the reader in understanding the approach to the problem.(Geeks for geeks, 2019.) 3 | P a g e
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help