0% found this document useful (0 votes)
24 views64 pages

E172797 1683396459171 191092 Programming

The document outlines the internal verification process for assessment decisions related to the Higher National Diploma in Computing, specifically focusing on a student's assignment to design and implement a GUI-based system. It includes a checklist for internal verifiers to ensure assessment criteria are met, along with detailed assignment guidelines, learning outcomes, and grading rubrics. Additionally, it emphasizes the importance of adhering to academic integrity and proper referencing to avoid plagiarism.

Uploaded by

umairfaisal1227
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views64 pages

E172797 1683396459171 191092 Programming

The document outlines the internal verification process for assessment decisions related to the Higher National Diploma in Computing, specifically focusing on a student's assignment to design and implement a GUI-based system. It includes a checklist for internal verifiers to ensure assessment criteria are met, along with detailed assignment guidelines, learning outcomes, and grading rubrics. Additionally, it emphasizes the importance of adhering to academic integrity and proper referencing to avoid plagiarism.

Uploaded by

umairfaisal1227
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title Higher National Diploma in Computing

Assessor Ms.Vishmi Internal Verifier

Unit(s)

Assignment title Design & Implement a GUI based system using a suitable Integrated
Development Environment
Student’s name Umair Faisal
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief? Y/N

Is the Pass/Merit/Distinction grade awarded


justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed Y/N
accurately?
Is the feedback to the student:
Give details:
• Constructive?
• Linked to relevant assessment criteria? Y/N
• Identifying opportunities for Y/N
improved performance? Y/N
• Agreeing actions? Y/N

Does the assessment decision need Y/N


amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date
Confirm action completed
Remedial action taken
Give details:

Assessor signature Date

Internal Verifier
Date
signature

Programme Leader
Date
signature (if required)
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Umair Faisal (E172797)
Unit Title Design & Implement a GUI based system using a suitable Integrated Development
Environment
Assignment Number Assessor Miss.Vishmi
12/28/2022 Date Received 1st
Submission Date
submission

Re-submission Date Date Received 2nd


submission
Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
Pass, Merit & Distinction Descripts P1 M1 D1

LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a
Integrated Development Environment (IDE).
Pass, Merit & Distinction Descripts P2 M2 D2

LO3. Implement basic algorithms in code using an IDE.

Pass, Merit & Distinction Descripts P3 M3 D3

LO4. Determine the debugging process and explain the importance of a coding standard.

Pass, Merit & Distinction Descripts P4 P5 M4 D4

Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.
Assignment Feedback
Formative Feedback: Assessor to Student
Action Plan

Summative feedback

Feedback: Student to Assessor

Assessor Date
signature
05/06/2022
Student Date
signature

Pearson Higher Nationals in


Computing
Unit 01: Programming
Assignment 01

General Guidelines

1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing your
assignment.

Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late submissions
will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You
will then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation
and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course

Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present it
as my own without attributing the sources in the correct way. I further understand what it means to
copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any of
the assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program, will
be my own, and where I have made use of another’s work, I will attribute the source in
the correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document
is not attached to the attached.

05/06/2022

Student’s Signature:
Date:
(Provide E-mail ID) (Provide Submission Date)
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number Umair Faisal (E172797)

Unit Number and Title Unit 01: Programming

Academic Year 2021/22

Unit Tutor Miss.Vishmi

Assignment Title Design &Implement a GUI based system using a


suitable Integrated Development Environment

Issue Date

Submission Date

IV Name & Date

Submission Format

This submission will have 3 components


1. Written Report
This submission is in the form of an individual written report. This should be written in a
concise, formal business style using single spacing and font size 12. You are required to
make use of headings, paragraphs and subsections as appropriate, and all work must be
supported with research and referenced using the Harvard referencing system. Please also
provide a bibliography using the Harvard referencing system. (The recommended word
count is 1,500–2,000 words for the report excluding annexures)

2. Implemented System (Software)


The student should submit a GUI based system developed using an IDE. The system should
connect with a backend database and should have at least 5 different forms and suitable
functionality including insert, edit and delete of main entities and transaction processing.

3. Presentation
With the submitted system student should do a presentation to demonstrate the system that
was developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides
while doing the presentation, but live demonstration of the system is required. Evaluator
will also check the ability to modify and debug the system using the IDE.

Unit Learning Outcomes:

LO1. Define basic algorithms to carry out an operation and outline


the process of programming an application.

LO2. Explain the characteristics of procedural, object-orientated and


event-driven programming, conduct an analysis of a suitable
Integrated Development Environment (IDE).
LO3. Implement basic algorithms in code using an IDE.

LO4. Determine the debugging process and explain the importance


of a coding standard
Assignment Brief and Guidance:

Activity 1

A. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the
recurrence relation.
Fn = F n-1 + F n-2

B. Factorial of a non-negative integer, is multiplication of all integers smaller than


or equal to n. For example, factorial of 6 is 6*5*4*3*2*1 which is 720.
n! = n * (n - 1) * …….. 1

Define what an algorithm is and outline the characteristics of a good algorithm.


Write the algorithms to display the Fibonacci series and the factorial value for a
given number using Pseudo code. Determine the steps involved in the process of
writing and executing a program.
Take a sample number and dry run the above two algorithms. Show the outputs at
the end of each iteration and the final output. Examine what Big-O notation is and
explain its role in evaluating efficiencies of algorithms. Write the Python program
code for the above two algorithms and critically evaluate their efficiencies using
Big-O notation.

Activity 2

2.1 Explain what is meant by a Programming Paradigm and the main


characteristics of Procedural, Object oriented and Event-driven paradigms and
the relationships among them. Write small snippets of code as example for the
above three programming paradigms using a suitable programming
language(s). you also need to critically evaluate the code samples that you
have given above in relation to their structure and the unique characteristics.

Activity 3 and Activity 4 are based on the following Scenario.

Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel &
tour company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to
vans.
The vehicles that it owns are hired or rented with or without a driver. The tariffs are
based on the vehicle type. Some of the vehicle types that it operates are, small car,
sedan car, SVUs, Jeep (WD), 7-seater van and Commuter van. New vehicle types are
to be added in the future.

Vehicle rent and hire options are described below.

1. Rent (With or without driver) – For each type of vehicle rates are given per day,
per week and per month. Rate for a driver also given per day. Depending on the
rent period the total rent amount needs to be calculated. For example: if a vehicle
is rented for 10 days with a driver, total amount to be calculated as follows:

Total rent = weeklyRent x 1 + dailyRent x 3 + dailyDriverCost x 10

2. Hire (with driver only) – These are based on packages such as airport drop, airport
pickup, 100km per day package, 200km per day package etc. Standard rates are
defined for a package type of a vehicle typeif that is applicable for that type of
vehicle.For each package maximum km limit and maximum number of hours
arealso defined. Extra km rate is also defined which is applicable if they run
beyond the allocated km limit for the tour. For day tours if they exceed max hour
limit,a waiting charge is applicable for extra hours. Driver overnight rate and
vehicle night park rate also defined which is applicable for each night when the
vehicle is hired for 2 or more days.

Activity 3

Function 1: Rent calculation.


Return the total rent_value when vehicle_no, rented_date, return_date, with_driver
parameters are sent in. with_driver parameter is set to true or false depending whether
the vehicle is rented with or without driver.

Function 2: Day tour - hire calculation.


Calculate total hire_value when vehicle_no, package_type, start_time, end_time,
start_km_reading, end_km_reading parameters are sent in. Should return
base_hire_charge, waiting_charge and extra_km_charge as output parameters.

Function 3: Long tour - hire calculation.


Calculate total hire_value when vehicle_no, package_type, start_date, end_date,
start_km_reading, end_km_reading parameters are sent in. Should return
base_hire_charge, overnight_stay_charge and extra_km_charge as output parameters.

Write suable algorithms for vehicle tariff calculation for rents and hires.
Ideally 3 functions should be developed for this purpose as above. Use the
visual studio IDE (using C#.net) to Implement the above algorithms and
design the suitable database structure for keeping the tariffs for vehicle types
and different packages which must be used for implementing the above
functions.
Analyze the features of an Integrated Development Environment (IDE) and
explain how those features help in application development. Evaluate the use
of the Visual StudioIDE for your application development contrasted with not
using an IDE.
Activity 4

4.1 Design and build a small system to calculate vehicle hire amounts and record them
in a database for customer billing and management reporting forAyubo drive. This
includes the completing the database design started in 3.2 and implementing one
or more GUIs for vehicle, vehicle type, and package add/edit/delete functions. It
essentially requires an interface for hire calculation and recording function
described above. Generating customer reports and customer invoices are not
required for this course work.

4.2 Explain debugging process and the features available in Visual studio IDE for
debugging your code more easily. Evaluate how you used the debugging process
to develop more secure, robust application with examples.

4.3 Outline the coding standards you have used in your application development.
Critically evaluate why a coding standard is necessary for the team as well as for
the individual.
Grading Rubric

Grading Criteria Achieve Feedback


d

LO1 Define basic algorithms to


carry out an operation and
outline the process of
programming an application.

P1Provide a definition of what an


algorithm is and outline the process in
building an application.

M1Determine the steps taken from


writing code to execution.

D1 Evaluate the implementation of an


algorithm in a suitable language.
Evaluate the relationship between the
written algorithm and the code variant

LO2 Explain the characteristics


of procedural, objectorientated
and event-driven programming,
conduct an analysis of a suitable
Integrated Development
Environment (IDE)
P2Give explanations of what
procedural, objectorientated, and
eventdriven paradigms are; their
characteristics and the relationship
between them.
M2 Compare and contrast the
procedural, object orientated and
event driven paradigms used in
given source code of an application
D2Critically evaluate the source code
of an application which implements
the programming paradigms, in terms
of the code structure and
characteristics.
LO3Implement basic algorithms
in code using an IDE.
P3Write a program that implements
an algorithm using an IDE.

M3Use the IDE to manage the


development process of the program.

D3Evaluate the use of an IDE for


development of applications
contrasted with not using an IDE.

LO4 Determine the debugging


process and explain the
importance of a coding
standard

P4Explain the debugging process


and explain the debugging facilities
available in the IDE.

P5Outline the coding standard you


have used in your code.

M4Evaluate how the debugging


process can be used to help develop
more secure, robust applications.

D4 Critically evaluate why a coding


standard is necessary in a team as
well as for the individual.
Contents
1 Activity ...................................................................................................................... 19
1.1 ................................................................................................................................... 19
1.1.1 LO1 Define basic algorithms to carry out an operation and outline the
process of programming an application. .................................................................... 19
1.1.1 What is an Algorithm? .................................................................................... 19
1.1.2 Steps involved in the process of writing and executing a program ............. 21
1.1.3 Linear Search and Binary Search ................................................................. 23
1.1.4 Binary Search ............................................................................................... 25
1.2 Fibonacci Series .................................................................................................. 27
1.2.1 What is Fibonacci’s series? .......................................................................... 27
1.2.2 History of Fibonacci’s series ....................................................................... 28
1.3 Algorithms to display the Fibonacci series and the factorial value for a given
number using Pseudocode.............................................................................................. 29
2 Activity ...................................................................................................................... 34
2.1 PROGRAMMING PARADIGM ........................................................................ 35
2.1.1 The main characteristics of Procedural, Object-oriented, and Structured
paradigm .................................................................................................................... 35
2.1.2 The main characteristics of Procedural, Object-oriented, and Event-driven
paradigms ................................................................................................................... 36
2.1.3 Object-Oriented Programming ................................................................ 38
2.1.4 Difference Between Procedural and Object-oriented programming. .......... 42
2.1.5 The relationships among Procedural, Object-oriented, and Event-driven
paradigms. .................................................................................................................. 43
2.1.6 WRITE SMALL SNIPPETS OF CODE SAMPLES FOR PROCEDURAL,
OBJECT-ORIENTED, EVENT-DRIVEN PARADIGMS ....................................... 45
3 Activity ...................................................................................................................... 48
3.1 Write a program that implements an algorithm using an IDE ..................... 48
3.1.1 Suitable algorithms for vehicle tariff calculation for rents and hires........... 48
3.2 Integrated Development Environment (IDE) ...................................................... 53
3.2.1 Features of Integrated Development Environment (IDE) ............................ 53
3.2.2 Advantages and Disadvantages of using IDE .............................................. 54
4 Activity ...................................................................................................................... 55
4.1 DESIGN AND BUILD A SMALL SYSTEM TO CALCULATE VEHICLE
HIRE AMOUNTS AND RECORD THEM IN A DATABASE FOR CUSTOMER
BILLING AND MANAGEMENT REPORTING FOR AYUBO DRIVE. .................. 55
4.1.1 For the Ayubo drive project I created 11 interfaces .................................... 55
4.2 DEBUGGING PROCESS AND THE FEATURES AVAILABLE IN VISUAL
STUDIO IDE ................................................................................................................. 61
4.3 Coding Standards ................................................................................................ 63
5 References .................................................................................................................. 63
1 Activity
1.1
1.1.1 LO1 Define basic algorithms to carry out an operation and outline the process of
programming an application.

1.1.1 What is an Algorithm?

Figure 1 Definition of Algorithm

An algorithm is a collection of instructions that a computer must follow in order to


execute computations or other problem-solving tasks. An algorithm, according to its
formal definition, is a finite sequence of instructions carried out in a certain order to
execute a specific task. It is not the whole program or code; rather, it is a flowchart or
pseudocode that represents the straightforward solution to a problem

Characteristics of an algorithm
Figure 2 Characteristics of an algorithm

Well-Defined Inputs

An algorithm requires some input values to generate the output. There can be any value as
input except 0.

Finiteness

The algorithm must finally come to an end. Stopping may indicate that you have received
the anticipated outcome or that no solution is possible. Algorithms must end after a certain
number of steps. An algorithm should never be limitless and should always end after a set
number of steps. It is pointless to create an endless algorithm because it will be
meaningless.

Well-Defined Outputs

At the end of an algorithm, there need to be at least one or more outcomes. If there’s no
output then no point in constructing an algorithm.
Feasible

The approach must be simple, broad, and practical enough to be implemented with the
resources available. There can be no technologies that are not integrated.

Clear and Unambiguous

Unambiguity is one of the characteristics of a good algorithm, which indicates that its
instructions should be simple and easy. People must be able to understand the algorithm.

Language independent
An algorithm should have step-by-step instructions that are unrelated to any programming
code. It should be designed in such a way that it can run on any programming language.

1.1.2 Steps involved in the process of writing and executing a program

• Defining and Analyzing the Problem


• Designing the Algorithm
• Coding or Writing the Program
• Test Execution
• Debugging
• Final Documentation

Defining and analyzing the problem

This is the initial stage of programming, and it entails gathering the following data:
These elements are critical for programmers since they serve as the foundation for
planning programming and regulating any possible problems that may develop.

Designing the Algorithm


The algorithm is one of the most significant aspects of the software. It aids programmers
in seeing potential choices in software.

Coding or Writing the Program

After creating the algorithm, the program is written in a high-level language. The
process of writing the software is known as coding.

Test Execution
The application must be run or executed in order to detect faults or bugs. This is
known as test execution. It aids in the verification of the program's logic and the
elimination of mistake

Debugging

We delete all errors from the program at this step since there is a probability that some
errors will arise while we are coding. The application is named "DRY RUN" and is
run manually here. This is repeated numerous times until all errors have been
eliminated from the application and the system is error-free.

Final Documentation

This is one of the most important steps to be followed, yet it is also critical since it will
assist the programmer in correcting any errors that may arise in the software.

There are two kinds of documentation:

• The user manual gives the user detailed instructions on how to use the application
and what to do if there is a problem.

The Technical Manual covers the program's technical details. When the system is
not operating properly or requires improvements, this is utilized to obtain
technical facts about the application.

1.1.3 Linear Search and Binary Search

Linear Search

Linear search, also known as sequential search, is a technique for locating a certain
value in a list. It checks each element of the list in turn for the target value until a match
is found or all of the items have been searched. This is one of the most fundamental
search algorithms, and it is inspired by real-world situations.

1.1.3.1 Example of linear search

Searching for item 50


Iteration 1
Step 1 – The search element is compared with the first element (10)

Iteration 2
Step 2 – The search element is compared with the next element (13)
Iteration 3
Step 3 – The search element is compared with the next element (25)

Iteration 4
Step 4 – The search element is compared with the next element (42)

Iteration 5
Step 5 – The search element is compared with the next element (50)

Both elements are matching. So we stop comparing and displaying elements found in
index 4.

1.1.3.2 Algorithm for linear search

BEGIN Linear Search


index = 0
found = false
READ search Item
WHILE index < table Size AND found= false
IF table [index] = search item THEN
found = true
END IF
index = index + 1
END WHILE
IF found = true THEN
DISPLAY “Search Item found”
ELSE
DISPLAY “Search Item not found”
END IF
END Linear Search

1.1.4 Binary Search

Binary Search is a searching technique for determining the place of an element in a sorted
array. The element is always sought in the center of a part of an array in this manner.
Only a sorted list of elements can be used for binary search. If the items are not already
sorted, we must sort them first. Binary search can be implemented in two ways: Iterative
and recursive methods
Example of Binary Search

Search for item 13

Iteration 1
Step 1 – The search element is compared with the middle number(55)

Both the numbers don’t match. Number 12 is smaller than 55. Then we only search on
the left side of the list for the number, the numbers on the left are (10,13,25,42).

Iteration 2
Step 2 – The search element is compared with the new middle number (13)

Both numbers match so the result is at index 1.

Algorithm for Binary Search


1.2 Fibonacci Series

The Fibonacci series, named after Italian mathematician, named Leonardo Pisano
Bogollo, later known as Fibonacci, is a series (sum) formed by Fibonacci numbers
denoted as Fn. The numbers in Fibonacci sequence are given as: 0, 1, 1, 2, 3, 5, 8, 13,
21, 38, . . . In a Fibonacci series, every term is the sum of the preceding two terms,
starting from 0 and 1 as first and second terms. In some old references, the term '0'
might be omitted. (Gupta, 2020)

1.2.1 What is Fibonacci’s series?

The Fibonacci sequence is a set of numbers that begins with a zero, then a one,
another one, then a sequence of progressively increasing numbers. Each number in the
series is equal to the sum of the two numbers before it. The Fibonacci sequence starts
with the 14 integers:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ...

Each number, beginning with the third, follows the formula. For example, the seventh
number, 8, is preceded by three numbers that sum up to eight.

The series can potentially go on indefinitely, with each new number utilizing the same
algorithm. Some resources display the Fibonacci sequence beginning with a one
rather than a zero, however, this is unusual.
1.2.2 History of Fibonacci’s series

Figure 3 Picture of Fibonacci’s series

The Italian mathematician Leonardo of Pisa, also known as Leonardo Pisano was
born in Italy in the eleventh century and discovered the features of the sequence
presumably while examining a form of logic issue about the expansion of a colony of
rabbits.

His work was informed by the knowledge of accomplished Arab mathematicians he


lived in North Africa, and he authored major publications about math when he
subsequently returned to Italy. This series was only a portion of his contribution to
mathematics; he also occupied himself with practical applications like accountancy.
He himself never named his sequence Fibonacci numbers; it was named as an honor
for his work.
1.3 Algorithms to display the Fibonacci series and the factorial value for a given
number using Pseudocode.

Algorithm for Fibonacci series

Start
Step 1: Take integer variables nterms, n1 and n2
Step 2: Set n1 = 0, n2 = 1
Step 3: Input Validation
Step 4: Display n1
Step 5: set nth = n2 + n2
Step 6: set n1 = n2
Step 7: set n2 = nth
Step 8: count +1
Step 9: REPEAT from 4 - 7, for x times
Stop
Python coding for the Fibonacci series

Figure 4 Evidence for the Python coding of the Fibonacci series

The figure above illustrates how I worked on the Fibonacci sequence using the Python
computer language.
Result after executing the program

Figure 5 Evidence after running codes for the Fibonacci series

As seen in the above figure, I was able to achieve a successful result after executing the
application. For example, I input the number 18 to obtain the sum of the 18th value of the
Fibonacci sequence, therefore we can see there are 18 values printed on the above figure
and the 18th value is "1597".
Factorial is meant by factorial numbers

A factorial is a mathematical function with the symbol (!) that multiplies a number (n) by
every number that comes before it. Simply put, the factorial function multiplies all whole
numbers from the selected number down to one. In further mathematical terms, a
number's factorial (n!) is equal to n. (n-1).

Algorithm to find factorial numbers

Start
Step 1: Make x and f integer variables.
Step 2: Set f=1 to begin.
Step 3: Set x value.
Step 4: Determine whether x<0;
Step 5: If x = 0; output factorial is 0
Step 6: repeat loop i in range (1, x+1)
Step 7: f = f*i
Step 8: Display the value of F.
Stop

Python coding to find factorial numbers


Figure 6 Evidence for the Python coding of the factorial numbers

The figure above illustrates how I worked on the factorial numbers using the Python
computer language. By implementing this code if was successfully able to get the
factorial numbers.
Results after implementing the code

Figure 7 Evidence of the answer which I got after implementing the code

This is the answer I got to my code for obtaining a factorial number, and it was successful
since after executing the program, I got the proper answer. I input ten and attempted to
get the factorial value of ten; I received "3628800" as the factorial of ten, which was the
correct result.
Big O notation

What is big O notation?

Big-O notation gives you a way to calculate how long it will take to run your code. You
can physically time how long your code takes to run, but with that method, it is hard to
catch small time differences. For example, the time it takes between running 20 and 50
lines of code is very small. However, in a large program, those inefficiencies can add up.
Big-O notation counts how many steps an algorithm must execute to gauge its efficiency.
Approaching your code in this manner can be very effective if you need to tune your code
to increase efficiency. A big-O notation will enable you to measure different algorithms
by the number of steps it requires to run and objectively compare the algorithms'
efficiency. (Seaton, 2020)

Definition for Big O notation

Figure 8 Definition for Big O notation (Huang, 2020)

2 Activity
2.1 PROGRAMMING PARADIGM

A programming paradigm is a programming approach with considerable variability. A


paradigm is a method of accomplishing something (such as programming), not a specific
entity (like language). These are the pillars upon which programming languages are
developed and implemented. Some languages can be divided into several paradigms.

Figure 9 Programming Paradigms

2.1.1 The main characteristics of Procedural, Object-oriented, and Structured paradigm

Imperative Paradigm

The imperative programming paradigm employs a series of statements to change the state
of a program using variables. The imperative paradigm's purpose is to specify how
software should behave by explicit instructions. Imperative programming is frequently
contrasted with declarative programming, which is the principle underlying languages
that specify what to do rather than how to do it. Imperative paradigms are classified into
three categories:

➢ Procedural Programming
➢ Structured Programming
➢ Object Oriented Programming
2.1.2 The main characteristics of Procedural, Object-oriented, and Event-driven
paradigms

Procedural Programming

A procedural programming program comprises data and modules/procedures that operate


on the data. Both are considered different concepts. However, a program is constructed
from objects under the object-oriented programming paradigm. An object is an instance
of a class, that is an encapsulation of data. The fields that modify them are called
methods.

Features of Procedural Programming

Modularity
It involves breaking down a complex problem into smaller parts in order to resolve it
quickly. It entails breaking the program's functionality into independent smaller
components, and each portion may execute the specific purpose for which it was created.

Pre-Defined function

A function is a procedure in software that may be invoked by its name. Built-in functions
are another name for predefined functions. They are a collection of subroutines that
perform specialized functions. These functions are often included in high-level
programming languages like Python and C++ but can also be imported into the
programming language via registries or programming libraries.

Local Variable

Variables are storage sectors with unique names in computer languages. Users can give
them values. They are used to refer to a program's stored value. Local variables, also
known as lexical variables, are variables that are declared within a certain method and
may only be used or referred to within that method. As a result, their reach is limited to
that approach, and they cannot be utilized elsewhere. Other methods in the program will
be unaware of the local variable created in this method. The application will throw an
error if a local variable is used in another procedure.

Parameter Passing

Parameter passing is a method in programming languages that allows parameters to be


provided to procedures or functions. The parameter is not to be confused with the
argument. The argument is the actual value supplied to the function processed by the
function, whereas the parameter is the value stated in the function when declared.
Multiple ways can send parameters to a function. These are the four main techniques of
parameter passing.

➢ Pass by value
➢ Pass by reference
➢ Pass by the name
➢ Pass by value-result

(Imam, 2022)

2.1.2.1 Advantages and Disadvantages of Procedural Programming

Advantages

• The programmed simplicity, as well as the ease with which compilers and
interpreters may be implemented
• Because the source code is portable, it may also be used to target a different CPU.
• A wide range of books and online course material on proven algorithms is
accessible, making it easy to study along the route.
• The program flow can be easily traced.
• Memory requirements are reduced by using the procedural programming
approach.

Disadvantages

• When Procedural Programming is used, the program code becomes more difficult
to write.
• The utilization of global data is an obstacle to sustaining and improving.
• It is difficult to relate to real-world items.
• It focuses on functions rather than data.
• The data is exposed to the entire program, making it less secure.

2.1.3 Object-Oriented Programming

The phrase object-oriented is made up of two words: object and oriented. OOP is a
programming pattern that is constructed around objects or entities; therefore, the name is
object-oriented programming. It has a broad influence since it appeals to people on
several levels and offers faster and less expensive creation and maintenance.

Features of Object-Oriented Programming

Objects and Classes

Classes are user-defined data types that are used to build objects. A class is made up of
objects that have comparable characteristics and actions. As a result, a class is a collection
of things. The object is a class instance.
Data Abstraction

The act of describing important qualities without giving detailed information or


explanation is referred to as abstraction.

Inheritance

The process of deriving a new class from an existing class is known as inheritance. A
base, parent, or superclass is an existing class. The newly generated class is known as a
derived class, child class, or subclass. The derived class includes all of the characteristics
of the base class as well as some additional features.

Binding

Binding refers to the process of linking the function call to the function code that will be
performed in response to the call. The code associated with the function call is linked at
build time via static binding. Early binding or compile time polymorphism is another
name for it. The code associated with the function call is linked dynamically during
runtime. Also known as late-binding polymorphism or runtime polymorphism.
2.1.3.1 Advantages and Disadvantages of Object-Oriented Programming

Advantages

• Software development productivity has grown.


• Development costs have been reduced
• Software upkeep has improved.
• Using methods like inheritance and templates to eliminate duplicate code.
• Data encapsulation enables programmers to hide bits of code or restrict data
access in areas of a program, making the application more secure.

Disadvantages

• Not appropriate for a wide range of issues


• More slow projects
• This necessitates programmers' expertise in software engineering and
programming approaches.
• Tracing and debugging messages traveling across multiple objects in a
complicated program is tough.
• Because the projects take more time, the time will be wasted

Event-Driven Programming

Event-driven programming is a computer programming paradigm in which the


program's control flow is governed by the occurrence of events. An event listener is a
piece of code that monitors certain events. If it detects an assigned event, it executes an
event handler (a callback function or method that is invoked when the event happens).
(Hope, 2018)
Features of Event-Driven Programming

Time-Driven

Time-driven is a paradigm in event-driven programming, it's a code that runs on a time


trigger, time driven may be a specific code that runs on a given time, which might be
once an hour, once a week, or once a month, this implies it's a task that is pre-set to
accomplish. For example, Software Update is a time-driven application in which the user
may specify when to update or when to look for and download updates.

Events

Events include mouse, keyboard, and user interface events, which must be triggered in the
program in order to occur, which means the user must interact with an item in the
program, such as clicking a button with a mouse, selecting a button with the keyboard,
and so on.

Service Oriented

Service-oriented is a major aspect of event-driven programming that is used to develop


programs for services, and it does not slow down the system since service-oriented only
consumes a little amount of computer processing power, and normally services operate in
the background of the operating system.

Trigger functions

In event-driven programming, trigger functions are functions that decide what code to
execute when a given event happens, and they are used to pick which event handler to use
for the event when a specific event occurs.
Advantages and Disadvantages of Event-Driven Programming

Advantages

• Applicability for Graphical User Interfaces


• Natural Dividing Lines are Simple to Find
• Highly Biodegradable
• Flexibility
• Simplicity of Programming
• enables more interactive programs
• Making use of hardware interrupts. It may be accomplished by utilizing hardware
interrupts, which reduces the computer's power consumption.

Disadvantages

• Ones with complicated graphical user interfaces may take longer to load and
execute than simpler programs, especially if RAM is limited.
• Event-driven Programming is more complex than procedural and object-oriented
Programming.
• Event-driven programming is frequently more difficult and time-consuming than
batch programming for basic systems.
• The program's flow is frequently less logical and apparent.
• Creating many forms in a program can indeed be extremely confusing
and annoying for the user.

2.1.4 Difference Between Procedural and Object-oriented programming.


Procedural Object Oriented

It works from the top to bottom. It employs a bottom-up strategy.

The function is more important in Data is more essential than function in


procedural programming than the data. object-oriented programming.

Procedural programming makes The idea of data abstraction is used in


advantage of the idea of procedure object-oriented programming.
abstraction.
Transmit data fluidly within the system Objects in OOP could move and
from one function to the next in communicate with one another using
procedural programming. member functions.

It is difficult to add new data and It is simple to add additional data and
functionalities. functions.

In procedural programming, there are no In OOP, access modifiers are classified as


access modifiers. private, public, and protected.
The codes cannot be reused in Procedural The codes can be reused in procedural
programming. programming.
Virtual classes are not available in Virtual classes exist in inheritance in
procedural programming. OOP.

2.1.5 The relationships among Procedural, Object-oriented, and Event-driven


paradigms.

Procedural Programming
In procedural programming, the State of the system is generally passed directly between
the steps, so it does not need to exist in a context outside of the executing logic. From a
testing point of view, properly testing a pure Procedural Programming application will
require the whole application to be completed. This means that the external state is
generally less of a concern for testing PP logic.

Event-Driven Programming
Most Graphical User Interfaces will implement forms of Event Driven programming.
This is where the system raises event messages or responds to events raised from other
systems. The application logic is executed in direct response to these events, in explicit
contrast to Procedural Programming the timing of the events is considered not
controllable. This means that it is more important to check the state of the system when
performing decision logic.

Object Oriented Programming

Object Oriented Programming (OO) is a style of programming where the state of the
system is modeled using classes that describe a set of metadata and the behaviors and
interactions with other objects. From a testing point of view, OOP makes it possible to
replicate state or the environment without having access to the real operating
environment. This can become a burden though; more care needs to be taken to ensure the
state is defined accurately enough to obtain meaningful test results.
2.1.6 WRITE SMALL SNIPPETS OF CODE SAMPLES FOR PROCEDURAL,
OBJECT-ORIENTED, EVENT-DRIVEN PARADIGMS

Procedural Programming

code

Figure 10 Code for procedural programming

Result

Figure 11 Result of the procedural programming code

Object Oriented Programming

Code
Figure 12 Code for Object-Oriented programming

Result

Figure 13 Result of the object-oriented programming code

Event-Driven Programming
Figure 14 Code for Event-driven programming

Result

Figure 15 Result of the Event Driven programming code


3 Activity
3.1 Write a program that implements an algorithm using an IDE

3.1.1 Suitable algorithms for vehicle tariff calculation for rents and hires

Rent calculation

Figure 16 code rent calculation

Figure 17 interface for rent calculation


Shor tour calculation

Figure 18 code for short tour calculation

Figure 19 Interface for short tour calculation


Long tour calculation

Figure 20 code for long tour calculation

Figure 21 interface for short tour calculation


3.1.2 Implementing a Suitable database for Ayubodrive

Connecting to database server

Figure 22 Connecting to database server

Ayubodrive Data base

Figure 23 Ayubodrive database


Tables of Ayubodrive database

Figure 24 table for Ayubodrive

Table for day tour package

Figure 25 table for day tour package


Reserved vehicle table of Ayubo drive

Figure 26 Table for reserved vehicle

3.2 Integrated Development Environment (IDE)

The term "IDE" refers to a sort of software that assists programmers in the creation of
code A source code editor, a compiler/interpreter, and a debugger are all common
components of an integrated development environment (IDE). Increase programmers'
productivity by encapsulating the entire code creation, compilation, and testing process. It
does this by merging several functions into one application, allowing users to develop,
test, and run programs all from the same location, often with a graphical user interface.

3.2.1 Features of Integrated Development Environment (IDE)

Text editor: Almost every IDE includes a text editor for writing and manipulating source
code. Some tools may include visual elements for dragging and dropping front-end
components, although the majority feature a plain interface that highlights language-
specific grammar. (Walker, 2021)

Debugger: Debugging tools let users find and correct mistakes in source code. To
evaluate functionality and performance, they frequently imitate real-world scenarios.
Before the application is deployed, programmers and software engineers may generally
test the various code parts and detect flaws. (Walker, 2021)

Compiler: A compiler is a component that converts a programming language into a form


that computers can understand, such as binary code. The machine code is examined for
correctness. The code is subsequently parsed and optimized by the compiler to improve
performance. (Walker, 2021)

Code completion: Code completion tools help programmers by intelligently detecting


and adding common code components. These features save developers time while
developing code and limit the possibility of errors and problems. (Walker, 2021)

Programming language support: IDEs are normally limited to a single programming


language, while some do support many languages. As a result, the first step is to
determine which languages you will be coding in and then filter down your potential IDE
choice appropriately. Ruby, Python, and Java IDE tools are examples. (Walker, 2021)

3.2.2 Advantages and Disadvantages of using IDE

Advantages Disadvantages

The IDE can fix syntax, warn about memory Some IDEs do not enable users to interface
leaks, and help with code quality, among directly with the database.
other things.
Figure 27 Advantages and Disadvantages of using IDE

IDEs are useful for developing software Because the IDE has a graphical Interface. It
programs, drivers, and utilities. needs additional memory and computing
power.

It enables collaboration, allowing a group of There may be duplicates in the auto-


programmers to seamlessly collaborate. generated code.

It helps to keep track of the code The interface is not very user friendly

It is very easy to create database applications It is a hard task to remember the values when
using IDE implementing the codes
4 Activity
4.1 DESIGN AND BUILD A SMALL SYSTEM TO CALCULATE VEHICLE HIRE
AMOUNTS AND RECORD THEM IN A DATABASE FOR CUSTOMER
BILLING AND MANAGEMENT REPORTING FOR AYUBO DRIVE.

4.1.1 For the Ayubo drive project I created 11 interfaces

• Login Page
• Signup Page
• Main Menu
• Packages Menu
• Customer Menu
• Employee Menu
• Reservations Menu
• Tour Calculations (3)

Login Page

Figure 28 Evidence for the login page for Ayubo Drive

Signup page
Figure 29 Evidence for the Ayubo Drive Sign up page interface

Main Menu

Figure 30 Evidence for the main menu of the Ayubo Drive User Interface
Customer Menu

Figure 31 Evidence for the customer menu of the Ayubo Drive User Interface

Employee menu

Figure 32 Evidence for the employee interface


Reservations menu

Figure 33 Evidence for the reservations interface

Packages Menu

Figure 34 Evidence for the packages interface


Cost Calculations Menu

Figure 35 Evidence for the calculations interface

Rent Calculation Menu

Figure 36 Evidence for the rent calculation interface


Short tour calculation Menu

Figure 37 Evidence for the short tour calculation interface

Long tour calculation menu

Figure 38 Evidence for the long tour calculation interface


The images shown above are proof that I obtained while testing the Ayubo Drive User
Interface. When I began testing, I discovered several flaws in the programming, and after
implementing certain codes, I was able to solve the bugs and eventually run the Ayubo
Drive user interface successfully.

4.2 DEBUGGING PROCESS AND THE FEATURES AVAILABLE IN VISUAL STUDIO IDE

Debugging

Debugging is the act of finding and eliminating current and prospective problems known
as bugs in software code that might cause it to behave abnormally or crash. Debugging
is used to detect and address faults or problems in software or systems to avoid
erroneous functioning. Debugging becomes more difficult when several subsystems or
modules are tightly connected, as each modification in one module may cause more
defects to arise in another. Debugging a program can take longer than writing it.

Why do we need debugging?

Any software that is created must be bug-free before it is released or placed on the
market. Because there is so much rivalry in the industry, every company wants to be at
the top. It is doable if your program is bug-free, and the consumer is satisfied with it. If
the consumer finds no errors when using the program, they will be satisfied. To satisfy a
consumer, software must be bug-free and fixed through the debugging process. This is
why every firm must go through the debugging procedure before releasing their
products to the market. (Tawdi, 2020)
Figure 39 Process of Debugging

Debugging process

Locate Error

Finding problems early on may save a lot of time. We waste a lot of time if we make a
mistake in detecting an error. Errors or faults that arise at a client location are difficult to
locate. Identifying the correct mistake is essential for saving time and avoiding problems
at the user site.

Design Error Repair

You must utilize an appropriate technique to design the error correction at this step. This
will assist you in comprehending the issue. This stage is essential because the error
which is being solved currently might take you to another error.

Repair Error

Then the fourth step is to implement the solution for the error which is being designed in
the above step. If the repair was not successful, try another way by designing another error-
repairing method.

Retest Program
Program testing must be performed on all code when changes are made at this level. If all
test cases pass the test, we can go to the next stage; otherwise, we must resolve the test case
that fails the test.

4.3 Coding Standards

What are coding Standards?

Coding standards are a collection of coding principles, regulations, and best practices
that assist developers in writing better code. Coding Standards also encourage good
programming habits and increase productivity. To build neat, dependable, and effective
code, whether a beginner or an experienced software developer, it’s always better to
stick to the appropriate coding standards. This not only eliminates future rework as our
code base expands, but it also increases the software performance.

Benefits of using coding Standards

• We can make our code more readable and it easier to maintain.

• Provides consistency to the code written by various developers.

• It allows us to recognize faults.

• Increases programmer productivity and delivers faster output.

• It makes us easy to reuse the codes which have been designed.

5 References
Gupta, A. (2020, 11 5). Fibonacci Series. Retrieved from cuemath:
https://www.cuemath.com/numbers/fibonacci-series/
Hope, C. (2018, 12 13). Event Driven Programming. Retrieved from Computer Hope:
https://www.computerhope.com/jargon/e/event-driven-prog.htm
Huang, S. (2020, January 16). What is big O notation. Retrieved from free code camp:
https://www.freecodecamp.org/news/big-o-notation-why-it-matters-and-why-it-
doesnt-1674cfa8a23c
Imam, F. (2022, May 27). procedural Programming. Retrieved from finsliqblog:
https://www.finsliqblog.com/programming-languages/procedural-programming-
what-should-you-
know/#:~:text=Features%20of%20procedural%20programming%201%20Modula
rity%20Modularity%20means,of%20a%20funct
Seaton, J. (2020, December 20). What is Big O notation. Retrieved from make use of:
https://www.makeuseof.com/what-is-big-o-notation/
Tawdi, S. (2020, January 23). What is Debugging. Retrieved from EDUCUBA:
https://www.educba.com/what-is-debugging/
Walker, A. (2021, December 03). What Is an IDE? How It Helps Developers Code
Faster. Retrieved from G2: https://www.g2.com/articles/ide

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy