




































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This report covers the basics of algorithms, flowcharts, and the program development cycle. It explores algorithm characteristics, flowchart usage, and the program development process. The document also examines the three main programming paradigms, their definitions, and relationships. It demonstrates algorithm implementation using an IDE, debugging, and coding standards. The report concludes with a restaurant program simulation, showcasing the practical application of the concepts covered.
Typology: Summaries
1 / 44
This page cannot be seen from the preview
Don't miss anything!





































Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date 13th June 2024 Date Received 1st submission 13th June 2024 Re-submission Date Date Received 2nd submission Student Name
Student ID
Class Assessor name Mr. VO DUC HOANG 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 P2 P3 P4 P5 P6 M1 M2 M3 M4 D1 D2 D3 D
ii Secondly, I also highly appreciate Mr. Vo Duc Hoang for his lectures and instructions which are a rich resource in knowledge for me to reference. Thirdly, a vast thankfulness goes to all my BTEC friends for the remarkable periods of time we have been experienced. Last but not least, I spectacularly express my deep gratitude to all the authors that have provided extensively the immense wisdom to be used as the reference materials throughout this document.
iii
I confirm that this report is my work relied on my research and study. I will take completely the responsibility and acknowledge the consequences if there are any proofs of plagiarism. Learners declaration I certify that the work submitted for this assignment is my own and research sources are fully acknowledged. Student signature: Date:
v
2.1 Programming paradigms........................................................................... 58 2.1.1 Definitions and characteristics of programming paradigms and their relationship (P2).......................................................................................................... 58 2.1.2 Critically evaluate the source code of an application which implements the programming paradigms, in terms of the code structure and characteristics. (D2) 63 2.2 Integrated Development Environment (IDE).............................................. 2.2.1 Use the IDE to manage the development process of the program (Visual Studio 2017) (M3)............................................................................................ 68 2.2.2 Common features of an IDE (Visual Studio 2017) (M2)........................ 75 2.2.3 Evaluate the use of an IDE for development of applications contrasted with not using an IDE (D3)........................................................................................... 84 CHAPTER 3 LO4 Debugging process and Coding standard............................... 3.1 Debugging process.................................................................................... 3.1.1 The debugging process and how it works in the Visual Studio (P4)..... 87 3.1.2 How the debugging process be used to help develop more secure, robust applications (M4).............................................................................................. 91 3.2 Coding standard........................................................................................ 93 3.2.1 The coding standard I have used in my code. (P5)............................... 93 3.2.2 The reason why a coding standard is necessary in a team as well as for the individual (D4)........................................................................................................ 99 CHAPTER 4 Implement basic algorithms in code using an IDE........................ 100 4.1 About my program................................................................................... 4.1.1 Test case and explanation.................................................................. 100 4.1.2 Enhancement......................................................................................
vi
Table 1: Differences of procedural, object-oriented and event-driven paradigms.............. 58 Table 2: List of prefix of Controls in EDP............................................................................
ix Figure 3.5: Example of prefix controls name in my program.............................................. 89 Figure 3.6: Example of layout conventions in my program................................................. Figure 3.7: Example comment convention in my program................................................. 91 Figure 4.1: frmWelcome – Enjoy and Login button’s code................................................. 93 Figure 4.2: The code of checking input in frmPaymentMethod.......................................... 94 Figure 4.3: Two functions of checking name and card number.......................................... Figure 4.4: frmUseService – Display table of food code................................................... Figure 4.5: frmUseService – Delete button’s code........................................................... 106 Figure 4.6: frmUsingService – Print Bill button’s code...................................................... Figure 4.7: frmUsingService – Exit button’s code............................................................. Figure 4.8: frmPaymentMethod – Transfer data part........................................................ Figure 4.9: frmUseService – Transfer data part............................................................... 110 Figure 4.10: frmPay – Get data and display information’s code....................................... Figure 4.11: frmPay – Pay button’s code.......................................................................... Figure 4.12: frmPay – Exit button’s code.......................................................................... Figure 4.13: frmAdminLogin – whole code....................................................................... 116 Figure 4.14: frmAdminControl – menu Access’s code...................................................... Figure 4.15: frmAdminControl – End the program code...................................................
PDC (^) Program development cycle LLL (^) Low-Level Languages/ Machine Languages MLL Middle-Level Languages/ Assembly Languages
Perfomed Student: Nguyen Nhat Huy 1
This report will bring to you the basic knowledge about algorithm, flowchart and the steps of developing a complete program and discuss meticulously the steps taken from writing code to execution and the relationship between the written algorithm and the code variant. It also explains 3 types of Programming paradigm and their relationships, common features of Integrated Development Environment, debugging process and code standard. Furthermore, it’s the evaluation when using and not using of an IDE, the reasons debugging process help applications more secure, robust and the important of a coding standard toward a team and the individual. Finally, it’s the implement of CIAO applications – a simulate sequence of restaurant program for indolent people to enjoy a fast, convenience and proper dinner!
Perfomed Student: Nguyen Nhat Huy 2 CHAPTER 1 Define basic algorithms to carry out an operation and outline the process of programming an application.
An algorithm is a set of clear and precise steps or rules designed to solve a specific problem or perform a particular task. Algorithms are commonly used in computer science and mathematics, but they can also be applied in various other fields
1.1.1.1 Algorithm definition As you can see, algorithm in computer science is briefly considered as a limited sequence of steps of actions related to mathematical and deductive logic expresses the process, which can be computation, data-processing or others, of finding solution for a problem and gives the predictable result based on the initial entered data or parameters. Just simplify problems as how to make a cup of coffee. To do that, we go through steps of things such as boil the water, put power of coffee into cup, pour water and stir. We need coffee, water as the ingredients and have a fragrant cup of coffee as the result. Continue, mathematical problems can be “Print the phrase “Hello World”.”, “What is the maximum of a range?”, “Solve the first order and second order equation.”… Additional, there are several types of algorithms: Numerical algorithms. Algebraic algorithms. Geometric algorithms. Sequential algorithms. Operational algorithms. Theoretical algorithms.
Perfomed Student: Nguyen Nhat Huy 4 Figure 1.1: Step 1 of solving a life problem {1} Step 2: Marinate the chicken for at least an hour, preferably overnight. Figure 1.2: Step 2 of solving a life problem {2} Step 3: Turn on the microwave to 200 degrees Celsius and set it for about 15 minutes. Line the tray with a silver sheet and place the chicken on it neatly. Roast the chicken for about 10 minutes. Then, take the chicken out and brush another layer of honey on the outside. Continue to grill for about 10 more minutes to complete the dish Figure 1.3: Step 3 of solving a life problem {3} Step 4: Take it out on a plate and enjoy it
Perfomed Student: Nguyen Nhat Huy 5 Figure 1.4: Step 4 of solving a life problem {4} 1.1.1.4 For example an algorithm solving a math problem
the program. S2: Input n (n > 1), create a variable named prd, prd = 1. S3: if n = 1 then moving to S4, else n = n – 1, prd = prd * n, continue S3. S4: Print prd to the screen. S5: End the program.
Perfomed Student: Nguyen Nhat Huy 7 (^1) https://www.lucidchart.com/pages/what-is-a-flowchart-tutorial They are related to other popular diagrams, such as Data Flow Diagrams (DFDs) and Unified Modeling Language (UML) Activity Diagrams.” 1 We can understand it simply as: In IT (Information Technology), flowcharts are a pictorial way to describe algorithms. They are highly appreciated as it is more straightforward to follow the structure though pictures than though words. In addition, it is nearly effortless to draw a flowchart which is complex and difficult and alter it into programming language. A flowchart’s basic elements are a set of symbols (containing messages) which has standard samples established for a number of different applications and interconnecting lines with arrows. 1.1.2.2 Some common symbols using in a flowchart The Oval (A beginning or an ending)
The oval, also referred to as terminator, is usually used to represent the start and end of a process. The shape frequently contains “Start” and “End” within. It highlights the beginning-point and finishing-point of the program. Parallelogram (Input/ Output symbol)
The Input/ Output symbol, also known as the “Data Symbol”, represents to declare variables or generated data needed for the task and show the output usually by printing commands.
Perfomed Student: Nguyen Nhat Huy 8 The Rectangle (A step in the flowcharting process)
The rectangle, or the decision symbol, shows an act in your diagram. It can be a process, an action, or a function. The Diamond (Indicate a decision)
This illustrates a question or a decision which is required to choose to move forward. This will get the value true or false, yes or no dependent on the answer or consequences thereafter. To exemplify, here is a simple command to find the minimum of 2 numbers: if a < b, min = a. In this case, the condition is “a < b”, if the value of a less than the value of b (true), the program will execute the main part by min equivalent to a, if it’s not (false), the program won’t do anything. The Arrow (Indicate Directional Flow)
The most ordinary use of arrow in reality is to guide humans to the destination. In a flowchart, arrows have the similar advantage which is to lead the viewer though the flowcharting