INTERNATIONAL INFORMATION TECHNOLOGY COLLEGE BTEC FPT HAS SIGNED 2 PROGRAMMING UNITS STUDENT NGUYEN THANH DAT. The above article was made by me and got a high score, you can read and refer to it. I sincerely thank you
BTEC FPT INTERNATIONAL COLLEGE INFORMATION TECHNOLOGY ASSIGNMENT UNIT: PROGRAMMING STUDENT : NGUYEN THANH DAT CLASS : IT05101 STUDENT ID : BD00118 SUPERVISOR : NGUYEN HOANG ANH VU DANANG, AUGUST 2022 ASSIGNMENT FRONT SHEET Qualification BTEC Level HND Diploma in Computing Unit number and title Unit: Programming date Date received (1st submission) Resubmission date Date received (2nd submission) Submission 14/08/2022 Student name NGUYEN THANH DAT Student ID Class Assessor IT050101 14/08/2022 BD00118 NGUYEN HOANG ANH VU 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: DAT Grading grid P2 P P4 P5 M2 M3 M4 PERFOMED STUDENT: NGUYEN THANH DAT ❒ Summative Feedbacks: ❒Resubmission Feedbacks: Grade: Assessor Signature: Date: Internal Verifier’s Comments: Signature & Date: PERFOMED STUDENT: NGUYEN THANH DAT ACKNOWLEDGMENTS First of all, I would like to thank my mentor Nguyen Hoang Anh Vu for his constant support in my studies and research, for his patience, motivation, enthusiasm and rich knowledge His guidance has helped me throughout the time of studying and writing this thesis Without your wonderful help, I would not have been able to achieve this In addition to my mentor, I would like to thank my friends who have helped me improve my knowledge of my subject Not only that, they are always there to support me when I need it And besides, I would like to thank the school for creating all conditions for me to have adequate facilities to help me complete my work Last but not least, I would like to thank my family: my parents who gave birth to me from the beginning and supported me spiritually They are always behind to care and help me have more motivation to complete the work well PERFOMED STUDENT: NGUYEN THANH DAT ASSURANCE I declare that this is my work, based on my research, and that I have recognized all materials and sources utilized in its production, including books, papers, reports, lecture notes, and any other type of document, electronic or personal communication I further declare that I have not previously submitted this assignment for assessment in any other unit, except where explicit permission has been granted by all unit coordinators involved, or at any other time in this unit, and that I have not duplicated or st olen ideas from the work of others in any was Declaration of the learner I verify that the work I've submitted for this assignment is all my own, and that all research sources have been properly credited Signature of the student: DAT Date: 17/08/2022 PERFOMED STUDENT: NGUYEN THANH DAT TABLE OF CONTENT ASSIGNMENT FRONT SHEET .i ACKNOWLEDGMENTS iii ASSURANCE iv TABLE OF CONTENT v LIST OF TABLES AND FIGURES viii INTRODUCTION xi CHAPTER 2: PROBLEMS RELATED TO PROGRAMMING METHODS AND IDE 1 Give explanations of what procedural, object-oriented and event-driven paradigms are; their characteristics and the relationship between them (P2) 1.1 Procedural paradigm 1.1.1 Definiton: 1.1.2 Characteristics: 1.1.3 Give examples: 1.2 Object – Oriented paradigm .3 1.2.1 Definition: 1.2.2 The characteristics of OOPs: 1.2.3 Data Abstraction 1.2.4 Data Encapsulation: 1.2.5 Inheritance .10 1.2.6 Polymorphism 12 1.3 Event – driven paradigm 15 1.3.1 Definition: 15 1.3.2 The characteristics of EDP: .15 1.4 Advantages, disadvantages of the models 16 PERFOMED STUDENT: NGUYEN THANH DAT 1.5 Relationship between Procedural, Object – oriented and Event – driven paradigms 17 Write a program that implements an algorithm using an IDE (P3) 17 2.1 These are source codes: 18 2.2 Testing: 20 Explain the debugging process and explain the debugging facilities available in the IDE (P4)22 3.1 Definition Debugging 22 3.2 Debug process 22 3.3 The following are some of the most frequent bugs techniques: 23 3.4 Here are some examples of form errors: 27 Integrates many programs such as code completion, compiler, editor Outline the coding standard you have used in your code (P5) 30 4.1 Variable: 30 4.1.1 Variable names are named as follows: 30 4.2 This function's name is: 30 4.3 Indent: .31 4.4 There are several different methods in Winform, for naming objects: 31 4.5 Scenario: 31 4.6 Issues: .32 4.7 Idea: 32 4.8 Describe the idea of the program algorithm: 32 Analyze the common features that a developer has access to in an IDE (M2) .36 5.1 What is an IDE? .36 5.2 Components of IDEs .37 5.2.1 Debugger 38 PERFOMED STUDENT: NGUYEN THANH DAT 5.2.2 Source code editor 39 5.2.3 Windows Forms Designer 40 5.3 Benefits of using IDE .41 5.4 Benefits of IDEs for programmers 42 Use the IDE to manage the development process of the program.(M3) 42 6.1 Step 1: Start C# and use a project with Console App (.NET Framework) .43 6.2 Step 2: Create a Form by clicking Project->Add Form (Windows Forms) .44 6.3 Step 3: Add Button, Label, and Textbox and edit as you like 45 6.4 Step 4: Add code to make buttons work 45 6.5 Step 5: Back to the program, you must add Using System.Windows.Forms to run the program and add a command line Application.Run(new Login()) to allow it to run the Form program that we created 46 6.6 Step 6: Run the program and test the functions to see if there are any errors .46 6.7 Step 6: Complete error test and deliver the project 47 Evaluate how the debugging process can be used to help develop more secure, robust applications.(M4) 47 7.1 Debugger Security 47 7.2 Security Best Practices 48 7.3 Managed Debugging Security 48 7.4 Remote Debugging Security 48 CONCLUSION 51 REFERENCES .52 LIST OF TABLES AND FIGURES PERFOMED STUDENT: NGUYEN THANH DAT Figure 1-1: Paradigm Figure 1-2: Flowchart Figure 1-3: Code Figure 1-4: Definition Figure 1-5: Class and Object .4 Figure 1-6: Class Figure 1-7: Data Abstraction .6 Figure 1-8: Code Abstraction Figure 1-9: Encapsulation Figure 1-10: Code Encapsulation Figure 1-11: Inheritance 10 Figure 1-12: Inheritance 11 Figure 1-13: Polymorphism 12 Figure 1-14: Polymorphism 14 Figure 1-15: driven paradigm 15 Figure 1-16: Login .16 Figure 2-1: Form .18 Figure 2-2: Plus 18 Figure 2-3: Minus 18 Figure 2-4: Multipy 19 Figure 2-5: Split 19 Figure 2-6: Delete .19 Figure 2-7: Exit 19 Figure 2-8: Program 20 Figure 2-9: testing .21 PERFOMED STUDENT: NGUYEN THANH DAT Figure 2-10: Invalid Value 21 Figure 3-1: Debug .22 Figure 3-2: Debug process .23 Figure 3-3: bugs 24 Figure 3-4: Bugs CS0103 25 Figure 3-5: Error declaring variable 26 Figure 3-6: Login .27 Figure 3-7: Bug 28 Figure 3-8: Fix bug 28 Figure 3-9: Form login 29 Figure 3-10: Bug 29 Figure 3-11: Fix bug 30 Figure 4-1: Name objects 31 Figure 4-2: Form Login 33 Figure 4-3: Source code of form login 33 Figure 4-4: Account management form 34 Figure 4-5: Change password 35 Figure 4-6: Change phone number 35 Figure 4-7: Source code changes information 36 Figure 5-1: IDE 37 Figure 5-2: Types of IDES 37 Figure 5-3: Visual Studio 2022 38 Figure 5-4: Debuggers 39 Figure 5-5: Code .40 Figure 5-6: Form .41 PERFOMED STUDENT: NGUYEN THANH DAT value of any variable is displayed when the mouse pointer is moved over it It can also be altered in the legend ("data annotation") if desired During developing, Visual Studio's debuggers allow you to manually launch various functions from the Immediate tool window The method's parameters are available in the Immediate windows Figure 5- 48: Debuggers 5.2.2 Source code editor - Source code editor is a text editor that may help you write software code by highlighting syntax with visual cues, giving language-specific auto-completion, and checking for problems as you type In Visual Studio, it features a code editor that supports syntax highlighting and code completion for not just variables, functions, and methods, but also language elements like control loops and queries The autocomplete recommendations appear in a list box on top of the code editor For all supported languages, code editors are utilized Setting bookmarks in code for easy navigation is also supported by the Visual Studio code editors In addition to normal text and Regular Expression search, further navigation aids include code block narrowing and incremental search A multi-item clipboard and a to-do list are also included in the code editors Code editors allow you to save repetitious code for subsequent use in source code Visual Studio builds it in the background to offer feedback on syntax and compilation issues, which are shown by a red wavy underlining Background compilation does not produce executable code since it necessitates the use of a compiler different than the one used to produce executable code 43 PERFOMED STUDENT: NGUYEN THANH DAT Figure 5- 49: Code 5.2.3 Windows Forms Designer - Layouts are used to design graphical user interfaces (GUIs) They can be developed within the control panel or locked to the side of the template Data projection controls (such as text boxes, list boxes, and so on) can be linked to source data like databases or queries Control data restrictions may be added to the surface design by dragging objects from the source data window onto it The model is built up using an event coded command connected with the user interface The designer constructs the application in C# or VB.NET 44 PERFOMED STUDENT: NGUYEN THANH DAT Figure 5- 50: Form 5.3 Benefits of using IDE - Integrated development environments help developers be more productive These IDEs boost productivity by minimizing setup time, accelerating development activities, and keeping developers up to date on the newest best practices, threats, and standards simplify the development process so that everyone may take part - Faster setup: Many development tools not have an IDE interface, thus programmers must spend time setting them By integrating the IDE, programmers may have the same set of skills in one location without having to switch tools all the time - Faster development tasks: Improved developer productivity results from tighter integration of development responsibilities Developers, for example, may parse and validate syntax while editing, providing fast feedback when syntax mistakes arise Programmers not need to switch between programs to complete their tasks Furthermore, IDE tools and features assist programmers in organizing resources, avoiding errors, and implementing shortcuts - Continuous Learning: Another advantage is the opportunity to stay current and educated The IDE's help articles, for example, are continually updated, as are new templates, project templates, and other features Developers that are continually learning and upgrading best practices are more likely to contribute value to their team and the organization, increasing productivity - Standardization: It also streamlines the development process, allowing developers to collaborate effortlessly, and assisting new recruits in getting up to speed so they can succeed 45 PERFOMED STUDENT: NGUYEN THANH DAT 5.4 Benefits of IDEs for programmers - Serves as a centralized environment for most development requirements, such as version control systems, debugging tools, and so on - The capacity to swiftly propose and complete instructions and code - Check for errors and indicate error locations at particular lines of code automatically - Developers may simply make modifications to their source code or projects thanks to refactoring features - Project management system, source code, and the integration of several big database management systems - It is compatible with a wide range of operating systems, including Windows, Linux, and Mac - Many IDEs allow users to expand and add additional features according on their needs and projects - Create a large number of software, apps, or games for mobile and desktop platforms Use the IDE to manage the development process of the program Use the IDE to manage the development process of the program.(M3) - To use the IDE, you must ensure that it supports the language you are working in In this section, I will write programs that use the C# programming language and Visual Studio to manage them - The first step is to install Visual Studio This is an IDE known for its ability to develop applications To use new features, we need to upgrade to the latest version I am using visual version 2022 in this section Figure 6- 51: C# 46 PERFOMED STUDENT: NGUYEN THANH DAT 6.1 Step 1: Start C# and use a project with Console App (.NET Framework) - After selecting the language, operating system and programming system, We named the workspace, Choose a folder to save it in, Choose the right frame, Click "create" to have the IDE build the workspace for us Figure 6- 52: Project 47 PERFOMED STUDENT: NGUYEN THANH DAT 6.2 Step 2: Create a Form by clicking Project->Add Form (Windows Forms) - Name the form then click add it will open a new form for us to edit Figure 6- 53: Form 48 PERFOMED STUDENT: NGUYEN THANH DAT 6.3 Step 3: Add Button, Label, and Textbox and edit as you like - Name and fine-tune the placements so they're nice and easy to use Figure 6- 54: Add 6.4 Step 4: Add code to make buttons work - Add code for the add, subtract, multiply, divide, delete and exit buttons so they can their thing Figure 6- 55: Code 49 PERFOMED STUDENT: NGUYEN THANH DAT 6.5 Step 5: Back to the program, you must add Using System.Windows.Forms to run the program and add a command line Application.Run(new Login()) to allow it to run the Form program that we created Figure 6- 56: Add code program 6.6 Step 6: Run the program and test the functions to see if there are any errors 50 PERFOMED STUDENT: NGUYEN THANH DAT Figure 6- 57: Run the program 6.7 Step 6: Complete error test and deliver the project 51 PERFOMED STUDENT: NGUYEN THANH DAT Evaluate how the debugging process can be used to help develop more secure, robust applications.(M4) 7.1 Debugger Security - The ability to debug another process offers you extraordinarily broad rights that you would not otherwise have, particularly when debugging remotely Malicious debuggers can, for all intents and purposes, cause a great deal of damage to the computer being debugged, or so it was thought However, basically many developers mostly are not aware that security risks can also specifically be directed in the sort of opposite direction in a subtle way Malicious code in the debugging process particularly has the for all intents and purposes potential to compromise the security of the debugger: there really are really many security exploits to mostly be aware of, which generally is fairly significant 7.2 Security Best Practices - There is an implicit trust relationship between the code you are debugging and the debugger If you are willing to debug something, you should also be willing to execute it The basic line is that you must be able to trust what you are debugging If you can't trust it, don't debug it, or debug it on a system you can afford to risk and in an isolated environment On production devices, debugging should be deactivated to decrease the possible attack surface Debugging should never be left on forever for the same reason 7.3 Managed Debugging Security - Some general advice for any controlled debugging: - When you attach to an untrusted user's process, you implicitly presume that it is trustworthy When you attempt to attach to the process of an untrusted user, a security warning dialog box confirmation will show, asking if you wish to attach to the process You and a collection of standard users often specified on computers with the.NET Framework installed, such as aspnet, localsystem, networkservice, and localservice, are examples of "trusted users." - When obtaining a project from the Internet and importing it into Visual Studio, use caution Even without debugging, this is a highly dangerous thing to When you this, you are presuming that the project and the code included within it are reliable 7.4 Remote Debugging Security - In general, local debugging is safer than remote debugging The overall surface area that may be probed grows with remote debugging In remote debugging, the Visual Studio Remote Debugging Monitor (msvsmon.exe) is utilized, and there are various security guidelines for setting it Because No Authentication mode is unsafe, Windows Authentication is the ideal approach to configure the authentication mode When utilizing Windows Authentication mode, keep in mind that providing an untrusted user permission to connect to msvsmon is risky since the person gains access to all of your 52 PERFOMED STUDENT: NGUYEN THANH DAT rights on the machine hosting msvsmon Debug an unknown process on a remote system: there might be vulnerabilities that impact the machine executing the debugger or compromise msvsmon If you must debug an unfamiliar process, try doing it locally and using a firewall to keep any possible dangers contained In my opinion, the following debugging techniques can be used to aid in the development of safer, more resilient applications: Step 1: Look in the error list table for declared errors Figure 7- 58: Look in the error list table for declared errors Step 2: View the warning to see what problems may have occurred Figure 7- 59: View the warning to see what problems may have occurred Step 3: The program fails, it will display a red underscore at the foot, check for errors Figure 7- 60: Check for errors Step 4: Declaring the wrong Dharma book needs to be re-declared with the above Dharma book 53 PERFOMED STUDENT: NGUYEN THANH DAT Figure 7- 61: Fix Step 5: The error is gone and run the program again to check if the error is still there 54 PERFOMED STUDENT: NGUYEN THANH DAT CONCLUSION After completing this report, I have a better understanding of algorithms, creating forms for programs, how to draw flowcharts and how to execute a program It helps me better understand how surrounding devices work I find it very interesting because I have learned the things in the report Many thanks to my mentors 55 PERFOMED STUDENT: NGUYEN THANH DAT REFERENCES (1) https://vi.wikipedia.org/wiki/L%E1%BA%ADp_tr%C3%ACnh_th%E1%BB%A7_t%E1%BB %A5c 56 PERFOMED STUDENT: NGUYEN THANH DAT ... multiply button Figure 2- 20 : Multipy Code of the split button Figure 2- 21 : Split Code of delete button Figure 2- 22 : Delete Code of exit button Figure 2- 23 : Exit 23 PERFOMED STUDENT: NGUYEN... .3 1 .2. 1 Definition: 1 .2. 2 The characteristics of OOPs: 1 .2. 3 Data Abstraction 1 .2. 4 Data Encapsulation: 1 .2. 5 Inheritance .10 1 .2. 6 Polymorphism... Debugging 22 3 .2 Debug process 22 3.3 The following are some of the most frequent bugs techniques: 23 3.4 Here are some examples of form errors: 27 Integrates many