BTEC FPT INTERNATIONAL COLLEGE INFORMATION TECHNOLOGY ASSIGNMENT 2 UNIT: PROGRAMMING STUDENT : LE TRAN QUOC BAO CLASS : IT05102 STUDENT ID : BD00033 SUPERVISOR : NGUYEN HOANG ANH VU DaNang, August 2022 ASSIGNMENT 2 FRONT SHEET Qualification BTEC Level 4 HND Diploma in Computing Unit number and title Unit: Programming Date received (1st Submission date 14/8/2022 14/8/2022 submission) Date received (2nd Re-submission date submission) Student name LE TRAN QUOC Student ID BD00033 BAO Class Assessor name NGUYEN HOANG ANH IT05102 VU 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: LE TRAN QUOC BAO Grading grid P2 P3 P4 P5 M2 M3 M4 D2 D3 D4 Summative Feedbacks: Resubmission Feedbacks: Grade: Assessor Signature: Date: Internal Verifier’s Comments: Signature & Date: i ACKNOWLEDGMENTS First of all, I would like to express a special and enormous thanks to my family for their invaluable encouragement, enthusiasm, and support. Without all of this, I couldn't have achieved it Second, I would like to sincerely thank teacher NGUYEN HOANG ANH VU for enthusiastically supporting me to achieve my academic results and thanking him for his support in the exercises as well as the knowledge that he taught and taught.
solve whole- heartedly.Besides, I would also like to thank my friends at BTEC FPT International College for allowing me to exchange knowledge and help me understand the issues in this course. Finally, I would also like to thank the authors, brothers, sisters and friends who have pro- vided a lot of knowledge to use as references throughout this exercise. ii ASSURANCE I certify that this assignment is my work, based on my study and that I have acknowledged all material and sources used in its preparation, whether they be books, articles, reports, lecture notes, and any other kind of document, electronic or personal communication. I also certify that this assignment has not previously been submitted for assessment in any other unit, except where specific permission has been granted from all unit coordinators involved, or at any other time in this unit, and that I have not copied in part or whole or otherwise stealing ideas the work of other persons.
Learners declaration I certify that the work submitted for this assignment is my own and research sources are fully acknowledged. Student signature: Date: LE TRAN QUOC BAO iii TABLE OF CONTENT INSTRUCTOR/ SUPERVISOR/ ASSESSOR .III TABLE OF CONTENT. IV LIST OF TABLES AND FIGURES .VIII CHAPTER 2 PROBLEMS RELATED TO PROGRAMMING METHODS AND IDE. 1 LO2 Explain the characteristics of procedural, object-oriented and event driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE)….1 Give explanations of what procedural, object-oriented and event-driven paradigms are;their characteristics and the relationship between them.1 Procedure-Oriented Programming(POP) .2 Event-driven programming .3 Object-oriented programming (OOP)… .4 Characteristics of the programming models… .5 What is the difference between procedural programming (POP) and object-oriented programming (OOP)….2 Analyze the common features that a developer has access to in an IDE(M2)… .2 Basic features of common IDE… .3 Benefits of IDE for programmers….
13 CHAPTER 3 IDE problems, debugging procedures, and coding standards…. 14 LO3 Implement basic algorithms in code using an IDE. 14 LO4 Determine the debugging process and explain the importance of a coding standard 14 3.1 Write a program that implements an algorithm using an IDE(P3) .2 Use the IDE to manage the development process of the program(M3)….3 Evaluate the use of an IDE for development of applications contrasted with not using an IDE(D3)… .1 Explain the debugging process and explain the debugging facilities available in the IDE(P4)… .2 Evaluate how the debugging process can be used to help develop more secure, robust applications(M4)…. 38 Critically evaluate why a coding standard is necessary in a team as well as for the individ- ual(D4)… .1 Outline the coding standard you have used in your code(P5)….
52 v LIST OF TABLES AND FIGURES Table 2-1 Compare POP and OPP .9 Table 3-1: Some coding standard…. 36 Figure 2-1 Example for Procedural programming. 5 Figure 2-4 Object Oriented Programming (OOP)…. 5 Figure 2-5 algorithm results….
8 Figure 2-10 Example about text editor in Visual studio…. 11 Figure2-11 This is a debugger in Visual studio. 11 Figure2-12 Debugging in Visual studio…. 12 Figure2-13 Debugging in Visual studio….
12 Figure 2-14 Several languages are supported in Visual Studio…. 13 Figure 3-1 Main interface. 15 Figure 3-2 Create new project… .16 Figure 3-3 Main Form. 17 Figure 3-4 Adding elements to form.18 Figure 3-5: Element properties….
22 Figure 3-6 Example of IDE project…. 23 Figure 3-8 Create a new project or open project…. 24 Figure 3-9: Create a new project…. 25 vi Figure 3-10: Choose project templates….
26 Figure 3-11: Set the name of the new project and select a framework. 26 Figure 3-12: Introduce workspace in Visual studio…. 27 Figure 3-13 count the factorials from 1 to n. 28 Figure 3-15: Create a new item in Visual studio.
28 Figure3-16: Create a new class…. 29 Figure3-17 Workspace of class in Visual Studio…. 29 Figure3-18 Set breakpoint in Visual studio…. 30 Figure3-19 How to follow the program.
30 Figure3-20 Some IDEs. 36 Figure3-23 Program has error…. 39 Figure3-24 IDE debugger find error. 39 Figure3-25 The program is out of error.
40 Figure3-26 For example. 41 Figure 3-27 The program has a line of code with the wrong keyword. 41 Figure 3-28 Symbolic of Coding standards…. 46 Figure 3-29 Form Design.
47 Figure 3-30 Code Form. 48 Figure 3-31 Finish form. vii INTRODUCTION Programming is one of the subjects to master the knowledge base, understanding programming models such as procedural programming, object-oriented programming, and event-oriented programming, the structure of a program, data, basic data, at the same time to introduce to students the knowledge of IDE, the functions of the IDE and some standard rules, rules of naming in code. At the same time, it helps students gain knowledge to build basic applications.
This report includes the following: CHAPTER 2 PROBLEMS RELATED TO PROGRAMMING METHODS AND IDE. LO2 Explain the characteristics of procedural, object-oriented and event driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE). CHAPTER 3 IDE problems, debugging procedures, and coding standards. LO3 Implement basic algorithms in code using an IDE.
LO4 Determine the debugging process and explain the importance of a coding standard viii CHAPTER 2 PROBLEMS RELATED TO PROGRAMMING METHODS AND IDE. LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE).1 Give explanations of what procedural, object-oriented and event-driven paradigms are;their characteristics and the relationship between them. People who do programming work are called programmers. Using available code, programming languages, and utilities, they build, debug, or improve programs, applications, games, software, websites, processing systems, and more.
Help users interact with each other through electronic devices or execute commands with computers.1 Procedure-Oriented Programming(POP): POP is a way to establish information. Procedural programming is the main focus for completing tasks sequentially supporting the concept of procedure calling Procedures (regular form or subroutine) simply contain a series of steps Calculations be done. Save control of the program's organizational flow. If the program is extensible, it is structured in a number of small units called functions, which share data system-wide.
A function: Structured Programming (POP) is a programming technique that divides a large program into many small programs, and the programs are analyzed into several parts to complete a large program called a function. Each function will take on a different function in the system. The small process will be done until the function is simplified. This purpose is to simplify the structure of the program.
For example: Create a recursive function to calculate the factorial of a number The first is to create the main function: 1 Perfomed Student LE TRAN QUOC BAO When running the program will get results. Figure 2-1 Example for Procedural programming.2 Event-driven programming: Event-oriented programming is a method of building a system based on developing a graphical interactive interface through objects and defining the behavior of the system through the events of the objects In software development, events -driven programming is a programming model in which all business logic is performed in the program's source code. The program's runtime flow will be determined based on events. Events here can be: Click the button on the screen Press the key on the keyboard Hover Timeout Receive sensor output signal Receive messages from other programs or threads … For example: Generate electricity bill.
2 Perfomed Student LE TRAN QUOC BAO Figure2-6: Abstraction. Encapsulation: This property does not allow the user of the object to change the internal state of an object. Only the internal methods of the object allow to change its state. How the external environment is allowed to affect an object's internal data is entirely up to the coder.
This property ensures the integrity of the object. Inheritance: This property allows an object to have properties that another object already has through inheritance. This allows objects to share or extend existing properties without having to redefine them. However, not all object-oriented languages have this property This means that the parent class can share data and methods among classes.
Subclass from must be DEFINITION, outsiders can extend inherited elements and add new ones. Reuse source code Optimize one way, make use of source code. 8 Perfomed Student LE TRAN QUOC BAO Polymorphism: Expressed through sending messages (message). Sending these messages is comparable to calling the internal functions of an object.
The methods used to respond to a message will respond differently depending on the object to which the message is sent. The programmer can define a property (by method names, for example) for a series of close-by objects, but when implemented using the same name, the implementation of each object will be automatic. occurs according to the characteristics of each object without confusion.5 What is the difference between procedural programming (POP) and object-ori- ented programming (OOP). BASIS FOR POP OOP COMPARISON Basic Procedure/Structure oriented.
Approach Top-down. Basis Main focus is on "how to get the task done" Main focus is on 'data security'. on the procedure or structure of a objects are permitted to access the entities program. Division Large program is divided into units called Entire program is divided into objects.
9 Perfomed Student LE TRAN QUOC BAO BASIS FOR POP OOP COMPARISON Entity accessing No access specifier observed. Access specifier are "public", "private", mode "protected". Overloading or Neither it overload functions nor operators. It overloads functions, constructors, and Polymorphism operators.
Inheritance Their is no provision of inheritance. Inheritance achieved in three modes public private and protected. Data hiding & security There is no proper way of hiding the data, so Data is hidden in three modes public, data is insecure private, and protected. hence data security increases.
Data sharing Global data is shared among the functions in Data is shared among the objects through the program. the member functions. Friend functions or No concept of friend function. Classes or function can become a friend of friend classes another class with the keyword "friend".
Note: "friend" keyword is used only in c++ Virtual classes or No concept of virtual classes. Concept of virtual function appear during virtual function inheritance. Example C, VB, FORTRAN, Pascal C++, JAVA, VB. Table 2-1 Compare POP and OPP.
10 Perfomed Student LE TRAN QUOC BAO 2.2 Analyze the common features that a developer has access to in an IDE(M2).1 IDE definition: IDE (short for Integrated Development Environment) integrated environment used to write, develop code for applications.