Report: Program Design with Algorithms, Pseudocode, and Flowcharts

Verified

Added on  2022/01/20

|23
|8028
|191
Report
AI Summary
This report provides a comprehensive overview of the program creation process, focusing on the use of algorithms, pseudocode, and flowcharts. The report details the role of algorithms in defining step-by-step instructions for a program, highlighting their use in program design and the importance of clear, step-by-step processes. It then explores pseudocode as an informal method for describing a program's procedure, emphasizing its role in planning code and identifying potential issues before coding begins. Finally, the report discusses the use of flowcharts to visually represent a program's process, underscoring their importance in ensuring that essential steps are included in the final program. The report also touches on procedural programming, detailing its sequential execution of tasks and comparing it to object-oriented programming. The student's program design steps involving algorithm creation, pseudocode, and flowcharts are included.
Document Page
Report on Creation of Program
During programming and in programming terms, algorithms are commonly used in
the building of coding applications and defined in programming and overall are an
essential part/component which is used in programming. Algorithms are typically
defined as the rules involved in the process of, or it could also be classed as the
step-by-step instructions, which is used by the computer and would be followed
when they are running the program or when computer code is being wrote down and
used in the design stage of making programs. Algorithms firstly are to be followed as
step-by-step instructions (which they are known in coding terms as ‘procedures’)
which work by following the process which occurs, firstly it would start by having an
input into the program then the procedure occurs when the code uses a method to
try and output the result, ending in the final output occurring at the end of the
algorithm. Algorithms are commonly used to maintain or view the flow of the program
and to show how the overall program would work and to show each step which
would occur when the program is running and working from the start to finish until
the program is closed. Like previously mentoined algorithms can also be used in the
designing of programs/applications because they allow users to have a guide on how
they would want their overall program to work because algorithms are formulated in
the step-by-step format which allow them to be followed and it would give a
breakdown on the overall process involved.
Algorithms which get created are not to be used as computer code itself, it is mainly
used to show the overall procedure which is what the program will be based on and
to show the breakdown of what would be the computer code running be like and how
it would perform because it would show the process of working by going down each
step. The steps which would also be wrote in clear English instead of in coding
language because it makes the algorithms easy to read in the step by step process
and then that process can be incorporated into the program which is going to be
created. Depending on how big the overall program is which is being created would
overall depend on how big the algorithm is – for example if the program which is
being created has multiple processes which would occur in the program (such as
multiple outcomes) the overall algorithm would be longer and have more steps
included in it.
During the building of my program and creating/building code in general, multiple
different processes are conducted to create the eventual code which is what any
program would run based on. For designing and trying to implement code the
different processes involved to building an application would have different outcomes
in designing of my program. The different processes involved creating an algorithm,
creation of pseudocode and a flow chart diagram being create each diagram which
was used can have different inputs in the eventual designing of my program. An
algorithm is used, like previously mentoined, to show the steps/actions which are
involved in my program from start to finish , I created and used pseudocode as the
informal way of my programs’ description. When making pseudocode it does not
require any programming language to be involved in the process – it instead is used
to summarise the programs procedure but underlines any details which would occur
in the code. Finally I used the design of a flow chart to show the overall process of
my program, this would show the entire process of my code when its running.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Algorithm
Step 1 : Program Start
Step 2 : User credentials are inputted
Step 3 : Depending on any user credentials missing determines whether log in is available
Step 4 : Log in button is clicked
Step 5 : Depending whether log in credentials are correct user logs into system or gets denied
A creation of the algorithm is to show the step by step process involved in my program, like
every other algorithm which get created the program which gets created based on the
algorithm will follow the simple steps which are stated in the algorithm because they are the
rules which have to be followed each time the program is ran and used. Overall this is a
useful step and design of an algorithm to benefit me, which was used in the creation of my
program because it would show the basic steps which would feature in my program and also
overall the steps which would be defined in my program, because these five steps which
feature in the algorithm act as ‘rules’ (which overall is what an algorithm is). Algorithms
overall act as the backbone of any computer program because like previously mentoined it is
the process the computer would take every time the program is ran. I used the algorithm
which I created as well because it is important for me (when starting to create my program)
to know the main steps/rules which would be involved in the overall process – because if my
program didn’t feature any of these steps it would affect the whole program I am planning to
make. Each step which would occur in the algorithm is what the computer would do when
the program is being used.
Pseudocode
Program Start
Insert username (first credential) variable and hold variable
(if log in button is clicked) remaining credentials not entered have to be entered
Insert ID number (second credential) and hold variable
(if log in button is clicked) remaining credentials not entered have to be entered
Insert password (third credential) and hold variable
(if log in button is clicked) remaining credentials not entered have to be entered
Click log in button
(End if) the credentials entered match credentials of already stored variables
else
credentials have to be re-entered to match credentials
Due to pseudocode not being an actual coding language, nor can it be complied with an
executable program because it uses the standard English language and it uses short terms
to write program language which can then be converted into the coding language which is
understood and can be used by the user and the platform they want to code on. I overall
created pseudocode because it is the main reason why pseudocode is commonly made by
users before starting to make any programs/applications , because the use of pseudocode
allows (and would allow me) to plan out the method of my program which I am planning to
create and also to show off the method (in standard English form) to see how my program
would perform and be executed when the actual code is being created. This pseudocode
was created to show the overall code in the standard English language and then allow me to
plan the code I need to make my program and see what I would need in my program (as
clearly stated it would need if statements and to be able to hold variables and have them
stored when other variables, which would be user credentials, are being inserted into the
program). It also allows for any issues which could end up occurring to be outlined before
the creation of the program , so when the overall process does starts it allows for the
minimalist of errors or issues to occur within the code because I am following the method
given to me by the creation of pseudocode.
Document Page
Another step which would occur in the process , and one of the last processes I engaged
with, is the creation of a flow chart. A flow chart is the basic diagram and process which is
involved when my program is running. The flow chart basically shows the overall program
and each step which is involved in the program when it is running and each time it is used it
will follow the same direction – and because flowchart can have other options branching off it
, it is used also to show the other processes which would occur (such as in this scenario if
Access is denied in the system because the user has inputted a wrong detail or if one of the
credentials which have been inputted is wrong). Flow charts are overall important and
beneficial because during the process of making it and also during the process of making my
program , it would be a corner stone and like the pseudocode would compare to when I
needed to see the overall features which would feature in my code because it would allow
me to see each essential steps (and occurrences which could occur) which would feature in
my program and it would also make sure these essential steps are featured in my final
program.
Using all these methods can assist me in the creation of the overall program I want to create
– when creating the overall program/application there are multiple steps which is featured in
this process, and which would occur – the overall process of the creation of a program would
be the identification of what the program is which wanted to be created (such as the
requirements and specification which is included in the program). Then after this has been
decided the next steps then would be identifying a solution, designing it and then eventually
that would lead up coding the overall program which is being created and designed in the
previous stages, these steps are important because without any designs trying to create a
program without any material is hard to do. Finally one of the last stages in the process
would then the program has been created it can be checked to see if it overall works as what
was planned in the previous stages during the designing of it and can have no errors in it,
even though errors would be managed in the creation of the program it would also be
important to test it once it is finally completed to see if it works properly.
Document Page
Procedural programming is a programming paradigm which involves the process of
executing each task in an efficient process which involves each task being marked in a
sequential order which has to complete that task set in that order meaning the process
during procedural programming involves the execution of each line of code in the order they
are in. For example the process would be if there are 4 tasks (for an example) the program
will complete the tasks in order of task 1 at first then task 2 and then task 3 and finally task 4.
When using procedural programming it cannot just jump from task 1 to task 4 directly, unlike
object orientated programming which allows data just to be used immediately without having
to follow any steps. An example of procedural programming techniques would be the use of
loops in a program because the use of loops which would allow a sequence to occur and
loops would have to go through the entire process. This can be changed though by the
choice of the user by including iteration. The types of languages which feature procedural
programming are C, FORTAN or Pascal, which are unknown languages and less commonly
used and harder to code on. Some of the key characteristics which feature in procedural
programming are that when using procedural programming it uses blocks of codes classified
as functions which can only perform the specific tasks which , unlike object-oriented
programming again which uses data and models and can be more expressive and freely
used, procedural programming focuses also focuses on the sequences of actions which
occur and are programmed based on procedures which could occur and each procedure is a
sequence of statements which has a defined purpose in the code.
In object-oriented programming (or it can also be classed as OOP) is a programming
paradigm which uses objects during the programming process instead of simple functions,
like procedural programming. Object Oriented programming it is often used to structure
whatever is being programmed into simple code which can be read. An example of object
oriented programming which would occur would be text boxes which could be used in the
program to produce text which would occur on the program, or any use of any other objects
which can be used or interacted with. The overall language which can be used is the core
ingredient which is included in all .NET frameworks and the types of programming languages
which feature Object-Oriented Programming are C++, Python, C# and especially Java, this
is because when creating programs they are centred on creating objects, manipulating
objects and making the objects work together and is often the most common language to
use and create programs with and would allow users to implement object oriented models.
Object oriented programming is highly more suggested to be used by Microsoft than the
other two coding paradigms, this because the coding paradigm is used on C# which is a
Microsoft designed application. Some of the key features of OOP is that it allows for simple
things in coding to be represented in a more complex variety (such as objects, classes and
variables which would be used), it also allows the use of Polymorphism which can allow for
words used in the code to have different meanings, an example of this would be strings
which can be used in the program, this however is unlike object orientated and event driven
because they are strict with what words can clarify for certain meanings as data and can
allow certain words meaning one specific type.
Event-driven programming (this can also be classed as EDP) is a programming paradigm
which can be used in both procedural programming and object oriented programming
techniques (or it can be classed as its own paradigm) and can also be used as its own
programming paradigm. Event-driven programming works as if something happens is
determined by the input into the program, which is known such as the events which occur in
the program. For example this would be the input in keys being pressed or mouse clicks or
clicking buttons on the program which has been made usen event driven processes. The
types of programming language which would feature Event Driven Programming are Visual
Basic, Visual C++ and Java. When using Event Driven Programming it is being used as
‘architectutral software’ which overall means EDP can be used to implement different
frameworks and work with different frameworks (such as GUI’s) however Object Orientated
is just a coding paradigm. Some of the key features when using Event Driven Programming
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
is that when using it are the language can be used to create programs for services and does
not end up slowing down your computer, as well as other characteristics include features it
uses trigger functions and events which overall mean the program which has been created
using the language would only perform when the event occurs because of the trigger, unlike
the other two coding languages which constantly require an input when being used.
When comparing and contrasting each individual programming paradigm which can be used,
they overall each have different features and contrast to each other in numerous ways and
both have different features. Some of the main differences between all the languages are
that each language focus on different executions of programs being created, this can be
shown because when using procedural programming it rather focuses on the sequential
execution of steps which occur in order during the program, when Object Oriented
programming focuses strictly on objects and data which can be implemented into the
program and Event Driven programs feature just strictly user interfaces. Another difference
between all the languages are that when using the programs to execute actions Procedural
Programming commands are written in linear fashion, this overall means it includes little
detail about what features and also executed in linear fashion however the other two actions
are more in depth but both perform in different ways; such as Object Oriented are just written
to perform a specific task which would be included in the program when Event Driven
actions which could occur are just defined by the events which could occur which could only
occur because of the user using the program, this would also overall affect the difficulty
which could be met when writing code using each coding paradigm because if it offers less
detail and code would have to be typed in more detail to represent data and it would overall
a more in depth coding knowledge and make coding more robust.
Included in my code are examples of
procedural programming – this is one of the
key examples of procedural programming in
my program. In my program this clearly
shows a process of a loop which has to go
through each step to determine the
outcome. In the context of the program is if
the user is missing inputted credentials, one
of these messages would occur. The use of
procedural programming is it allows the
process of going through each option first
before seeing whether the user credentials
which have been included in the log in
system are correct or not.
Document Page
Included in my code is an example of event driven programming , this overall would allow
me to use event driven programming functions (such as inputs, triggers and events). This is
because data which is going to be inputted into my code after (included in the picture above)
would be determined because of the events which could end up occurring in the program –
for example the user credentials which are inputted.
In my code is an example
of object oriented
programming. This is object
orientated because of the
use of text data which
feature in the code. The
feature of text is all the user
credentials which would
feature in the program –
included are the names, ID
numbers and the
passwords which feature
for every user.
Document Page
Program Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//This the soruce code for my program which I have created, the aim of the
program is to act as a log in system
//which asks the user to insert three log in details) and determining whether
the log in details which are inputted
//would determine whether the user would gain access or have their access
denied, other outcomes in the program
//could also occur if the user fails to input the details in at all.
//This is the namespace of the program , the namespace of the program would
also act as the overall name of the
//program which has been created, the namespace would also act as the file
name of the program which is what the program
//would be saved as on the computer. The aim of having the namespace for my
program is it is used to define a user defined
//area for which the program would be saved in.
namespace WindowsFormsApp6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
//This would repersent all the event data which is stored in my
program which I have created , this overall means that any data which would be
used in my program to overall create the
//program and be reperseneted in the program.
//This is the overall main code which woud feature in my program
and what works toward my program being able to function right and overall work
without no errors
//each section is sectioned into areas of how each specific area
of my code would work, how it works and the overall impact it has towards my
program
{
//firstly in my program the strings are included, strings are data
which are used to repersent
//data values in programming that would be reperseneted as text
inputs which would be used in the program
//I have used strings in my program because of my program is using
inputs of data values of text (because I have made a loggin system). The
overall strings which I have used
//repersent the three values in my program which would require
inputs in them when my program is running (the username of the user, their ID
number and their password).
//Included with the strings are included in my program are the
textboxes associated with my program which would mean what each string in the
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
code would repersent in my program. This is because I have made an Event
Driven Program
//each textbox which is included in the program (which is what the
user would type their credentials in) would be classed as an event due to each
box being filled out befoe logging in.
string usernames;
usernames = textBoxusername.Text;
string number;
number = textBoxNumber.Text;
string password;
password = textBoxpassword.Text;
//How the user credentials would be stored in my program would be
used by combinations (or classed as Combos in my program) , each combination
which would be included in the code
//would be the correct combination of the users name, ID number
and their password - to access the system and gain access they would have to
get all the combinations correct (like you
//would see with real user systems) if they however do not enter
the right combinations of details they would not get access into the system ,
because the combination they have inserted
//would not be matching to the combinations which is already
storred.
string[] combos = new string[13];
//each combination which is avaliable in the program is completely
random and no combination which is repersented in the program is the same or
repeated - this can relate to either the user, ID Number or the password
//they are using. The combinations which are in the program work
by having each text input inputted into the text boxes when the program is
running and the '+' is the string operator which combines all the inputted
strings
//each combination in the program is also numbered as an
instruction to list the amount of combinations which feature.
combos[0] = "Alex" + "18217674" + "Chelsea2021*";
combos[1] = "Brad" + "18211136" + "ilovetocode2021";
combos[2] = "Tom" + "19211643" + "supershrews";
combos[3] = "Luke" + "18219659" + "bicycle";
combos[4] = "Dean" + "01010101" + "Deanos12345";
combos[5] = "Dylan" + "18214842" + "Dizzlon123";
combos[6] = "Dave" + "11111111" + "wolves12345";
combos[7] = "Mason" + "19864910" + "MoneyMa$e";
combos[8] = "Romelu" + "17381738" + "BigRomeluWidin";
combos[9] = "Harry" + "13079448" + "party95$";
combos[10] = "Antonio" + "22222222" + "bestCBitw2$";
combos[11] = "Mel" + "19721999" + "db23%";
combos[12] = "John" + "04782198" + "*5tr1k320*";
//the final section determins the overall outcomes of the program
determins the overall outcomes of the program when the inputs are being
calculated - due the amount of different otucomes which could occur
//the for loop would be used. A for loop (or it could also be
classed as a for statement) is used because it is needed for that section of
the program to be repeated numerous times when running, this relates
//to the program because when the for loop is used , everytime the
program is ran and the credentials are inputted , the for loop woud run to
product the final outcome
for (int i = 0; i < combos.Length; i++)
{
//to have for loops to work and product the final outcome, if
statements will have to be used. The use of if statements (and the overall
purpose of an if statement) is to provide an outcome to a program
Document Page
//depending on whether the if statement turns out to be true
(meaning it will produce the outcome which is wanted) however if the if
statement doesn't meet the right outcome a different outcome will be produced
//which is not wanted. The if statements in the program I have
made work by having the correct username, ID number and password inputted. If
they are inputted in that order as stated in the if statement and have the
right
//order compared to the combonations - the user will get
access granted into the system and be classed as 'logged in'.
if ((usernames + number + password) == combos[i]) //the
combination order is in the order of the strings , the use of '==' shows and
determines whether the two strings have the same alligning value (meaning if
they match they would have the same value)
{
textBoxOutput.Text = ("WELCOME");
return;
//if the combinarions are correct - in the remaining
textbox it will show that the user is logged into the system
}
else //The main use of an else statement is it offers an
alternative outcome, the use of the else statement is used in the program to
determine the alternative outcome if the values (which are the user
credentials) don't match and aren't the same as the required combinatioms.
{
if ((usernames + number + password) != combos[i])
{
textBoxOutput.Text = ("ACCESS DENIED");
//If the combinations don't match the final textbox
would produce the message 'ACCESS DENIED' , this works by using the function
'!=' ; this is the opposite to '==' and works in the opposite function to '=='
to show that if the values inputted aren't the same as the combinations
//the outcome is the opposite outcome
}
}
//this function can be used to show the outcomes of the program if
any credentials aren't inputted or missed - following the other procedures of
if the user can have access/log on to the system
//determining on if a user credential isn't included into the
login system and they accidentally log in - it would produce with a message
telling them to include their credentials they have missed
//depending on what credentials they are missing or haven't
included.
}
for (int i = 0; i < combos.Length; i++)
{
if ((usernames) != combos[i])
{
textBoxOutput.Text = ("ENTER ID NUMBER AND PASSWORD");
}
}
for (int i = 0; i < combos.Length; i++)
{
if ((usernames + number) != combos[i])
{
textBoxOutput.Text = ("ENTER PASSWORD BEFORE LOGGING IN");
}
}
for (int i = 0; i < combos.Length; i++)
{
if ((usernames + password) != combos[i])
Document Page
{
textBoxOutput.Text = ("PLEASE ENTER ID NUMBER BEFORE
LOGGING IN");
}
}
for (int i = 0; i < combos.Length; i++)
{
if ((number) != combos[i])
{
textBoxOutput.Text = ("ENTER USERNAME AND PASSWORD");
}
}
for (int i = 0; i < combos.Length; i++)
{
if ((password) != combos[i])
{
textBoxOutput.Text = ("USER CREDENTIALS MUST BE ENTERED");
}
}
}
}
}
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Process of making my program
This is the starting
process of making
my program, firstly
before even starting
my program I have
to open my
application of choice
and programming
language which I
will be using –
which is Visual
Studio. I have been
using visual for a
long period of time
and experienced
using the software.
When opening visual studio, this is the menu I am greeted with. Using this menu I can start
my new project, and when my project is saved on my system it will allow me to access it by
clicking on programs which have been used today, in the past month or older than that. To
start the new program which I start to make I click ‘Create a new project’ - this will bring me
to another menu to choose what project I want to start.
Document Page
Once clicking on ‘Create a new project’ – the menu opens allowing me to choose what kind
of project I want to create. To choose what project the user wants to start they can cycle
through the available languages, platforms and project types which are available on the
software by clicking on the drop down menus. However because I have used the project
template before in the past, I have it pinned to the right of the menu. By clicking on ‘Windows
Forms App’ allows me to create an event driven program in C#.
Once the project opens, the user will be given this menu, from here the creation of the
program can begin. Due to the program which is being created is an event driven application
(which requires events and inputs) and a Windows Form application – the user I given
multiple options and tools to drop onto the form which they can use to create their program.
To search for the tools which you need you can either search the tools you need or just use
the scroll bar to find the tools you need and want to use.
chevron_up_icon
1 out of 23
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]