























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Pearson BTEC HND in Computing Unit 1: Programming
Muhammad Abdullah Abbasi Miss Qurat-ul-Ain
object-oriented code with a particular IDE.
you run into any problems.
consideration (e.g. illness).
The rules of the college will be followed in cases of plagiarism. You must sign the following declaration to certify that this assignment is your original creation:
I attest that the work I've turned in for this assignment is all mine, and all of my research sources have been properly cited. Student signature: Date: Content
The object-oriented programming language plays an important role in the Human interface. It provides the different components that take the real-world objects and perform the action on them that produce the live interactions between humans and machines. Some features of OOP are Being faster and easier to execute Make it easier to reuse the code Giving a programme a clear structure Making the code simpler to edit, debug, and maintain
In 2020, 80% of all business-related digital applications will be required to employ a real-time, event-based strategy, according to Gartner. "Events" are activities that can be user-generated in event-driven programming, such as button clicks, mouse events, and graphic movement choices. On the basis of the event handling procedure, events also relate to the decision-making process. You’ve just pressed a key (text editor) A loan application has either been accepted or denied (commercial business) Approval of Wall Mart account (account verification) A pattern of unlawful trade has been discovered (fraud detection) In a video game, an automobile strikes another vehicle (racing game) A robot has arrived at its location (real-time warehouse management) Event programming is an approach used in the early stages of product development, not a technology or programming language. In essence, it disentangles an application's event- processing logic from the rest of the code.
“Class is the predefined definition of the method and variable which can be accessed by object and object is the instance of a class that contains real values and inputs.” Multiple classes are used to manipulate the problem but it can handle by inheritance. Inheritance is the part of classes that can relate classes with each other and reduce the complexity level
An algorithm is just a series of steps used to carry out a certain activity. It serves as a foundation for programming. A programming language was used to create the pseudocode, structural diagram, and flowchart that make up the algorithm. An algorithm has the qualities of clarity, fineness, effectiveness, and language independence. 1.1.1 Algorithm Features:
Method to sort above array from Heap sort Total Nodes= 11 Last non-leaf node index=(11/2)-1= Last non-leaf node = To heapify use nodes are “1, 3, 5, 4, 6” in reverse order Heapify 6: Swap 6 and 17 Heapify 4: Swap 4 and 9 Heapify 5: Swap 13 and 5 1 3 4 9 8 17 15 6 5 13 10 1 3 9 4 8 17 15 6 5 13 10
Heapify 3: Swap 3 and 17, again Swap 3 and 15 Heapify 1: Swap 1 and 17, again swap 1 and 15, Last swap 1 and 6 1 3 9 4 8 17 15 6 13 5 10 1 17 9 4 8 15 3 6 13 5 10 17 15 9 4 8 6 3 1 13 5 10
Imperative programming is essentially the polar opposite of declarative programming. In order to decide how to compute, the user typically directly modifies the state of the computer in imperative programming. Here is an illustration of the paradigm that made this programming approach popular: Procedural Programming Object Oriented programming Parallel Processing. 2.1.2 Declarative Programming Declarative programming specifies the properties of the desired outcome without describing how it was calculated, as opposed to precisely specifying what the computer should be doing at any particular moment. Examples of paradigms include Logical Programming Functional Programming Database Processing 2.2 Procedural Model Programing A sequence of computing steps is divided into modules according to the procedural programming paradigm. This implies that the code is organized into functions and is run sequentially, one step at a time. To basically instruct the computer to perform a specific action at each step, it combines serial code. This paradigm lends itself to the modularization of code, which is often accomplished. Pros of Procedural Programming: General Programming Code Reusability Portable source code Cons of Procedural Programming: Privacy Unsuitable for real thing
Hard to write 2.3 Object-Oriented Concepts. When programming the solution, we use an object-oriented paradigm that focuses on the actual physical objects. Representing the outside world in code is the goal of object-oriented software. Problems are broken down into smaller components called objects in the object-oriented paradigm, and systems are built around objects. The representations of real-world things that we model in computer systems are called objects. The following are some traits of object-oriented programming: 2.3.1 Encapsulation Data is inherited from the external interface by encapsulation and safety protected. These user- defined data types are called “CLASSES” and “OBJECT” are instances of classes. 2.3.2 Abstraction Ability to present data abstractly and completely without details. By eliminating the superfluous aspects of objects, abstraction facilitates the notion of real objects. 2.3.3 Inheritance Encapsulation Inheritance Polymorphism Abstraction OOPS Concept
weather forecasts, sports scores, and other information. The Characteristics of Event-driven Programming are as follows,
A feature of programming that continuously checks for external events and invokes the proper procedures to handle them. The event loop, which is frequently the program's primary loop, typically waits for a user action to initiate something. The first software engine in this encyclopedia's main loop is shown in the example below. The main loop, which is built in Turbo C, continuously evaluates inputs, mouse events, and menu choices.
3.1 Implementation of Tic Tac Toe Game in different IDE 3.1.1 Code in Python IDE:
Output C++
3.1.2 Code in C# IDE: