Qualification Module Number and Title: Coursework
Qualification Module Number and Title: Coursework
17/11/2021 10/01/2022
Assessment type Duration/Length of Weighting of Assessment
Assessment Type
Report and Software
Coursework Submission 100%
(3000 words)
Learner declaration
Marks Awarded
First assessor
IV marks
Agreed grade
Introduction to programming
. Programming is the process of writing computer code in order to construct a program or solve a
problem. Algorithms are implemented using programs. Algorithms can be expressed as
pseudocode or a flowchart, and programming is the process of converting these into computer
programs.
To instruct a computer, a program must be designed that tells it exactly what to do and how to
accomplish it. If an algorithm has been designed, the computer program will follow it step by
step, telling the computer exactly what to do.
Programming Methodologies
When programs are created to address real-world issues such as inventory management, payroll
processing, student admissions, examination result processing, and so on, they tend to be large
and sophisticated. Programming technique refers to the way to assessing such complicated
problems, planning for software development, and controlling the development process.
Abstraction
Objects only expose internal mechanisms that are necessary for the use of other objects, while
masking any extraneous implementation code. The functionality of the derived class can be
expanded. This notion can make it easier for developers to make further adjustments or additions
over time.
Inheritance.
Code from other classes can be reused by classes. Relationships and subclasses can be assigned
to objects, allowing developers to reuse common logic while yet keeping a distinct hierarchy.
This OOP property forces a more complete data examination, shortens development time, and
provides a greater level of accuracy.
Polymorphism
Objects are designed to share behaviors and they can take on more than one form. The program
will determine which meaning or usage is necessary for each execution of that object from a
parent class, reducing the need to duplicate code. A child class is then created, which extends the
functionality of the parent class. Polymorphism allows different types of objects to pass through
the same interface.
Controlling Structures
• Control structures are vital in computer programming, and if the programmer has to make any
changes to the flow of structures controlling the computer application, this part would be
employed.
1. Selection Structures
2. Repetition Structures
Selection Structures
IF Statement
This statement allows you to monitor the flow of your software by deciding which code to
execute. This declaration allows you to track if a program enters a code section or whether it is
true or false based on a given circumstance. As a result, it enables the software to select an action
based on the user's feedback.
IF else
If there is a circumstance and the condition is correct, you must execute a block of code and then
execute another piece of code if the condition is incorrect. This is possible in C++ by utilizing
the if-else statement.
Nested else if
When an If statement is nestled inside another If statement, it is referred to as a nested else if
statement.
Switch Case
This statement is employed when we have multiple scenarios and need to conduct different acts
based on the situation. If we have numerous conditions and one of them is met, we must create a
block of statements. In this example, we employ a simple form known as the switch case.
Repetition Structures
For Loop
Use the for loop instead of the while loop when you know exactly how many times you want to
cycle through a block of code.
Eg;
Set the value of a variable to 1 and display it 10 times when the number 1-10 is displayed,
increasing its value by 1 for each loop iteration.
While Loop
It is assessed here until the condition returns false to see if it is valid. If the condition returns
false, the control exits the loop and, after a little delay, proceeds to the next statement in the
program.
Do While Loop
• The condition is assessed once the assertion inside the loop has been executed.
• If the condition returns positive, the power is transferred to more repeating "do" executions
of it before the condition returns false, which will occur again. As soon as the condition
returns, false control jumps to the next assertion in the program following do-while.
Modularization
Modularization. The ability to combine together some lines of code into a unit that may be
used in our application. Function. What are modules named in today's two most popular
programming languages, C++ and Java?
Modular programming or modularization is the process of subdividing a PC software into
distinct sub-programs to improve the maintainability and readability of the code and to make
the framework available to make any future changes or to remedy faults.