Programming
Programming
Assessor Feedback:
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. Avoid using page borders in your assignment body.
3. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
4. Ensure that you give yourself enough time to complete the assignment by the due date.
5. Excuses of any nature will not be accepted for failure to hand in the work on time.
6. You must take responsibility for managing your own time effectively.
7. 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.
8. Failure to achieve at least PASS criteria will result in a REFERRAL grade.
9. Non-submission of work without valid reasons will lead to an automatic RE FERRAL.
You will then be asked to complete an alternative assignment.
10. 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.
11. 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
12. Use word processing application spell check and grammar check function to help
editing your assignment.
13. 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.
STUDENT ASSESSMENT SUBMISSION AND DECLARATION
When submitting evidence for assessment, each student must sign a declaration
confirming that the work is their own.
Student name: Balasingam Judes Kolin Assessor name: Hari
Plagiarism
Plagiarism is a particular form of cheating. Plagiarism must be avoided at all costs and
students who break the rules, however innocently, may be penalised. It is your
responsibility to ensure that you understand correct referencing practices. As a
university level student, you are expected to use appropriate references throughout and
keep carefully detailed notes of all your sources of materials for material you have used
in your work, including any material downloaded from the Internet. Please consult the
relevant unit lecturer or your course tutor if you need any further advice.
Software Engineering
Unit 01: Programming
Assignment 01
Unit 01: Programming
Assignment Brief
Submission Format
The assignment submission is in the form of the following.
• An individual written report written in a concise, formal technical style using single
spacing and font size 12. Include all necessary screenshots of your coding and
screenshots of the developed application as evidence. Referencing should be done
using the Harvard Referencing system.
• All the source code files, Complete GUI System with the database.
Submit all above in a one single .zip file to the submission portal.
LO4. Determine the debugging process and explain the importance of a coding standard
Computing-related cognitive skills :
• Demonstrate knowledge and understanding of essential facts, concepts, principles
and
theories relating to computing and computer applications
• Use such knowledge and understanding in the modelling and design of computer-
based
systems for the purposes of comprehension, communication, prediction and the
understanding of trade-offs
• Recognise and analyse criteria and specifications appropriate to specific problems,
and
plan strategies for their solutions
• Critical evaluation and testing: analyse the extent to which a computer-based
system
meets the criteria defined for its current use and future development
• Methods and tools: deploy appropriate theory, practices and tools for the design,
implementation and evaluation of computer-based systems.
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, ……..
Fn = F n-1 + F n-2
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 and carry out an analysis of writing the code phase by discussing the potential
challenges faced.
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
Compare and discuss 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) and critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.
You have just started a new role as a Junior Software Developer at CUBE-GEN Software
Solutions an independent software development company that designs and builds bespoke
software solutions for various companies of different sizes that cover a range of different
industries. The software that they design uses a wide range of technologies, from simple stand-
alone programs to large web-based applications.
CUBE-GEN Software Solutions has been approached by a small, local company – KickBlast
Judo – that specialises in providing judo training sessions to people from the local community.
KickBlast Judo caters to people of all ages and experience, from expert to beginner.
KickBlast Judo has requested a simple program that will calculate the cost of training fees for
their athletes each month.
The Chief Executive Officer (CEO) of the company has reviewed the client requirements and
has determined that this is a suitable project for you to take on. The company wants to see how
you use and apply the CUBE-GEN Software development environments and code standards.
The requirements are that KickBlast Judo wants a program that will allow a user to enter the
following information:
● athlete name
● training plan
● current weight in kilograms (kg)
● competition weight category
● number of competitions entered this month
● option to add the number of hours private coaching.
For each athlete, the program should then output the following information:
● the athlete’s name
● an itemised list of all costs for the month
● the total cost of training and competitions for the month
● how their current weight compares to their competition weight category.
KickBlast Judo currently have six athletes enrolled on their training program, but they would
like the ability to register more.
You should use the additional information on the next page to help you when developing your
program.
The CEO has instructed you to develop a GUI application for the KickBlast Judo.
Once the program has been built, the CEO has asked you to report back to them on how you
designed and developed the algorithms required, as well as how you converted these algorithms
into a final program and to show any issues you encountered.
Additional information
Write the complete pseudocode to calculate the cost of training fees for KickBlast
athletes for each month. Use the visual studio IDE (using C#.net) to implement the above
algorithms. The developer can decide the methods which need to be included when
developing the classes. Design the suitable database structure for keeping the data of the
above system.
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 GUI system for the above scenario and the application should be a
complete functional system with all the functions which has described in the above scenario
with the database structure which has designed in activity 3.
4.2 Examine 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 Explain and 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.
Reading:
Aho, A. V. et al. (1987) Data Structures and Algorithms. 1st Ed. Addison-Wesley. Hunt,
A. et al. (2000) The Pragmatic Programmer: From Journeyman to Master. 1st Ed.
HN Global:
HN Global HN Global (2021) Reading Lists. Available at:
[Link]
I would like to sincerely express my gratitude to my lecturer, Mr. Hari, for her constant
guidance, encouragement, and valuable support throughout this work. Her thoughtful advice,
patience, and motivation helped me to complete this successfully and also inspired me to
improve my knowledge and skills.
I also extend my heartfelt thanks to ESOFT Metro Campus for providing me with the
opportunity, resources, and a positive learning environment that contributed greatly to my
progress. The encouragement and facilities offered have played a significant role in shaping this
work.
Finally, I wish to thank everyone who directly or indirectly supported me in this journey.
B. Judes Kolin
HIGHER NATIONAL DIPLOMA IN
SOFTWARE ENGINEERING
Table of contents
Contents
Activity 01 ...................................................................................................................................... 4
1.1 Algorithm ....................................................................................................................... 4
1.2 Process in building an application ..................................................................................... 6
1.3 Fibonacci and Factorial Series ........................................................................................... 7
1.4 Big O Notation ................................................................................................................... 10
1.5 Reasons for why python is suitable to implement Fibonacci and factorial algorithm 10
1.6 Relationship between written algorithm and the code variant ..................................... 11
Activity 02 .................................................................................................................................... 12
2.1 Programming Paradigm ................................................................................................... 12
2.2 Example code for Procedural, Object oriented and Event driven Paradigm .............. 17
Activity 03 .................................................................................................................................... 18
3.1 Written Algorithm for calculating the cost of training fees ........................................... 18
3.2 Design of the systems......................................................................................................... 21
3.3 Integrated Development environment (IDE) .................................................................. 25
3.4 Features of Visual Studio IDE for KickBlast Judo Development .................................. 26
3.5 Advantages of Visual Studio IDE for KickBlast Judo System Development ............... 26
Activity 04 .................................................................................................................................... 28
4.1 Debugging .......................................................................................................................... 28
4.2 Steps in debugging............................................................................................................. 28
4.3 Coding Standard ............................................................................................................... 29
4.4 Importance of coding standards for Individual and Teamwork ................................... 33
Table of figures
Activity 01
1.1 Algorithm
Flow Chart
• Flowchart is a graphical representation of algorithm.
Pseudo Code
• Presenting an algorithm using simple English terms is called Pseudo code.
BEGIN-to indicate a beginning
END-to indicate an end
INPUT/OUTPUT/READ-to indicate input
OUTPUT/DISPLAY/SHOW/PRINT-to indicate output
IF….THEN….ELSE….ENDIF-to indicate selection
FORDO
WHILE END WHILE To indicate the repetition or iteration
REPEAT….UNTIL
3. Code development
App developers use the prototype as a blueprint for creating the app – using programming
languages (like Java or SQL), frameworks and APIs to bring your design to life. (Rodrigues,
2025)
The coding phase includes:
A sequence of numbers known as a Fibonacci series is one in which the first two numbers are
either 1 and 1 or 0 and 1, depending on the sequence's chosen starting point, and each succeeding
number is the sum of the preceding two. Thus, the nth term in this series is equal to the sum of the
n-1 and n-2 terms. (Fibonacci Series Algorithm And Flowchart - Code With C, 2014)
Code to execute the Fibonacci series
n = 12
a, b = 0, 1
print (a, b, end=' ')
for i in range(2, n):
next number = a + b
print (next number, end=' ')
a, b = b, next number
Output- 0 1 1 2 3 5 8 13 21 34 55 89
2. Factorial
Defined for non-negative integers, the factorial function represents the product of all positive
integers up to a given integer n. It is denoted by the exclamation mark (!), indicating
multiplication of all positive integers up to that number. To calculate a number’s factorial,
multiply it by all descending integers down to 1. For example, 5! is 5 × 4 × 3 × 2 × 1, which
equals 120. (Cox, 2025)
Code to execute the Factorial series
n=6
fact =
for i in range(1, n + 1):
fact *= i
print (f" The factorial of {n} is {fact}")
Output-Factorial of 6 is 720
• Scalability Concerns
• Performance Optimization
• Security Vulnerabilities
• Technical Debt
• Documentation Gaps
• Team Collaboration
1. Python
Incredibly simple to read and write.
Big integers (factorials of large numbers) are supported by default.
supports both recursive and iterative methods.
Example: for loops, recursion, and list handling are straightforward.
2. C / C++
Very quick and effective execution.
Excellent for teaching memory management and recursion.
Example: Factorial using loops or recursion; Fibonacci using recursion or iterative loops.
able to carry out extensive calculations while taking integer overflow into account.
3. Java
object-oriented and frequently utilized in education.
supports iterative and recursive techniques.
able to manage large integers for large factorials by using the Big Integer class.
4. JavaScript
Perfect for applications that run on the web.
Programming E157358
B Judes kolin Page G of 33
HIGHER NATIONAL DIPLOMA IN
SOFTWARE ENGINEERING
To simplify, if a constant and a starting point can be found where this relationship holds, it means
f(n) behaves in a predictable way compared to g(n) as the input size gets bigger. This helps in
understanding and comparing the efficiency of different algorithms, ensuring they perform within
acceptable limits for large amounts of data. (kumar, 2022)
1.5 Reasons for why python is suitable to implement Fibonacci and factorial algorithm
• Easy-to-Read Syntax
• Python code is incredibly clear and simple to comprehend.
• Python can express loops and recursion in very few lines, which is necessary when writing
Fibonacci or Factorial algorithms.
• Python naturally supports both Fibonacci and Factorial, and both can be implemented with
loops or recursion.
• Python's lists, tuples, and dictionaries facilitate the manipulation and storing of sequences,
such as the Fibonacci numbers.
• Python is compatible with a wide range of operating systems, including Windows, Linux, and
macOS.
• Python code is perfect for teaching and learning algorithms because it can run virtually
anywhere without requiring any changes.
3. Precision and Detail: While the algorithm focuses on clarity and logic, the code variant
delves into the specifics of syntax, data structures, and control flow, ensuring that the
algorithm's steps are accurately and efficiently executed by the computer.
4. Language Specifics: The code variant is heavily influenced by the syntax, features, and
constraints of the chosen programming language, while the algorithm is generally
language-agnostic, focusing on the underlying logic.
In summary, the algorithm and its code variant are interconnected, with the algorithm providing
the high-level logic and the code variant translating this logic into a specific programming
language, incorporating language-specific syntax and features to execute the algorithm effectively.
([Solved] Examine the implementation of an algorithm in a suitable language - BTEC HND In
Software / Networking Engineering (business intelligenc) - Studocu, 2024)
Activity 02
Imperative Paradigm
Every step in the software development process is implicitly coded to address a problem under the
paradigm of imperative programming. Every operation in imperative programming is coded, and
the code itself outlines the solution to the issue. The majority of conventional programming
languages are essential. (techtarget, n.d.)
1. Procedural Programming
Under the paradigm of procedural programming, the program is organized around data-
manipulation procedures or functions. It stresses code reusability through the use of functions and
provides detailed instructions. Languages that adhere to this paradigm include C and Pascal.
(Liyan, 2023)
Declarative Paradigm
Declarative programming is a paradigm for computer programming in which the developer
specifies the goals of the program instead of the explicit methods by which it should achieve them.
This method has the advantage of making programming some parallel processing applications
easier and is naturally suited to the programmatic definition of formal logic systems. (What is
Declarative Programming?, n.d.)
1. Functional Programming
Functional programming stays away from mutable data and changing states by treating
computation as the evaluation of mathematical functions. Higher-order functions, pure functions,
and immutability are emphasized. The evaluation of expressions is the main focus of FP languages.
Languages that adhere to this paradigm include Haskell, Lisp, and Erlang. (Liyan, 2023)
2. Logic programming
Logic programming is a paradigm for computer programming in which program statements use a
system of formal logic to express facts and rules about problems. Rules are expressed as head-and-
body logical clauses, such as "H is true if B1, B2, and B3 are true." Like rules, facts have no body;
for example, "H is true." (Programming, 2019)
Event Driven Programming
Driven by Events The foundation of programming is the idea of events and event handlers. It
entails structuring a program's flow according to events and responses to those events. This
paradigm is frequently used in asynchronous and GUI programming. One language that
prominently supports event-driven programming is JavaScript. (Liyan, 2023)
• Event Handlers: Event-driven programs are structured around event handlers, which are
functions or methods that are executed in response to specific events. These event handlers
define the behavior of the program when a particular event occurs.
• Event Loop: Event-driven programs typically have an event loop that continuously waits
for events to occur. When an event is detected, the corresponding event handler is invoked to
handle the event.
2.2 Example code for Procedural, Object oriented and Event driven Paradigm
Procedural Paradigm-Login system
Activity 03
Flow chart
Start
Input Records
(Athlete ID, Name, Training Start/End, Training
Amount, Private Start/End, Private Amount)
Do
Do
Do
Do
Do
Do
Do
Do
END
Dashboard
Figure 7:Dashboard
Athlete Form
Coaching form
Competition Form
An integrated development environment (IDE) is a software suite that consolidates basic tools
required to write and test software. Developers use numerous tools throughout software code
creation, building and testing. Development tools often include text editors, code libraries,
compilers and test platforms. Without an IDE, a developer must select, deploy, integrate and
manage all these tools separately. An IDE combines many of those development tools together in
a single graphical user interface (GUI). The IDE is designed to simplify software development and
can identify and minimize coding mistakes and typos. Some IDEs are open source, while others
are commercial offerings. An IDE can be a standalone application, or it can be part of a larger
software package. (techtarget, n.d.)
Benefit: Preserves the KickBlast system's modularity and structure for future growth.
Real-time compilation errors & warnings: Immediate feedback for syntax or reference errors.
Build Output: Shows detailed messages about compilation issues.
Benefit: Prevents runtime crashes and ensures smooth build cycles.
Database Tools & Integration
Server Explorer / SQL Server Object Explorer: Connect to databases, view tables, and design
queries.
3.5 Advantages of Visual Studio IDE for KickBlast Judo System Development
• One-Stop Development Environment-integrates database tools, a code editor, a GUI
designer, a debugger, and project management into a single program.
Because developers don't require multiple tools, setup time and integration problems are
decreased.
• Code & IntelliSense Suggestions-allows variables, classes, methods, and parameters to be
automatically completed, speeds up development and lowers coding errors, guarantees that
GUI, database, and business logic APIs and methods are used correctly.
• Tools for GUI Design-
-WinForms/WPF drag-and-drop interface designers enable quick form, button, grid, and
report creation.
makes it easier to create invoice summaries, billing interfaces, and athlete registration forms.
• Effective Debugging-enables evaluating expressions, inspecting variables, stepping through
Activity 04
4.1 Debugging
Debugging is the process of tracking down and eliminating issues in software applications such as
bugs and vulnerabilities that may arise due to bad coding, architecture, or implementation. It is
commonly associated with the use of tracing and analysis tools that can execute our code step-by-
step and allow us to examine the program state while suspended.
Debugging can also be achieved in many other ways, including instrumenting our code to produce
extra artifacts, such as logging, executing in small, controlled, units (testing), or examining the
code statically (code review and static analysis). (What is Debugging? Types & Tools Definition
Guide, n.d.)
Coding standards, also known as coding guidelines or programming style guides, are rules and
conventions that developers follow when writing code. These rules define the code characteristics
necessary to maintain a uniform codebase and facilitate collaboration among developers. (Codacy,
2023)
• Enhanced Code Quality: Standards encourage consistent code structure and formatting,
leading to more reliable and efficient code and reducing bugs.
• Increased Code Reusability: Standardized code components are more likely to be reusable,
saving time and effort in future projects.
• Faster Troubleshooting: Consistent code makes it quicker to locate and fix errors in your
own code.
• Reduced Security Concerns: Standards often include rules for writing secure code,
preventing common vulnerabilities and strengthening your applications.
• Facilitates Code Reviews and Feedback: Code that follows established standards is easier
for others to review, leading to quicker and more effective feedback on your work.
• Smoother Collaboration: While a team effort, individuals who adhere to standards find it
easier to contribute to and understand code written by others, improving collaboration.
1 Consistency: Coding standards ensure that all team members follow a consistent coding
style. This makes it easier for team members to understand and review each other's code,
leading to improved collaboration and reduced time spent on code reviews.
2 Readability: By enforcing consistent formatting and naming conventions, coding standards
enhance code readability. This makes it easier for team members to understand and maintain
the codebase, even when multiple developers are working on the same project.
3 Maintainability: Following coding standards promotes code that is modular, reusable, and
well-structured. This improves the maintainability of the codebase, as it becomes easier to
debug, refactor, and extend the code in the future.
4 Reduced Errors: Coding standards often include guidelines for error handling, input
validation, and security practices. By adhering to these standards, teams can reduce the
likelihood of introducing common coding errors and vulnerabilities.
5 Onboarding and Scalability: Coding standards provide a clear set of guidelines for new team
members, making it easier for them to understand and contribute to the codebase.
Additionally, adhering to coding standards facilitates scalability, as new developers can
quickly understand and work with existing code.
1 Code Quality: Following coding standards helps individuals write cleaner, more organized,
and more efficient code. This improves the overall quality of their work and reduces the
likelihood of introducing bugs or issues.
2 Professional Development: Adhering to coding standards helps individuals develop good
coding habits and improve their skills. By following best practices, individuals can enhance
their understanding of software development principles and become better programmers.
3 Code Reusability: Coding standards often emphasize modular and reusable code. By
following these standards, individuals can write code that is easier to reuse in future projects,
saving time and effort.
4 Collaboration: When individuals follow coding standards, it becomes easier for them to
collaborate with other developers. Consistent code formatting and naming conventions make
1. Naming Conventions
• Classes and Interfaces: (e.g., Athlete, BillingService)
• Methods and Functions: (e.g., Calculate Monthly Fee(), Get Weight Comparison())
• Variables and Parameters: (e.g., private Coaching Hours, current Weight Kg)
• Constants: UPPER_CASE or in a static class (e.g., MAX_COACHING_HOURS,
Competition Fee)
• Event Handlers: Event suffix added (e.g., btnCalculate_Click)
2. Code Formatting
• 4-space indentation throughout the project.
• Curly braces {} consistently placed on new lines.
• Maximum line length of 120 characters for readability.
• Blank lines to separate logical code blocks for clarity.
Coding standards are crucial rules that guarantee software code is readable, consistent, and
maintainable. By making code easier to comprehend, debug, and extend, coding standards help
individual developers become more efficient. It lowers errors, eliminates superfluous complexity,
and offers a clear framework that facilitates code revisits and improvements over time.
Coding standards are even more important for teams. By establishing a common coding style,
clearing up misunderstandings, and minimizing merge conflicts in version control systems, they
facilitate effective collaboration between numerous developers. Standards facilitate code reviews,
improve communication, and guarantee that everyone on the team can quickly understand, test,
and maintain each other's code. As a result, software quality improves, defects decrease, and
project handovers go more smoothly.