

























































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
Get Pass and Merit .......................
Typology: Study Guides, Projects, Research
1 / 65
This page cannot be seen from the preview
Don't miss anything!


























































ASSIGNMENT 2 FRONT SHEET Qualification BTEC Level 1 HND Diploma in Computing Unit number and title Unit: Programming Submission date 24/04/ Date received (1st submission)
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 consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature: Grading grid P2 P3 P4 P5 M2 M3 M
First of all, I would like to extend a special and great thanks to my family for my encouragement, enthusiasm, and invaluable support. Without all of this, I cannot achieve it Secondly, I would like to express my thanks and appreciation to Mr., who enthusiastically guided me to achieve learning results and thank you for his support in the assignment as well as the knowledge that he taught and explained enthusiastically. Besides, I would also like to thank my classmates at BTEC FPT International College for allowing me to exchange knowledge and helping me to understand the issues in this course. In the end, I also express my gratitude to the authors, brothers, sisters, and friends for providing a wealth of knowledge used as references throughout this exercise.
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:
POP Procedural Oriented Programming OOP Object Oriented Programming EDP Event Driven Programming IDE Integrated Development Environment
Programming is one of the subjects for mastering 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, and introducing students to the knowledge of IDE, the functions of the IDE, and some standard rules, rules of naming in code. At the same time, it assists students in learning how to construct fundamental apps.
Disadvantage of POP: The world's data are exposed. Within a software, data can move at will. The position of the data is difficult to establish. Action is the focus of functions. Functions are unable to relate to the problem's components. Real-world issues are impossible to model. Code is made up of interconnected parts. Code from one program cannot be used in another.
Figure 1. Procedure Oriented Programming (POP)
An example of POP: Calculate the average of subjects: Math, Physics, Chemistry Figure 2. Source code Figure 3. The result
Overloading and overriding Figure 4. Different method Overloading and Overriding Advantages of OOP Objects aid in the project's task division. Data concealment can be used to create secure programs. The items may be mapped by it. Enables the categorization of the objects into various classes. Upgrades to object-oriented systems are simple. Inheritance can be used to get rid of redundant codes. Reusability allows for the extension of codes. Increased modularity is possible.
Data abstraction improves accuracy. The dynamic binding concept makes it flexible. Utilizes information hiding to decouple the fundamental specification from its implementation. Disadvantages of OOP More resources are needed. RAM storage is necessary for things with dynamic behavior. When message forwarding is used in complicated applications, detection and debugging are more difficult.
object reuse. Figure 5. Object Oriented Programming (OOP)
2.1.3 Event driven programming (EDP) Definition EDP: Event-driven programming is a programming paradigm in which new user inputs (mouse clicks, keypresses), sensor outputs, or message passing from other programs determine whether a program is executed. In graphical user interfaces and other programs that prioritize performing user actions in response to user input (user clicks), programmers employ event-driven programming. Event-driven programming can alternatively be described as a method of creating computer programs in which the primary event loop of the application is explicitly underlined in the code, the body of which is divided into two parts: fetching the event and event processing. In an application that is event-driven, the main loop keeps an eye out for events and starts a callback function when one is found. Figure 8. Event Driven Programming (EDP) The characteristics of EDP: Service-Oriented: A crucial component of event-driven programming that does not slow down the computer is the service-focused approach. Services typically run in the background of OS and consume very little of the computer's control power.
Time-Driven: Time impacted is a paradigm in motivated event programming. Time-motivated code, which differs from code that runs on a period trigger, can be thought of as specific code that operates at a specified time, such as once every hour, once a week, or once a month. This indicates starting the activity from the pre-set. For instance, the time- driven Home Windows amend is an excellent example, allowing the user to choose when to verify, download, and then amend. Trigger Functions: When using event-driven coding, trigger functions choose what code to execute when a certain event takes place. When a given event occurs, programmers can use these functions to choose the event handler to utilize for the function. Events: Events that must be triggered in this software include mouse, keyboard, and user interface events. This implies that in order to use an object in this application, the user must interact with it. For instance, the user may click a button using a mouse or choose a button using the computer keyboard. The Simplicity of Programming and Ease of Development: Due to its simplicity and ease of programming compared to other types of programming, event-driven programming is particularly aesthetically pleasing. For instance, you could use code to place a button on a form after choosing it and placing it there. The user can include a pre-written code script into an existing application with ease using event-driven programming. It enables the user to stop a running piece of code. It makes utilizing event-driven programming to grow simple. Advantages of EDP
1. Flexibility When using event-driven programming, changes can be made by the programmer with little effort. The programmer can create their requirements under this paradigm.