ASM1 Programming get a Pass and a Merit, Study Guides, Projects, Research of Information Technology

Hope you guy get well score ...

Typology: Study Guides, Projects, Research

2021/2022

Uploaded on 10/23/2023

lam-djoan
lam-djoan 🇻🇳

5

(1)

2 documents

1 / 36

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24

Partial preview of the text

Download ASM1 Programming get a Pass and a Merit and more Study Guides, Projects, Research Information Technology in PDF only on Docsity!

BTEC FPT INTERNATIONAL COLLEGE

INFORMATION TECHNOLOGY

ASSIGNMENT 1

UNIT: NETWORKING

STUDENT :

CLASS :

STUDENT ID :

SUPERVISOR :

DaNang, April 2023

ASSIGNMENT 1 FRONT SHEET Qualification BTEC Level 4 HND Diploma in Business Unit number and title Unit: Programming Submission date 7/4/2023 Date received (1st submission) 14/4/ Re-submission date Date received (2nd submission) Student name Student ID Class Assessor name Student declaration I certify that the assignment submission is entirely my own work and I fully understand the con- sequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature: Grading grid P1 M1 D

TABLE OF CONTENTS

ACKNOWLEDGMENTS ............................... Error! Bookmark not defined.

ASSURANCE ............................................... Error! Bookmark not defined.

LIST OF TABLES AND FIGURES .............................................................. 5

INTRODUCTION .......................................... Error! Bookmark not defined.

CHAPTER 1: ALGORITHMS, ISSUES RELATED TO ALGORITHMS AND

BASIC PROGRAMMING ............................................................................. 6

1.1. Provide a definition of what an algorithm is and outline the process in

building an application. (P1) ...................................................................... 6

1.2. Define Algorithms. ............................................................................ 6

1.3. Ways to demonstrate algorithms. ....................................................... 8

1.3.1. Pseudocode. ................................................................................... 8

1.3.2. Flowchart. ....................................................................................... 9

1.4. Characteristic of Algorithm.............................................................. 13

1.4.1. Advantage of Algorithm ................................................................. 14

1.4.2. Disadvantage of Algorithm ............................................................ 15

1.4.3. Steps to write a good algorithm ..................................................... 15

1.4.4. Qualities of a Good Algorithm ....................................................... 15

1.5. The process in building an application. ............................................ 16

1.5.1. Example of the software development life cycle: Solve quadratic

equation .................................................................................................. 17

CONCLUSION .......................................................................................... 22

CRITICAL EVALUATION .......................................................................... 35

REFERENCES .......................................................................................... 36

LIST OF TABLES AND FIGURES

  • Figure 1. Algorithms
  • Figure 2. Pseudocode
  • Figure 3. Flowchart
  • Figure 4. Symbols in drawing algorithm
  • Figure 5. Example
  • Figure 6. Example
  • Figure 7. Characteristic of an algorithm
  • Figure 8. The software development life cycle
  • Figure 9. Program design
  • Figure 10. Flowchart design
  • Figure 11. Source code
  • Figure 12. Before and After debug code
  • Figure 13. Before and After debug code
  • Figure 14. a = 1, b = 2, c = -
  • Figure 15. a = 0, b = 0, c = 0.....................................................................
  • Figure 16. a = - 1, b = 2, c =
  • Figure 17. Development
  • Figure 18. Maintainance

 Step 2: Remove from burner. Cover pan. Let egg stand in hot water about 12 minutes.  Step 3: Drain immediately and serve warm, or cool completely under cold, then refrigerate. 1.3. Ways to demonstrate algorithms. 1.3.1. Pseudocode.Define: A pseudocode is defined as a step-by-step description of an algorithm. Pseudocode doesn't represent itself using any programming languages; instead, it employs plain English text that is written for human comprehension rather than machine interpretation.

Figure 3. Flowchart  Some symbols in drawing algorithm flowcharts:

Figure 4. Symbols in drawing algorithm  Here are two examples of flowcharts in algorithm: Find the largest among three different numbers entered by the user:

Figure 6. Example 2 1.4. Characteristic of Algorithm.Input: An algorithm requires some input values. An algorithm can be given a value other than 0 as input.  Output: At the end of an algorithm, you will have one or more outcomes.  Unambiguity: A perfect algorithm is defined as unambiguous, which means that its instructions should be clear and straightforward.

Finiteness: An algorithm must be finite. Finiteness in this context means that the algorithm should have a limited number of instructions, i.e., the instructions should be countable.  Effectiveness: Because each instruction in an algorithm affects the overall process, it should be adequate.  Language independence: An algorithm must be language-independent, which means that its instructions can be implemented in any language and produce the same results. Figure 7. Characteristic of an algorithm 1.4.1. Advantage of AlgorithmEasy to understand: An algorithm is a stepwise solution that makes the program easy and clear. Thus this helps it be easy to read and understand.  Debugging is easy: It makes the algorithm easier when it is solved step by step and makes it easy for the programmer to debug.  Easy to manage: if we want to create a computer program, then making an algorithm help to create the program by making a flowchart after creating the algorithm.

 An algorithm should be written so that it can be used in other programming languages. 1.5. The process in building an application.

1. Problem analysis: This step involves identifying the problem that needs to be solved and determining the requirements for the software application. 2. Program design: In this step, a detailed plan is created for how the software application will work. This includes creating flowcharts and diagrams to illustrate how the program will function. 3. Coding: This step involves writing the actual code for the software application. 4. Testing and debugging: Once the code has been written, it is tested to ensure that it works as expected. Any issues or bugs are identified and fixed during this step. 5. Documentation: Documentation is created to help users understand how to use the software application. 6. Maintenance: After the software application has been released, it is important to maintain it by fixing any issues that arise and updating it as needed. Figure 8. The software development life cycle

1.5.1. Example of the software development life cycle: Solve quadratic equation

- Step 1: Analysis. Create a program that will help students solve quadratic equation quickly and smoothly. There will help three situations: A. If discriminant is greater than 0, the roots are real and different. B. If discriminant is equal to 0, the roots are real and equal. C. If discriminant is less than 0, the roots are complex and different. - Step 2: Program design. To solve the problem, we will use Visual Studio 2022 and the C# programming language to design program. Flowchart: Figure 9. Program design

Figure 11. Source code

  • Step 4: Testing and debugging.

 The first, I will start program to debug code, the program will run and find any problems:  I have some problems at three line that is two line in 33 and another in 36  The next, I will fix it by click on the line have error code: Figure 12. Before and After debug code Figure 13. Before and After debug code  After finish step debug code, then I will test the program: