logo

Unit 1: Programming Submission PDF

36 Pages7565 Words62 Views
   

Added on  2022-01-15

Unit 1: Programming Submission PDF

   Added on 2022-01-15

ShareRelated Documents
ASSIGNMENT 1 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing
Unit number and title Unit 1: Programming
Submission date Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Student ID
Class RT7 Assessor name
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Student’s signature
Grading grid
P1 M1 D1
1
Unit 1: Programming Submission  PDF_1
2
Unit 1: Programming Submission  PDF_2
Summative Feedback: Resubmission
Feedback:
Grade: Assessor Signature: Date:
Lecturer Signature:
1
Unit 1: Programming Submission  PDF_3
2
Unit 1: Programming Submission  PDF_4
Table of Contents
I. Introduction.........................................................................................................................5
II. Algorithm.............................................................................................................................5
1. Definition of algorithm....................................................................................................6
2. The characteristics of an algorithm..................................................................................7
3. Advantages and disadvantages of algorithm....................................................................8
4. Algorithm for Simple Problem........................................................................................8
III. Business problems.........................................................................................................11
1. Definition of business problems....................................................................................11
2. Steps for problem solving..............................................................................................11
2.1 Analyzing the problem...........................................................................................12
2.2 Developing an algorithm........................................................................................12
2.3 Coding....................................................................................................................12
2.4 Testing and Debugging...........................................................................................12
3. Solve business problems by algorithms.........................................................................13
3.1 Analyze the problem...............................................................................................13
3.2 Function..................................................................................................................15
IV. Demonstrate application...................................................................................................21
1. Demonstrate and run program.......................................................................................21
2. SDLC and source code...................................................................................................29
V. Evaluation problem...........................................................................................................31
1. Test plan and test case....................................................................................................31
2. Evaluation how to solve problems from algorithms......................................................33
VI. Conclusion........................................................................................................................33
VII. References......................................................................................................................34
3
Unit 1: Programming Submission  PDF_5
Table of figures
Figure 1. What is algorithm?......................................................................................................6
Figure 2. Properties of algorithm................................................................................................7
Figure 3. Shapes or symbol to draw flow charts.........................................................................9
Figure 4. Flowchart to calculate square of a number................................................................10
Figure 5. Code to calculate square of a number........................................................................10
Figure 6. The result of the algorithm to find the square of a number.......................................10
Figure 7. Step for problem solving...........................................................................................12
Figure 8. Operation diagram of the program............................................................................14
Figure 9. Variables and data types............................................................................................15
Figure 10. Menu of system.......................................................................................................15
Figure 11. Flowchart Main menu..............................................................................................16
Figure 12. Flowchart Input Student..........................................................................................18
Figure 13. Flowchart Print information of student...................................................................19
Figure 14. Flowchart function Rank.........................................................................................20
Figure 15. Flowchart function Average....................................................................................21
Figure 16. Flowchart function Pass..........................................................................................21
Figure 17. Main menu...............................................................................................................22
Figure 18. Menu result..............................................................................................................23
Figure 19. Code function input.................................................................................................24
Figure 20. Code function print..................................................................................................24
Figure 21. Input data.................................................................................................................24
Figure 22. Function input..........................................................................................................25
Figure 23. Result of function print............................................................................................26
Figure 24. Code function rank..................................................................................................26
Figure 25. Result of unction rank.............................................................................................27
Figure 26. Code of function average.........................................................................................27
Figure 27. Result of function average.......................................................................................28
Figure 28. Code function pass..................................................................................................28
Figure 29. Result of function pass............................................................................................29
Figure 30. Exit program............................................................................................................29
Figure 31. C# code compilation................................................................................................30
Figure 32. Test plan..................................................................................................................31
Figure 33. Test case..................................................................................................................32
4
Unit 1: Programming Submission  PDF_6
I. Introduction
Algorithm is a concept of Mathematics and Informatics. The study of algorithms is very
important in computer science in general, or software programming in particular. My report
will provide a definition of what an algorithm is and outline the process in building an
application.
My assignment includes 4 parts:
First, I need to provide an overview about Algorithm with image illustration,
explanation and example. Next, I will represent a small and simple problem, why it is
needed to be solved and how an algorithm could help to solve it.
Secondly, I will analyze the business problem and turn it into application requirements
Thirdly, you have to demonstrate how the application is implemented by using
suitable programming language.
Finally, I will evaluate how the problem is solved from the designed algorithm to the
execution program written by a specific programming language.
II. Algorithm
Can you think of a day in your life which goes without problem solving? Of course, the
answer to this question is, No. In life, we are bound to solve problems. In our daily activities,
such as buying something from a general store and paying, depositing money in school or
withdrawing money from a bank account. All of these activities involve some kind of problem
solving. It can be said that any activity that a human or a machine performs to achieve a
particular goal is accompanied by problem solving. To make it clearer, let us look at some
other examples.
Example 1: If you are watching a news channel on your TV and you want to change it to a
sports channel, you need to do something i.e., move to that channel by pressing that channel
number on your remote. This is a kind of problem solving.
Example 2: If someone asks to you, what time is it? So, seeing the time on your watch and
telling him is also a way of solving the problem.
Now, broadly we can say that problem is a kind of barrier to achieve something and problem
solving is a process to get that barrier removed by performing some sequence of activities.
If you can solve a given problem then you can also write an algorithm for it.
In next section we will learn what is an algorithm.
5
Unit 1: Programming Submission  PDF_7
1. Definition of algorithm
Algorithm is one of the foundations of programming. There are many definitions of
algorithms, such as:
Algorithm can be defined as: “A sequence of activities to be processed for getting desired
output from a given input.”
Webopedia defines an algorithm as: “A formula or set of steps for solving a particular
problem. To be an algorithm, a set of rules must be unambiguous and have a clear stopping
point”. There can be many ways to solve a problem, so there can be more than one algorithm
for a problem.
Now, if we take definition of algorithm as: “A sequence of activities to be processed for
getting desired output from a given input.” This is why algorithm refers to a set of
rules/instructions that define step by step how to do work to achieve an expected result.
Figure 1. What is algorithm?
Thus, the entire algorithmic flowchart will have three main components:
Input: What we already know or things we have to start with.
Algorithm: A set of sequenced steps that we need to follow one by one.
Output: The expected results we need to achieve in the end.
Algorithms take in zero or more inputs and give back one or more outputs. A recipe is a good
example of an algorithm because it tells you what you need to do step by step. It takes inputs
(ingredients) and produces an output. For instance, the Coffee Maker Algorithm would run
something like
Turn on Coffee Maker
Grind Coffee Beans
Put in filter and place coffee in filter
Add Water
Start brewing process
Drink coffee.
In computer programming, algorithms are often created as functions. These functions serve as
small programs that can be referenced by a larger program. For example, an image viewing
application may include a library of functions that each use a custom algorithm to render
6
Unit 1: Programming Submission  PDF_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Object-Oriented Programming Implementation and Testing
|51
|4099
|332

The assignment submission is entirely my own work and I understand the consequences of plagiarism
|75
|6901
|487

Database Design & Development Assignment 2
|75
|6962
|200

Object Oriented Programming: Advanced Scientific Calculator Design and Implementation
|57
|6282
|499

Unit 43: Internet of Things PDF
|43
|9819
|457

Distributed Control Systems : Assignment
|6
|720
|106