Foundations of Programming
Foundations of Programming
Software development is at the heart of the digital solutions that shape our lives.
From mobile applications to business systems, understanding the processes that
turn ideas into functional software is important for anyone interested in IT or wanting
to understand our digital world better.
● Learn what programming is, its history, and its role in software
development.
● Discover the Software Development Lifecycle's (SDLC) nature, the
blueprint of software creation, and how concepts evolve into products.
● Gain insights into the importance of user requirements in software
development and how to translate user needs into functional
specifications.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
source: freepik
At the heart of today’s digital revolution lies the science of programming. From the
alarm that wakes you up to global stock exchanges, every aspect of modern life is
infused with coded software. If you’ve ever wondered how your favourite applications
or websites function or thought about the engine under the vast expanse of digital
services, then you’re thinking about programming.
Programming is the act of instructing computers to perform specific tasks. At its core,
it’s a series of commands given to a computer to process information in a specific
way. To understand this, imagine a chef following a recipe. Each step in that recipe
corresponds to an instruction, and the entire dish represents the final program.
source: freepik
Computers, without instructions, are vast reservoirs of potential, waiting for direction.
By themselves, they can’t make decisions, nor can they perform tasks. They need
precise, step-by-step guidance.
Further Reading
Explore how computer programming is like the lifeblood of modern society. Learning
to program is like gaining a superpower that extends beyond creating software—it's
the key to simplifying banking processes, ensuring smooth supply chains, and
crafting the amazing online experiences we all love.
Reference: Mooc Blog Team 2022, Why Is Computer Programming Important?, MOOC Org (blog),
accessed 18 January 2023, <https://www.mooc.org/blog/why-is-computer-programming-important>
While programming is about writing code, software development is the wider process
of conceptualising, designing, testing, and maintaining applications, frameworks, or
systems. It’s not just about writing code but understanding the problem, knowing the
user, and ensuring that the software evolves as needs change.
Just as there are multiple languages to communicate with humans, there are a
myriad of programming languages to communicate with computers. Some popular
ones include:
● Python: Known for its simplicity, it’s a favourite for beginners and is widely
used in data science.
● Java: Versatile and object-oriented, it powers many enterprise-level
applications and Android apps.
● C++: An extension of C, this language is known for performance-critical
applications.
Each language has its strengths, and the choice often depends on the problem at
hand.
A day in the life of a software developer is diverse. While they do spend significant
time writing and refining code, they also:
● Brainstorm Ideas
Before any code is written there are sessions to define what needs to be
built.
● Debug
This is the process of finding and resolving defects or problems within the
program that prevent correct operation of computer software or a system.
● Collaborate
Developers often work in teams, collaborating with designers, testers, and
other specialists.
● Continuous Learning
The tech world is ever-evolving. Developers often find themselves learning
new languages or techniques.
Further Reading
Software engineers are the backbone of websites and applications we use every
day, but what’s going on behind the curtain? What does a day in the life of a software
engineer actually look like? Explore the tasks they work on to the people they talk to,
the tools they use, and what they think makes them successful.
Reference: Zoe Kaplan 2023, Day in the Life of a Software Engineer, Forage Blog, accessed 30
January 2024, <https://www.theforage.com/blog/careers/day-in-life-software-engineer>
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
The Software Development Lifecycle is generally divided into the following phases:
1. Requirement Analysis
This is the “listening” phase. Developers and stakeholders identify the needs,
constraints, and functionality desired in the software.
2. System Design
Based on the requirements gathered, a blueprint for the software system is
designed. This will guide the team through the development process.
3. Implementation
This is where the real action takes place. Developers write code based on the
design blueprint, turning theory into practice.
4. Testing
Before releasing the software into the wild, it’s tested rigorously to identify
bugs, errors, and areas for improvement.
5. Deployment
Once the software passes all tests, it’s launched and made available to users.
6. Maintenance
Software is never really ‘complete.’ It requires continuous updates,
improvements, and bug-fixes.
● Quality Assurance
Following a lifecycle ensures each step is rigorously examined and
fine-tuned, resulting in a higher-quality end product.
● Risk Management
SDLC allows developers and stakeholders to identify potential pitfalls or
bottlenecks early in the process, avoiding costly issues down the line.
Further Reading
SDLC is a structured process that is used to design, develop, and test good-quality
software. It is a methodology that defines the entire procedure of software
development step-by-step. Explore further each stage of the process.
Reference: Geeks for Geeks (n.d.), Software Development Life Cycle (SDLC), Geeks for Geeks,
accessed 30 January 2024, <https://www.geeksforgeeks.org/software-development-life-cycle-sdlc/>
Implementation Phase:
Testing Phase:
Deployment Phase:
Maintenance Phase:
Summary
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Before diving into strategies of collecting user requirements, let’s explore why it is
crucial in software development:
● Guiding Development
Offers clear guidelines for the development team on what needs to be
created.
● Budget and Timeline Planning
Helps in devising realistic budgets and timelines.
● Minimising Miscommunication
Reduces chances of misunderstandings between stakeholders and
development teams.
Further Reading
Clearly defined requirements are essential signs on the road to a successful project.
They establish a formal agreement between clients and providers that they are both
working to reach the same goal. Explore the different types of requirements you may
need to consider, and learn to differentiate between those that are functional and
non-functional.
Reference: Altexsoft staff 2023, 'Functional and Nonfunctional Requirements: Specification and
Types', Altexsoft blog, accessed 30 January 2024,
<https://www.altexsoft.com/blog/functional-and-non-functional-requirements-specification-and-types/>
● Stakeholder Interviews
Conducting one-on-one interviews with stakeholders, including potential
users, to understand their expectations, needs, and challenges with the
current system.
● Surveys and Questionnaires
Utilising these tools to collect data from a larger group of potential users,
gathering both quantitative and qualitative data.
● Observational Studies
Observing users interacting with the current system to identify pain points
and areas for improvement.
● Focus Groups
Generating a deeper understanding of user attitudes, perceptions, and
desires regarding the product through moderated discussions.
● Use Case Development
Creating specific scenarios that illustrate how users will interact with the
new system, identifying any gaps or areas for improvement early in
development.
Flow charts are used to model the flow of activities/events identified in a system.
Once requirements are captured, Flowcharts can be created to model the
process/logic of client requirements.
In a metropolitan area bustling with life, the central city library, a revered institution,
found that its manual book management system was increasingly unable to keep up
with the volume of visitors and the diversity of its book collection. In an effort to
modernise and streamline their operations, the library authorities decided to
transition to a digital library management system. The envisioned system would not
only expedite the lending process but would also offer an enriched user experience,
encouraging more individuals to utilise the library’s resources.
Preparatory Phase
Strategies Implemented
To fully grasp the user requirements, the project team adopted a multi-faceted
approach:
● Stakeholder Interviews
The team conducted in-depth interviews with a diverse group comprising
librarians, frequent library visitors, and even individuals who rarely visited
the library. This exercise helped in garnering a rich perspective on the
different expectations and potential improvements that could be
incorporated into the new system.
● Surveys and Feedback
In parallel, an online survey was rolled out, aimed at collecting quantitative
data regarding user preferences, issues faced with the current system,
and suggestions for the new system.
● Observational Studies
The team spent several days observing the day-to-day operations in the
library, noting the bottlenecks in the existing system and identifying areas
where technology could bring in efficiency and precision.
● Use Case Development
Based on the collected data, the team developed comprehensive use
cases, illustrating the different ways the proposed system would interact
with the users and other systems.
Development Phase
With a clear vision, the development phase kicked off, guided by the detailed user
requirements and specifications document crafted in the preparatory phase. A
modular approach was adopted, which facilitated a flexible and adaptive
development process.
Outcome
The librarians appreciated the automated notifications and reminders, which made
managing book returns more manageable. Moreover, the new system introduced a
recommendation feature, suggesting books based on users’ reading histories, which
was well-received, fostering a vibrant reading community within the library.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: The Digital Revolution - How Computers Are Rewriting the Story of
Humanity
This article invites readers on an exciting journey to understand the digital
revolution's core, where computers play a vital role in our fast-changing technology
world. Starting from the bulky computers in the 1950s to today's sleek and powerful
machines, the article explores how these incredible inventions have changed the
way we live, work, and have fun.
The Digital Revolution: How Computers Are Rewriting the Story of Humanity
Reference: ArtFex 2023, The Digital Revolution: How Computers Are Rewriting the Story of Humanity,
Medium (Blog), accessed 18 January 2023,
<https://medium.com/@artfex.info/the-digital-revolution-how-computers-are-rewriting-the-story-of-hum
anity-d2cbe23c4647>
Reference: Bigelow S. J 2020, What are the types of requirements in software engineering?,
TechTarget (website), accessed 18 January 2024,
<https://www.techtarget.com/searchsoftwarequality/answer/What-are-requirements-types>
Programming Resources
The resources in this section will help prepare you to get started with programming in
C++ – the language we will be using in this subject.
Expand All
Panels
Collapse All
Panels
Video: Should you Learn C++?
This video discusses the modern relevancy and context of C++, emphasising that it
is a language used for writing highly efficient and fast-running code, particularly in
areas such as embedded systems, game engines, and AI engines. The key
advantage of C++ is its ability to provide fast runtime due to its lower-level code,
closer to the CPU.
youtu.be/D7cCdzS4cXQ
(07:27)
Reference: Stefan Mischook 2023, Should you Learn C++ in 2023?, YouTube, accessed 30 January
2024, <https://youtu.be/D7cCdzS4cXQ>
Learning C++
Reference: Eduardo Corpeño 2021, 'Learning C++', LinkedIn Learning, accessed 18 January 2023,
<https://www.linkedin.com/learning/learning-c-plus-plus-14267389/setting-up-the-development-enviro
nment-14230629>
Watch only the Introduction and 'Section 2 - The Basics' (approx. 40mins)
Reference: Bill Weinman 2022, 'Section 2: The Basics', C++ Essential Training, LinkedIn Learning,
accessed 30 January 2024,
<https://www.linkedin.com/learning/c-plus-plus-essential-training-15106801/basic-syntax>
Module 2. Introduction to Programming
In this module, you will take the first steps on your journey to becoming an amazing
computer programmer by learning how you can instruct a computer to perform
interesting actions and solve complex problems that would take human minds years
to solve.
During the lectures, you are going to learn how to create a set of instructions that a
computer will execute, a program. You will learn how to speak the language of
computers by using programming languages. Also, you will learn how data is used to
store information that your programs can use to solve problems, and how operators
are used to transform (change) your data. Further, you will learn about user-defined
datatypes such as Structures, Unions and Enumerations.
● Learn what data data types are, their importance, and their application in
programming.
● Discover the functionality and structure of operators, and their importance,
and their application in programming.
● Gain insights into constants and literals, understanding how to create and
use them
● Learn user defined datatypes/structures such as: Structures, Unions and
Enumerations
The material in this module relates to the following subject learning outcomes:
SLO 2: Gain the ability to create and modify basic data structures such as
arrays and linked lists, along with performing operations like insertion,
deletion, and traversal.
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
1. In C++, data types are classified into primitive types (such as integers,
characters, and floating points) and abstract types, which are user-defined.
2. Variables in C++ store data and are declared with a specific data type; their
names must follow naming conventions and are used to manage data in
memory.
3. C++ uses cout for output and cin for input, with stream operators (<< and
>>) to handle data display and retrieval.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
A data type is a classification of data that tells the compiler or interpreter how the
programmer intends to use the data.
● Integer (int): Used for storing whole numbers (100, 20, 4, and so on...).
● Character (char): Used for storing a single character (4, b, $, and so
on...).
● Boolean (bool): Used for storing boolean or logical values (true or false).
Represented in memory as 1 for true and 0 for false.
● Floating point (float): Used for storing values with a decimal point
(3.1415927). Can have up to 7 decimal places.
● Double floating point (double): Used for storing values with a decimal
point (3.141592653589794). Can have up to 15 decimal places.
Data type modifiers are used with primitive data types to modify the length of data
that a particular data type can hold. Data type modifiers available in C++ are:
● Signed
● Unsigned
● Short
● Long
● Signed, unsigned, long and short modifiers can be used for int.
● Signed and unsigned can be used for char.
● Long can be used for double.
Section 2: Variables
Variables are used to store information that can be referenced and manipulated by a
computer program. It is called a variable because we can change the value stored. It
is a way of labelling data with a descriptive name, so our program is easier to
understand.
Variables are like containers that hold information. The purpose of them is to label
and store data in computer memory (RAM). Different types of variables require
different amounts of memory, and have a specific set of operations that can be
applied to them. Imagine a large warehouse with lots of storage bays, tables,
shelves, rooms etc. We can store different types of items in each of these places.
A variable has a valid C++ data type, like the primitive data types we just saw.
Examples are:
○ int: number = 3;
○ float: value = -23.45;
○ bool: finished = false;
○ char: letter = ‘a’;
Variable naming
It can also be used to retrieve the value stored (e.g., circumference = 2* PI * radius).
A name cannot begin with a number, and there are some defined naming
conventions for C++ variables, but there is no particular standard naming
convention, so you should use the naming convention designated by your company
or team.
Scope of a Variable
There are two different types of variables based on the scope.
○ Global Variable
○ Local Variable
Output in C++ is done via cout and the stream insertion operator << chains items.
In the above example, the endl can be used to produce a new line. Whenever an
endl is printed, the cursor moves to the beginning of the next line without any visible
output.
We can also use \n, which denotes a newline character just like endl. Similarly, you
could use \t which denotes tab character, to move the cursor to the next tab position.
Input in C++ is done via cin and the stream extraction operator >> reads input from
the keyboard and stores the value into a variable.
#include <iostream>
int main()
Topic 2. Operators
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Section 1: Operators
In the following example, ‘+’ is the addition operator and the variables numOne
and numTwo are operands. The addition operator tells the compiler to add both
numOne and numTwo.
#include <iostream>
int result = 0;
C++ has many built-in operators and they can be classified as:
● Arithmetic operators
● Relational operators
● Logical Operators
● Assignment operators
● Increment and Decrement operators
● Bitwise operators
● Special operators
Arithmetic Operators
- x-y Subtracts the second operand (y) from the first operand
(x)
% x%y The modulus operator divides the first operand (x) by the
second operand (y) and returns the remainder.
Assignment Operators
Relational Operators
Are used for comparing two operands, the result of a relational operator is a boolean
value that is either true or false.
Symbol Usage Explanation
<= x <= y Checks if the value of x is less than or equal to the value
of y.
Logical Operators
These take boolean values as input and return boolean values as output. Here, the x
and y are boolean values.
&& x && y Logical AND, returns true when both conditions are
satisfied. Otherwise, it returns false.
!y
() Parentheses L -> R
<, <=, >, >= Less than, Less than equal to, greater than, greater than
equal to
1. Constants in C++ are fixed values that do not change during program
execution and are defined using the const keyword
2. Literals are specific values directly written into the code, such as numbers or
characters, that represent fixed data of a particular type.
3. Structures and unions in C++ are user-defined types for grouping data, with
structures allowing different types of data to be combined and unions sharing
the same memory space for multiple data types, while enums define a set of
named integer constants for better code readability and management.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
int x = 5;
Both literals and variables have a value, and they both have a type. The type of a
variable is given in its declaration. The type of a literal is assumed from the value
and format of the literal itself.
Types of Literals
● Integer
● Floating-point (includes float and double)
● Character
● String
● Boolean
Defining constants
Constants are treated just like regular variables except that their values cannot be
modified after their definition. Use a constant variable to avoid accidentally changing
a variable that should not change.
There are two simple ways in C++ to define constants—by using:
● const keyword
● #define preprocessor
const
We can use the const prefix to declare constants with a specific data type. The
syntax for creating a constant variable is:
The constant variables should be initialised with a value when the variable is
created.
If we try to change the value of the constant variable after its initialisation, we will get
an error
#define preprocessor
#define PI 3.141592653589793238
Structures
Structure is a user-defined data type. It is used to combine different data types into
one unit.
Unions
Unions are user-defined data types. Similar to structures, they can declare and
contain members of different data types. How they differ from a structure is that
member variables in a union share the same memory location.
Enumerations (Enums)
Enums are user-defined data types that contain named integral constants. Enums
help to assign constants into a set of names, which makes programs more readable.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Converting unsigned integers to signed integers can lead to hidden
bugs
This blog post demonstrates the dangers of converting between two data types that
you learnt about in this week’s lectures, signed and unsigned integers. It is
exceptionally useful to understand how your programs might have accidental
problems, and this is a common source of problems.
Reference: Pluralsight (2016) 'Converting unsigned integers to signed integers can lead to hidden
bugs', available at:
https://www.pluralsight.com/blog/software-development/convert-unsigned-int-to-signed-int [accessed
16/09/2024]
C++ Unions
The process of creating paths that your program can follow is achieved with
conditional statements. This is the basis of AI (Artificial Intelligence) as your program
is now able to make decisions for itself based on the data you provide it!
During the lectures, you will learn about the many conditional statements that C++
provides, such as the If condition statement that lets your program execute
instructions only if some data is a specific value. If it is not that specific value you can
instruct your program to execute other instructions using an else conditional
statement.
The material in this module relates to the following subject learning outcomes:
SLO 2: Gain the ability to create and modify basic data structures such as
arrays and linked lists, along with performing operations like insertion,
deletion, and traversal.
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
This module introduces you to the conditional statements that C++ provides—if, if
else, if … else, switch, ?:, and also how to nest these conditions amongst each other.
To use these statements you will need to use relational operators which you learnt
about in the previous module, and we will recap again.
By combining both relational operators and conditional statements you can make
your programs make decisions! To understand the decisions that the program makes
you will learn about flowcharts which will provide a visual way of representing the
decisions and the outcomes.
if statement
Example:
{
cout << “You may enter!\n”;
}
if...else statement
Depending on the outcome of the condition, the if...else statement causes one of the
two possible statement(s) to execute.
{
cout << “You may enter!\n”;
}
else
{
cout << “You aren't old enough.\n”;
}
A switch case statement is used when we have multiple conditions that lead to
different outcomes. We can use lengthy if...else if...else, but it gets messy with more
than a few possible outcomes.
The switch case is a clean and efficient method of handling multiple conditions.
Example:
switch (age)
case 16:
break;
case 18:
break;
case 50:
break;
default:
break;
Topic 2. Loops
1. The for loop in C++ is used for iterating over a sequence of values with a
known number of iterations, defined by initialisation, condition, and increment
expressions.
2. The while loop repeatedly executes a block of code as long as a specified
condition remains true, suitable for scenarios where the number of iterations
is not known in advance.
3. The do-while loop guarantees that the block of code will run at least once
before checking the condition, making it useful for cases where an initial
execution is necessary.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Section 1: Loops
This topic introduces you to the three types of loop statements that C++
provides—for, while, do while. Like conditional statements, you need to use relational
operators. By combining both relational operators and loop statements you can
instruct your programs to execute a set of instructions as many times as you like.
You can also instruct the program to stop a loop by using special keywords in C++,
which we will soon cover.
Imagine a game that runs until the player closes it, to achieve this you will tell the
computer to run a sequence of instructions over and over again, using a loop, until
the player presses the quit button. Loop statements allow you to specify how many
times you want the computer to run a specific set of instructions. Flowcharts will
again be demonstrated to visualise how the computer will loop over your instructions.
So far, we have been writing statements that get executed sequentially, one
statement followed by another. Loops allow a programmer to repeatedly execute a
block of statements until a condition is satisfied.
Let’s say we want to print “Hello, world!” 5 times. We could do it sequentially, like
this:
Or we can use loops to make our code leaner, more efficient and DRY.
Loops are one tool you can use to keep code DRY.
Loop types
for loop
Example:
int main()
{
return 0;
}
while loop
while (condition)
{
statement(s);
}
Example:
int main()
{
int m = 1;
return 0;
do...while loop
Syntax:
do
{
statement(s);
} while (condition);
Example:
int main()
{
int m = 1;
do
{
cout << "Value of m: " << m << endl;
m++;
} while (m <= 6);
return 0;
}
Nested loops
The body of a loop can contain another loop known as a nested loop. The inner loop
must be completed each time through the outer loop.
In the following example, the ‘row’ loop starts first, then enters the ‘column’ loop and
executes the statements inside the column loop until it reaches 5 loops or iterations.
Then, it exits out of the column loop and goes through the row loop again as the
steps are repeated until the number of iterations through the ‘row’ loop reaches 5.
Sometimes, you might want to skip the execution of a loop for a certain condition or
terminate it immediately without checking the condition. In C++ there are two
statements to specifically alter the normal flow of a loop. They are:
● break
● continue
For example, we want to loop through the data of all aged people except those aged
55. Or if we want to find the first person aged 20. In these scenarios, break and
continue statements can be used.
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Data structures serve as the backbone for organising information in the realm of
programming. Much like how a library arranges books on shelves, data structures
help you organise and store data in your programs. Understanding how to properly
utilise these structures will set you on a path towards becoming a proficient
programmer.
Different tasks call for different types of organisation. In the world of data structures,
you have several options to fit your specific needs:
Linear Structures
● Arrays: Fixed in size, arrays offer quick access but fall short when it
comes to dynamic resizing. They’re best for situations where you know the
size of the data set in advance.
Hierarchical Structures
● Trees: Imagine a tree with a trunk, branches, and leaves. A tree structure
starts with a root node, which branches off into several sub-nodes, and so
on. Trees are commonly used in databases to facilitate quick data
retrieval.
● Graphs: Unlike trees, graphs can have nodes that are interconnected in
complex ways, allowing for a more flexible representation of relationships
between elements. They’re commonly used in network routing and social
networking applications.
Tabular Structures
● Hash Tables: These are akin to a magical library where you whisper the
name of a book and it appears before you. Hash tables use a unique key
to store data, offering almost instantaneous data lookup.
Further Reading
The choice of a good data structure makes it possible to perform a variety of critical
operations effectively. A data structure is not only used for organising data but also
for processing, retrieving, and storing data. Explore further the different categories of
data structures and the most commonly used types.
Reference: Geeks for Geeks n.d., Introduction to Data Structures, Geeks for Geeks, accessed 30
January 2024, <https://www.geeksforgeeks.org/introduction-to-data-structures/>
● Efficiency
The right data structure optimises both time and memory. In turn, this
makes your program run more swiftly, making tasks like data retrieval and
storage more effective.
● Ease of Operations
Data structures make it simpler to add, remove, or modify data. As your
programs grow more complex, this flexibility becomes increasingly
important.
● Data Organisation
When data is well-organised, your algorithms run more smoothly, making
your programs more reliable and user-friendly.
Section 3: QuickShop Case Study
source: freepik
Background
As the inventory grew, the existing system struggled to maintain performance levels,
causing delays in various processes including stock checks and billing. Realising the
critical role of data structures in efficient data management, QuickShop decided to
revamp its inventory system.
The Challenge
The central challenge was to design a system that could handle a vast and dynamic
range of products while ensuring quick and accurate data retrieval. The system
needed to facilitate seamless additions and removals of items, track inventory levels
in real-time, and offer rapid search capabilities to enhance the customer experience
at the checkout points.
The Strategy
Implementation
● Increased Efficiency
The system allowed for quicker data access and manipulation,
considerably reducing the time taken for inventory management and billing
processes.
● Ease of Scalability
As QuickShop expanded, adding new products and categories to the
inventory became a seamless process, enabling the supermarket to grow
without being hindered by its systems.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: C++ Decision-Making with if, if...else
This article explains in detail, with examples, how to effectively use the if, if...else
and Nested if...else decision-making statements in C++.
Reference: Programiz, 2024, 'C++ if, if...else and Nested if...else', Programiz (online), accessed 16
Sept 2024, <https://www.programiz.com/cpp-programming/if-else>
Reference: Programiz, 2024, 'C++ switch..case Statement', Programiz, accessed 16 Sept 2024,
<https://www.programiz.com/cpp-programming/switch-case>
Reference: Programiz, 2024, 'Flow Control', C++ Programming, Programiz, accessed 16 Sept. 2024,
<https://www.programiz.com/cpp-programming/>
" that covers all of the concepts from this and previous modules.
Reference: CodeBeauty, 2021, 'Data Structures Explained', YouTube, accessed 16 Sept. 2024,
<https://www.youtube.com/watch?v=_T42E9RkWVQ>
Module 4. Data Structures Pt. 2
Data structures continue to play a crucial role in computer science, enabling efficient
data management and manipulation. Building upon the foundation laid in Part 1, this
module delves further into advanced data structures such as stacks, queues and
linked lists.
● Discover the functionality and structure of lists and arrays, and how to
manipulate them in different programming environments.
● Gain insights into linked lists, understanding how to build and operate
them, including insertion, deletion, and traversal.
● Learn about the structure and functionality of stacks, queues, and binary
trees, and how they can be utilised in programming.
● Discover the principles of graphs, sets, and hash tables, and understand
how to manipulate them in various programming environments.
● Design and manipulate user-defined data structures, integrating them into
real-world applications.
● Create an array and perform basic operations like insertion and deletion
● Implement stacks and queues using C++.
● Build a singly linked list and perform operations like insertion, deletion, and
traversal.
The material in this module relates to the following subject learning outcomes:
SLO 2: Gain the ability to create and modify basic data structures such as
arrays and linked lists, along with performing operations like insertion,
deletion, and traversal.
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
1. Lists can be either static or dynamic. Static lists have a fixed size, while
dynamic lists (dynamic arrays) can grow or shrink at runtime.
2. Operations like insertion and deletion are fundamental to understanding how
lists and arrays work.
3. Lists and arrays are used in various applications such as managing
databases, building temporary data storage, and data retrieval.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Understanding Lists
● Dynamic Size
○ A list is akin to a magic bag that adjusts its size to
accommodate or remove items as necessary, showcasing a
dynamic nature.
○ Example: Imagine creating a to-do list where you can
continually add new tasks and remove completed ones without
any restriction.
● Ordered Collection
○ Lists are known to maintain a systematic order, ensuring every
item is accessible based on its position or rank in the list.
○ Example: Consider a playlist where songs are arranged in a
specific order, allowing you to find and play any song based on
its position in the list.
Understanding Arrays
Arrays stand as another pivotal data structure, designed to hold more than one value
at a time. They can be visualised as a collection of variables, each identified with a
unique index number, facilitating rapid access. The primary attributes of arrays
include:
● Fixed Size
Contrary to lists, arrays in C++ have a fixed size, which is determined at
the time of creation and cannot be changed thereafter. It's a limitation that
requires the size to be known at compile time. However, you can use
vectors in C++ if you need a dynamic size similar to lists.
● Index-Based Access
In C++ arrays, each element is identified by a unique index number,
allowing swift and direct access to any element based on its position in the
array.
Further Reading
Reference: Abhishek Sharma 2022, 'Data Structures in C++ | Array | Linked List | Stack', PrepBytes
Blog, accessed 30 January 2024,
<https://www.prepbytes.com/blog/arrays/data-structures-in-c-array-linked-list-stack/>
source: BoardInfinity
When navigating lists and arrays, the selection of the right data structure based on
your specific requirements is imperative. But how do you decide on the right one?
Let's look at strategies that can guide you to use these structures most effectively:
source: freepik
Links to an external site.
Background
Problem Statement
In the initial phase, the management identified a few pressing issues with the current
inventory system:
Implementation
● Individual Product Details with Lists: On the other hand, lists were
employed to manage individual product details within each category. Lists,
with their dynamic size, allowed for seamless addition or removal of
products, offering flexibility in managing the ever-changing inventory
dynamics.
● Training and Deployment: Before full-fledged deployment, staff were
trained to adapt to the new system, followed by a phased rollout to ensure
smooth transition without hindering the daily operations.
Outcome
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Stacks
● Push: This operation adds an item to the stack, expanding its size. It
places a new item on top of the stack, ready to be the first to be removed
when the time comes.
● Pop: This function removes the top item from the stack, reducing its size.
It facilitates the retrieval and removal of the most recently added item.
● Peek: A utility function that permits viewing of the top item without its
removal, providing a way to know the item at the top without altering the
stack structure.
Learn more about Stack operations
●
Practical Applications
Queues
A queue is analogous to a line of people at a bank, adhering to a First-In-First-Out
(FIFO) principle. This system ensures that the first item added is the first to be
removed, maintaining an order based on the addition time of the elements.
● Enqueue: This method adds an item to the rear of the queue, ensuring the
maintenance of the FIFO structure.
● Dequeue: This method removes an item from the front of the queue,
abiding by the FIFO rule.
● Front: This function allows the viewing of the front item without its
removal, providing insight into the next item to be dequeued without
altering the queue structure.
Learn more about Queue operations
Practical Applications
Background
In an attempt to modernise its public transportation system and enhance the daily
commuting experience of its citizens, the MetroCity local government initiated a
project to integrate technology-driven solutions.
They identified that the incorporation of specific data structures — stacks, queues,
and trees — could play a pivotal role in addressing current inefficiencies and offering
an improved, streamlined service.
Problem Statement
MetroCity was grappling with a congested and disorganised public transport network.
Commuters were often met with irregular bus services, unclear transit routes, and
overcrowded vehicles. Moreover, the existing system lacked a proper method to
gather and utilise data for planning and optimisation. MetroCity needed a
transformative solution to organise and streamline its transport services.
Implementation
To improve the system, MetroCity introduced a digital platform that utilised the
principles of stacks, queues, and trees data structures in the following manner:
Outcome
1. Linked lists can be singly linked or doubly linked. Singly linked lists contain
pointers to the next node, while doubly linked lists contain pointers to both the
next and previous nodes.
2. Linked lists are dynamic data structures, which means they can easily grow or
shrink during execution.
3. Operations like insertion, deletion, and traversal require an understanding of
pointers and the interconnected nodes to be efficient.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
source: freepik
In the realm of data structures, a linked list holds a significant place. It is essentially a
linear collection of data elements or nodes, wherein each element points to the next
one, forming a sequence or link.
There are different variations of linked lists, each catering to different needs:
● Singly Linked List: Contains nodes which have a data part and a link to
the next node in the sequence.
● Doubly Linked List: Each node contains, besides the next-node link, a
second link field pointing to the ‘previous’ node in the sequence, which
facilitates traversal in both directions.
● Circular Linked List: The last node in the list points back to the first node,
forming a closed loop.
Further Reading
Understanding the Basics of Linked List
Explore the purpose and structure of linked list with visual representations of the
different types.
Reference: Geeks for Geeks n.d., Understanding the Basics of Linked List, Geeks for Geeks,
accessed 30 January 2024, <https://www.geeksforgeeks.org/what-is-linked-list/>
Memory Allocation
Unlike arrays, linked lists do not allocate a contiguous memory block; instead,
memory is assigned as and when a new node is added. This dynamic memory
allocation can prevent wastage of memory space and offer more flexibility in data
handling.
Insertion and Deletion
In linked lists, the insertion and deletion of nodes are more straightforward
processes. You are not shifting the elements but merely changing the links, which
can be done in constant time, thereby saving computational resources.
Real-World Applications
Linked lists find their application in various real-world scenarios. Here are a few
examples:
source: freepik
Links to an external site.
Background
In the ever-evolving digital landscape, social media platforms stand as bustling hubs
of interaction and content exchange. Imagine a particular platform, let’s call it
‘SocialSphere’, that has witnessed an exponential growth in its user base in recent
years. Initially, the user feed mechanism was based on an array data structure.
However, as the platform expanded, it became increasingly apparent that the
array-based structure was struggling to keep up with the dynamic nature of user
feeds, leading to slower updates and a less responsive user interface.
Preliminary Challenges
Implementation
To overcome these challenges, the development team at SocialSphere embarked on
rethinking their data management strategy. They realised that a doubly linked list
would serve as an ideal solution, as it could handle dynamic data more efficiently.
Here’s how they approached the revamping process:
Before the fully-fledged deployment, rigorous testing was carried out to ensure the
efficiency and reliability of the new system. The development team created
simulations to test the performance of the new structure under different loads and
conditions.
Outcome
Expand All
Panels
Collapse All
Panels
Reading: Linked List Data Structure In C++
A linked list is a linear dynamic data structure to store data items. This article gives
further explanation of this data structure and demonstrates various operations that
can be performed on linked list with code examples.
Reference: (2023) 'Linked List Data Structure In C++', Software Testing Help, accessed 30 January
2024, <https://www.softwaretestinghelp.com/linked-list/>
Reference: Sharma, A. (2022) 'Data Structures in C++ | Array | Linked List | Stack', PrepBytes Blog,
accessed 16 Sept. 2024,
<https://www.prepbytes.com/blog/arrays/data-structures-in-c-array-linked-list-stack/>
Module 5. Modular Programming & Algorithms Pt. 1
The practice of modular programming and understanding of standard algorithms is
central to efficient coding and software development. This module introduces the
principles of modular programming and explores some of the standard algorithms
that are commonly used in the industry. From breaking down complex code to
understanding sorting techniques, this module is a step towards mastering the
building blocks of programming.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
Accordingly, it is suggested that you allow:
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
In the fast-paced
world of software development, efficiency and adaptability are key to meeting
ever-changing demands. Modular programming serves as a beacon in this regard,
promising streamlined processes and enhanced productivity.
● Separation of Concerns
This principle dictates that a program should be segmented into distinct
sections, with each handling a specific aspect of the functionality. This
separation ensures a cleaner, more organized code base which is easier
to maintain and upgrade.
● Reuse of Code
Modular programming encourages the development of reusable modules
that can find utility in various projects, promoting efficiency and reducing
the overall development time.
● Ease of Maintenance: One of the standout benefits of this approach is
the ease with which modules can be updated, added, or removed
individually, without affecting other parts of the program. This makes
maintenance less cumbersome and time-consuming.
● Increased Reliability
By isolating errors to individual modules, it becomes considerably easier to
identify and rectify issues, thereby enhancing the reliability of the software.
Benefits
● Parallel Development
Different teams can work on separate modules simultaneously, which can
significantly speed up the development process.
● Improved Testing
Each module can be tested individually, thereby ensuring higher reliability
and stability of the system.
Challenges
● Integration Issues
Although modules are developed independently, integrating them can
sometimes pose challenges, especially if the modules are developed by
different teams.
● Complexity
As programs grow in size and complexity, managing numerous modules
requires careful planning and coordination to prevent potential issues and
maintain coherence.
Section 2: Functions
A function is a group of statements with a name. We can only execute the group of
statements by using the name of the function. Every C++ program has at least one
function, which is main().
Creating a function
return statement;
}
Parts of a function
● return_type
is the data type of the value of the function returns. Some functions
perform the desired operations without returning a value. In this case, the
return_type is the keyword void.
● function_name
is the actual name of the function. The function name and the parameter
list together constitute the function signature.
● parameter_list
A parameter is like a placeholder. When a function is called, we pass a
value to the parameter. This value is referred to as the actual parameter.
The parameter list refers to the type, order and number of parameters of a
function. Parameters are optional.
● body
The function body is between the curly braces {}, and contains the
statements executed by the function.
● The return statement terminates the current function and returns the value
of the function to its caller.
Function declaration
A minimal function declaration consists of the return type, function name and the
parameter list. For example:
● The return type, which specifies the type of the value that the function
returns, or void if no value is returned.
● The function name, which must begin with a letter or underscore and
cannot contain spaces.
● The parameter list, a local name by which the values may be accessed
inside the function.
Function parameters
Parameters act as local variables inside the function and are specified after the
function name, inside the parentheses.
The void keyword, used in the examples before, indicates that the function should
not return a value. If we want the function to return a value, we can use a data type
(such as int, float, char, etc...) instead of void, and use the return keyword inside the
function.
Example 1
void main() {
int myAge = 23;
printAge(23);
}
Example 2
void main() {
int x = 10;
int y = 5;
add (x, y);
}
Background
Problem Statement
The existing software system at ABC Healthcare was monolithic and rigid, making it
difficult to implement new features and upgrades. The system was also prone to
errors, with issues in one part often affecting the entire system. ABC Healthcare
sought a robust and flexible solution that would overcome these challenges.
Implementation
Outcome
1. Understanding different sorting algorithms like bubble sort and quick sort
provides insights into computational efficiency and time complexity.
2. Standard algorithms solve common problems and are widely applicable in
data science, machine learning, and general software development.
3. Comparing the performance of different algorithms is crucial for choosing the
most efficient solution for a given problem.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Their power lies in several features such as optimised resource utilisation, reducing
complexity, offering predictability and consistency, and showcasing adaptability and
scalability.
As we delve deeper into this module, we will illuminate two vital components of
standard algorithms: space complexity and sorting algorithms.
These foundational elements not only enhance your understanding but also equip
you to craft robust and proficient systems in the future.
Space Complexity
Sorting Algorithms
The company noticed a rising trend in delayed deliveries and identified that the
primary cause was the disorganised product retrieval process within the warehouse.
This led to the decision to optimise the warehouse operations using suitable
standard algorithms.
Objective
● Application: Used for sorting less frequently bought items where the data
set is relatively small.
● Benefit: Simplicity and ease of implementation.
Moreover, to further optimise the space utilisation in the warehouse, the team
analysed the space complexity of various processes and implemented strategies to
minimise memory usage in the warehouse management system.
Outcome
Post-implementation, the warehouse witnessed a substantial reduction in product
retrieval time, resulting in faster order processing and happier customers. The
meticulous sorting facilitated easy and quick access to products, optimising the
workflow and enhancing the overall efficiency of the warehouse.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Understanding Pass-By-Reference
Example
void main() {
int x = 10;
int y = 5;
calculate(x, y);
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Modular Programming
This resource explores modular programming, a method of designing software by
breaking down functions into independent modules. It emphasises grouping lines of
code into functions, which can be either for program control or specific tasks.
Modular Programming
Reference: Busbee K.L. & Braunschweig D 2024, Modular Programming, rebus Community (online
publication), accessed 18 January 2024,
<https://press.rebus.community/programmingfundamentals/chapter/modular-programming/>
Reference: Kenneth Leroy Busbee n.d., 'Modularization and C++ Program Layout', LibreTexts,
accessed 31 January 2024,
<https://eng.libretexts.org/Bookshelves/Computer_Science/Programming_and_Computation_Fundam
entals/Programming_Fundamentals_-_A_Modular_Structured_Approach_using_C_(Busbee)/02%3A_
Introduction_to_Programming/2.03%3A_Modularization_and_C_Program_Layout>
You've learned that functions let you reuse blocks of code numerous times, saving
you from having to repeat lots of code. This module looks at Header files that work
similarly, allowing you to reuse entire files that include any number of functions. They
let you separate programs into several files and allow you to use the code of one file
in another file.
You will also learn about a fundamental data type of C++, the string. You previously
learned how to store your name and other words in arrays of characters. This is
done so frequently that C++ has a data type that will handle all the complexity for
you, and allow operations of words such as adding (concatenating) words together to
form a sentence.
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Understanding Pass-By-Reference
Pass-by-reference is a parameter passing method where a function receives the
reference or memory address of the arguments, rather than their values. This
approach allows the function to access and modify the original variables, which can
enhance the functionality and efficiency of programs. Key features of this method
include:
Further Reading
Reference: Geeks for Geeks 2023, 'Parameter Passing in C++', Geeks for Geeks, accessed 31
January 2024, <https://www.geeksforgeeks.org/parameter-passing-techniques-in-cpp/>
In the competitive financial sector, analytics tools play a pivotal role in facilitating
data-driven decisions. A leading financial analytics firm was grappling with
performance bottlenecks in their flagship tool, which was primarily attributed to the
existing method of pass-by-value parameter passing. This method was causing
delays, particularly during real-time data analysis phases, leading to high memory
consumption and consequently, slower processing times.
Objective
The primary objective was to augment the tool's performance by reducing memory
consumption, thus facilitating more efficient real-time data modification capabilities.
The aim was to revamp the system's core functionalities to streamline processes,
reduce latency, and offer more accurate and timely insights to their clients.
Implementation
To address the issue, the firm initiated a comprehensive analysis to pinpoint the
exact causes of the delays. It was decided to shift from the current pass-by-value
parameter passing method to a more efficient pass-by-reference parameter passing
technique. This shift involved significant changes in the coding structure and data
handling processes within the tool. Key strategies implemented included:
Outcome
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
In this topic, you will learn how to create, modify, and use Header files. You will then
learn about libraries of functions that you can use within your program, by including a
header file, which lets you use decades of work by incredible programmers to help
you solve common problems in your own programs. You will learn about common
libraries such as the C math library and C type library.
Header files usually have a .h extension by convention. We can use as many header
files in our program as we like, and we can define our own.
Header files allow us to use existing functions already defined and tested by other
programmers. One programming principle is to avoid ‘recreating the wheel’. In other
words, if someone has already done it and it works well and is used by many, there
is no reason not to use it yourself.
A large .cpp file increases the compile time. As our program gets bigger we will have
more lines of code, and if everything is in a single file, then everything must be
recompiled every time you make a change.
It keeps our code more organised. If you separate concepts into specific files, it is
easier to find the code you are looking for when you are making modifications. The
biggest source of bugs in code is caused by code that is hard to understand because
it is poorly organised.
○ Separately compiled.
○ Automatically or manually linked by the compiler when your
source code is built.
Example
#include <iostream>
int main()
{
cout << "hello, world!" << endl;
return 0;
}
This example program prints “Hello, world!” to the console window using cout. This
program does not have any definition or declaration about the cout, so how does the
compiler know about it?
The answer is, cout has been forward declared in the iostream header file.
When we use #include <iostream> we are requesting the preprocessor to copy all
the contents of iostream from the file named “iostream” into our source.cpp.
Topic 3. Strings
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Section 1: Strings
Strings are handily provided to us in a library that we can include in our project via a
header file, another great example of a library we can use in our project that saves
us having to write our own functions!
During the lectures, you will learn about all the operations that we would want to
perform on a string, such as changing out letters in a string, comparing two strings to
see if they are the same, adding characters to the end of a string, and much more.
By using strings we can quickly change the data within a string, such as adding new
words to a string or replacing words in a string, for example, we could turn the string
from “Happy” to “Happy Birthday!” or “Happy Holidays!” by simply adding two words
to a string.
C-strings
C-strings, or character strings, are arrays of characters in C++ that end with a null
terminator (\0), which indicates the end of the string. Unlike the std::string
class, C-strings require manual memory management and careful handling to avoid
overflow and other issues. While they can be used for string manipulation, they often
involve more complex syntax and functions from the C standard library, such as
strlen() for length and strcpy() for copying.
Example:
Function Description
https://docs.microsoft.com/en-us/cpp/standard-library/cstring
Links to an external site.
The standard C++ library provides a string class type that can be used for storing
text, such as “hello” or “My name is Tom!”.
String objects are dynamic, unlike character arrays, strings are not fixed.
The size of a string grows and shrinks when its contents change.
https://en.cppreference.com/w/cpp/string/basic_string
To use strings, we must include an additional header file in the source code.
#include <cstring>
Create a variable of type string and assign the value enclosed in double quotes:
string message = "Hello";
We should also include using namespace std; to make the short name string visible
instead of std::string.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Pass-by-value vs Pass-by-reference — with C++ examples
This article explains how functions handle values when called in programming. When
calling a function, values can be passed either by value or by reference. The article
includes simple code examples for both pass-by-value and pass-by-reference,
clarifying the concepts with code and comments.
(09:39)
Reference: NeuralNine (2020) 'Header Files - C++ Tutorial For Beginners', YouTube [online video]
<https://www.youtube.com/watch?v=0TCh01BBlrM> Accessed 16 Sept. 2024
(19:10)
Reference: NeuralNine, 2020, 'Strings - C++ Tutorial For Beginners', YouTube [online video]
<https://www.youtube.com/watch?v=zo6B_eJmeLo> Accessed 16 Sept. 2024
Module 7. Tools and Techniques for Debugging I
Debugging is an essential skill for software developers, providing the means to find
and fix errors in code. With the right tools and techniques, debugging can be a
smooth process that enhances the efficiency and quality of a program. This module
offers a comprehensive look at integrated development environments (IDEs),
stand-alone debugging tools, and tracing code execution.
● Understand what IDEs are and how they facilitate software development,
including setting up and exploring an IDE through practical applications.
● Learn about various stand-alone debugging tools and how to use them
effectively, focusing on techniques like breakpoints and stepping-through
functions.
● Delve into tracing techniques that assist in debugging, such as using
"Assert," "Print," and "Stop."
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
An IDE is a powerful software suite that combines various features and utilities to
facilitate the seamless development of software applications. Essentially, it is a
one-stop solution that aids programmers in writing, testing, and deploying code more
efficiently, effectively shortening the development cycle and enhancing productivity.
Today, IDEs are central to the software development landscape. They have not only
simplified coding but also fostered collaboration and innovation, allowing teams to
work cohesively and leverage each other's expertise to build complex and
sophisticated software solutions. Through features like debugging, code completion,
and collaboration tools, IDEs have truly transformed the way programmers approach
software development.
Explore the core functionalities of an IDE and understand the diverse customisation
opportunities that they offer to cater to individual project needs.
Features of an IDE
Most IDEs provide extensive personalisation options, allowing for the addition of
extensions that support different languages, debuggers, or version control systems.
For example, Visual Studio Code maintains a marketplace for a variety of extensions
to accommodate diverse needs.
● Integrated Terminal
An attribute that optimises your workflow by enabling shell commands
execution directly within the IDE.
● Code Profiling
Certain IDEs offer built-in tools for measuring various metrics such as
memory usage and CPU consumption.
● Database Management
Some IDEs incorporate features for executing SQL queries and managing
databases directly within the platform.
● Dependency Management
Facilitates easy addition, update, or removal of external libraries that your
project relies upon.
● Code Review Tools
These facilitate team members to comment on each other’s code, propose
changes, and merge pull requests directly within the IDE.
● Support for Multiple Languages
Most IDEs are versatile, offering support for a range of programming
languages.
● Collaboration Features
Modern IDEs come equipped with features to foster team collaboration,
including functionalities like pair programming, code sharing, and real-time
coding sessions. Visual Studio, for instance, hosts a feature named “Live
Share” for this purpose.
Further Reading
What is an IDE?
Explore the IDE concept further and discover the different types such as Desktop
IDEs, Cloud IDEs, Mobile App Development IDEs, and Database-Specific IDEs.
Learn how to choose an IDE based on factors like programming language, operating
system, pricing model, and features.
Reference: Geeks for Geeks, n.d., 'What is an IDE?', Geeks for Geeks, accessed 31 January 2024,
<https://www.geeksforgeeks.org/what-is-ide/>
In this case study, we examine a real-world scenario where a team of data scientists
at a prominent research institution leveraged the power of an Integrated
Development Environment (IDE) to streamline their research process and enhance
the quality of their work.
Scenario
A group of data scientists were tasked with developing complex machine learning
models to analyse vast datasets for a critical research project. The team faced
challenges in managing code, data, and computational resources efficiently, with
their workflow involving coding, data analysis, and version control.
To address these challenges, the team opted for JupyterLab, a web-based IDE
specifically tailored for scientific computing and data science workflows. JupyterLab
offers an integrated environment that encompasses text editors, terminals, data file
viewers, and other tools essential for data analysis and scientific computing.
With JupyterLab, the team could centralise all their tools and resources in one place.
They were able to write code, perform data analysis, and manage version control, all
within a single platform. The following features of JupyterLab were particularly
beneficial:
1. Interactive Computing
The team could create and share documents that contained live code,
equations, visualizations, and narrative text, fostering collaborative analysis
and data exploration.
2. Extensibility
JupyterLab offered the team the flexibility to customize and extend their
environment with additional tools and features, aligning with the specific
requirements of their project.
3. Integrated Tools for Data Visualisation
The IDE provided powerful tools for data visualisation, enabling the team to
generate insightful graphs and charts that facilitated data interpretation and
reporting.
4. Version Control
JupyterLab's integration with version control systems allowed the team to
manage changes to their codebase efficiently, tracking revisions and
maintaining a history of modifications.
Outcome
Moreover, the platform's user-friendly interface and powerful tools for data analysis
and visualisation helped the team to glean more insightful findings from their data,
contributing to the success of their research project.
1. Stand-alone debugging tools can offer specialised features not found in IDEs,
making them useful for targeted debugging scenarios.
2. Features like setting breakpoints and stepping into/over functions are
essential for thorough debugging.
3. Some stand-alone debugging tools work across multiple platforms and
languages, offering more flexibility.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
These are specialised tools designed to function independently from an IDE, offering
functionalities like code inspection, breakpoint management, and sometimes reverse
engineering capabilities. These tools are versatile and can provide deep analysis
and insights into your code’s behavior, often more than what's possible with an
integrated debugger.
1. GDB
2. Links to an external site.
3. (GNU Debugger)
A popular open-source debugger, accommodating numerous languages
including C and C++.
4. WinDbg
5. Links to an external site.
6.
A comprehensive debugger for Windows, facilitating both kernel-mode and
user-mode debugging.
7. Fiddler
8. Links to an external site.
9.
Predominantly used to debug HTTP transactions.
10. Wireshark
11. Links to an external site.
12.
A tool focused on network debugging, it captures and analyses network
packets.
13. Valgrind
14. Links to an external site.
15.
This tool is significant for memory debugging, leak detection, and profiling.
1. Installation
Download and set up the tool compatible with your OS and programming
language.
2. Code Configuration
Adjust your code to be debug-ready, typically by including debugging
information during compilation.
3. Launching the Debugger
Load your code into the opened debugger.
4. Setting Breakpoints
Establish points in the code where you wish to pause for inspection.
5. Start Debugging
Execute the debugger, which will run your code until a breakpoint is reached,
facilitating variable, memory, and CPU registers inspection.
6. Step Through Code
Further execute your code step-by-step to comprehend its behaviour in
various scenarios.
Further Reading
Reference: Sonar staff, n.d. 'debugging: basic beginner's guide', Sonar, accessed 31 January 2024,
<https://www.sonarsource.com/learn/debugging/>
Section 3: Case Study - Debugging Memory Leaks in a Web Application
Background
Scenario
Despite having used the debugging functionalities integrated into their preferred IDE,
the team has struggled to pinpoint the source of the memory leak. The intermittent
nature of the issue and the vast codebase were making it increasingly difficult to
locate the exact point where the leak was occurring. The clock was ticking, and the
pressure to resolve the issue promptly was mounting.
Decision to Use Valgrind
Realising that a more specialised approach was needed, the team decided to utilise
Valgrind, a renowned stand-alone debugging tool. Valgrind is well-regarded in the
industry for its ability to provide detailed insights into memory usage and potential
leaks, often outperforming integrated debugging tools in this aspect.
The team initiated the process by configuring their codebase to include detailed
debugging information, making it compatible with Valgrind's analysis tools. After
setting up Valgrind, they ran the application through various scenarios, with Valgrind
monitoring the memory allocations and deallocations happening in the background.
After a series of rigorous sessions with Valgrind, the team successfully identified the
issue: a complex data structure was not being cleared properly, leading to gradual
memory buildup over time. Armed with this detailed information, they were able to
address the issue at its root, optimizing the code to prevent memory leaks and
improving the overall stability of the application.
Now, the application ran smoother, with significantly reduced chances of crashes due
to memory leaks. The team also documented their experience with Valgrind, creating
a guideline for leveraging stand-alone debugging tools for future projects, fostering a
culture of continuous learning and adaptation.
Topic 3. Tracing Code Execution
1. Tracing techniques such as assert, print, and stop provide real-time insights
into how the code is being executed.
2. Tracing is invaluable for quickly identifying the origins of errors or unexpected
behaviours in code.
3. Some tracing methods allow for conditional monitoring, executing only when
specific conditions are met, thus providing focused debugging.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
● Manual Tracing
Involves going through the code line-by-line manually, keeping track of
variables and flow of execution.
● Print Statements
Inserting print statements at key points to display the current state or value
of variables.
● Built-in Debuggers in IDEs
These allow you to pause execution, step through code one line at a time,
inspect the state, and even change variables in mid-execution.
● Profiling Tools
Specialised tools that offer in-depth statistics about resource consumption
of functions.
● Tracing Software
Designed to track the execution of code and report back in various
formats.
In this section, we delve deeper into each method of tracing code execution,
providing a comprehensive guide on how to use them effectively, alongside their
advantages and disadvantages.
Manual Tracing
Advantages
It’s a straightforward method that doesn’t require any additional tools, providing a
raw understanding of the code's flow.
Disadvantages
Can be quite time-consuming and prone to human error, especially for complex code
with numerous lines and functions.
Print Statements
This technique involves inserting print statements at key points in the code to
monitor the state or value of variables as the program runs.
How to Use
Depending on the programming language, use functions like print() in Python or
System.out.println() in Java to insert messages that will display the current
state at various stages in the code.
Advantages
It offers a quick way to monitor the code’s behaviour in real-time.
Disadvantages
Can clutter the code, making it less readable, and may not provide in-depth
information for complex debugging scenarios.
How to Use
Configure the debugger in your IDE and set breakpoints at critical points in the code.
Once the debugger is running, you can inspect variables and the flow of execution
as it hits these breakpoints. Additionally, you have the flexibility to modify variables
during runtime to test different scenarios.
Advantages
These debuggers are powerful, offering extensive features that facilitate a deep
analysis of code behaviour.
Disadvantages
May have a steep learning curve, particularly for beginners, and integrating them into
the workflow can sometimes be complex.
Profiling Tools
Profiling tools are specialised utilities that provide detailed statistics on the resource
consumption of various functions in your code, helping to identify bottlenecks and
optimize performance.
How to Use
Run these tools alongside your code. They generate a report outlining aspects like
time-consuming functions and memory usage, offering insights into the areas where
optimisation is necessary.
Advantages
These are excellent resources for optimising code, providing deep insights into the
performance characteristics of your application.
Disadvantages
While great for performance optimisation, they might not be the best tools for
identifying logic errors or understanding complex algorithmic flows.
Tracing Software
Tracing software is designed to meticulously track the execution of code and report
the findings in different formats, offering real-time insights into the program’s
behaviour.
How to Use
Integrate the software into your development environment and run your code through
it. These tools provide a detailed trace of the execution, offering insights that can be
invaluable in debugging complex issues.
Advantages
Can provide real-time insights and comprehensive data about code execution,
facilitating deep analysis and understanding of code behaviour.
Disadvantages
May be an overkill for simple projects and can sometimes introduce a performance
overhead.
Further Reading
Reference: Josh Weinstein 2020, 'Tracing Code in C++', Medium, accessed 31 January 2024,
<https://medium.com/swlh/tracing-code-in-c-fd9470e3bf5>
Faced with a recurrent problem where items would mysteriously vanish from
customers' shopping carts, causing annoyance and a potential drop in sales, the
development team needed to pinpoint the underlying issue. The problem seemed
random and elusive, making the traditional approaches ineffective in diagnosing the
root cause.
Gathering Data
After numerous debugging sessions, the team unearthed the core of the problem: a
malfunction within the updateCart() function. This function, meant to adjust the
shopping cart's status when an item's quantity was altered, harboured a bug that
removed items under specific conditions - notably, when a customer had more than
five items in the cart and chose to modify the quantity of any item.
Implementing the Solution
Having identified the problem, the team embarked on a mission to rectify it:
Outcome
The rigorous approach and the synergistic use of multiple debugging methods
yielded results, and the disappearing items issue was finally resolved. The proactive
response not only ensured a smoother user experience but also potentially saved
the business from significant revenue losses. This episode fortified the team's
confidence in the power of detailed code tracing and showcased how a multifaceted
approach could effectively untangle even the most perplexing issues in software
development.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: C/C++ Debugging Tools
This article provides an overview of various debugging tools available for C/C++
applications. It covers different aspects of debugging, starting with the importance of
automated testing, including Test-Driven Development and unit test frameworks like
QTestLib, Google Test, and Catch.
Reference: David Faure, 2022, 'C/C++ Debugging Tools', KDAB [online] url:
https://www.kdab.com/c-cpp-debugging-tools/ [Accessed 31 Jan. 2024]
Reference: Anastasia Kazakova & Greg Law, 2021, 'Top Tips for Debugging C++', Jet Brains [online]
url: https://blog.jetbrains.com/clion/2021/06/7-top-tips-for-debugging-cpp/ [Accessed 31 Jan. 2024]
In this talk, experienced developer Sebastian Theophil takes you through the entire
debugging process, starting with a program that crashes. What do we do next?
Which questions do we have to ask? What information do we need? What can we do
to find the cause of the crash? Which tools can help us in this quest, and, last but not
least, what can we do to make sure this bug never happens again?
(44:22)
Reference: Sebastian Theophil, 2023, 'A Guide to Debugging C++ Code: Practical and Interactive
Examples', YouTube [online video] url: https://youtu.be/Rc2hFf1HVow [Accessed 19 Jan, 2024]
Reference: Mike Shah, 2022, 'Back to Basics: Debugging in C++', YouTube [online video] url:
https://youtu.be/YzIBwqWC6EM [Accessed 19 Jan. 2024]
This video explains what the GDB debugger can do, walking you through executing
the GDB tool step-by-step to demonstrate the most common commands to add
breakpoints, watch variables, and pause/resume the execution of C++ code.
GDB Debugging
(18:07)
Reference: pikuma, 2019, 'GDB Debugging: How to Debug a C/C++ program', YouTube [online video]
url: https://youtu.be/gFCQ37jVN3g [Accessed 19 Jan. 2024]
Reference: Joseph Sibony, 2022, 'A Step-by-step Crash Course in C++ Debugging without IDE –
Empowering the terminal by using GDB', Incredibuild blog [online] url:
https://www.incredibuild.com/blog/a-step-by-step-crash-course-in-c-debugging-without-ide [Accessed
31 Jan. 2024]
● Master how to use IDE tools to inspect variable values during code
execution, providing insights into how your code is functioning.
● Learn how to integrate logging and error handling into applications, such
as tracking success and failure events, using modern frameworks and
best practices.
● Explore how to create custom event logs and view them in Windows Event
Viewer, complete with specific messages for success and failure.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
1. The ability to examine variable contents during code execution can reveal
issues and help debug in real-time.
2. Many IDEs offer features like watch windows or immediate windows that
make it easier to inspect variables without stopping code execution.
3. Some debugging tools allow setting conditional breakpoints based on variable
values, enabling targeted debugging.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Understanding Variables
Programmers have at their disposal several tools and methods to monitor variable
values and behaviours during runtime, including:
● Print Statements
An uncomplicated technique wherein developers infuse print statements in
the code to visualise the variable values at certain stages of execution.
● Debuggers
A feature in many Integrated Development Environments (IDEs),
debuggers enable developers to halt the execution (via breakpoints) and
scrutinizes the existing variable values, even allowing line-by-line code
progression to witness variable value alterations.
● Watch Expressions
A specialised function within debuggers where developers can earmark
certain variables to “watch,” facilitating constant display of these variable
values as the program executes.
Further Reading
Explore how to inspect variables (program state) in GDB using the print and info
locals commands. Learn how to use GDB commands such as print and info locals as
tools to view the state of a program without the need to insert printf C code
statements and recompile the program.
Liz Willer, 2020, 'GDB - Viewing Data', [online] accessed 31 January 2024,
<https://www.cse.unsw.edu.au/~learn/debugging/modules/gdb_viewing_data/>
Aaron Hallberg, 2016, '7 Ways to Look at the Values of Variables While Debugging in Visual Studio',
Microsoft Dev Blog [online] accessed 31 January 2024,
<https://devblogs.microsoft.com/devops/7-ways-to-look-at-the-values-of-variables-while-debugging-in-
visual-studio/>
At the forefront of finance technology, FinTech Hub was grappling with the task of
sustaining the reliability and performance of its software applications. The intricate
algorithms and expansive datasets in play mandated a precise approach to
debugging to avert system failures and inaccurate data computations.
Problem Statement
Implementation
To revamp the debugging procedure, a pivotal decision was made to amplify the
techniques employed to examine variable contents. The initiative unfolded as
follows:
● Training
A comprehensive training module was introduced to acquaint developers
with advanced debugging tools and techniques, including the proficient
use of watch expressions and breakpoints.
● Integrating Advanced Debuggers
Embedding sophisticated debugging tools into the development landscape
enabled a more nuanced and detailed investigation of variable contents.
● Code Reviews
A routine of regular code reviews was instituted, fostering a culture where
developers scrutinised variable values to pinpoint potential enhancements
and optimisation avenues.
Outcome
1. Logging frameworks offer a systematic way to trace how data moves through
the system, making it easier to locate issues.
2. A robust error handling framework can catch and manage exceptions, thus
preventing crashes and enabling more graceful failure.
3. Proper logging and error handling can also be used to give constructive
feedback to the end-users, helping them understand what went wrong.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
The process of logging embodies the recording of events within a system, thereby
aiding in the identification, troubleshooting, and resolution of potential issues.
Essentially, it acts as a chronicle of system activities, instrumental in detecting
unusual patterns or behaviours.
Logging
● Log Levels: Employ different log levels such as INFO, WARN, and
ERROR to classify the gravity of log entries.
● Log Aggregation: Centralise log data hailing from diverse sources to
enable streamlined analysis and monitoring.
● Log Rotation: Implement strategies to archive outdated logs and
generate new log files, preventing an overflow of log file data.
Error Handling
● Try-Catch Blocks: Utilise try-catch blocks to encapsulate potentially
exception-throwing code and delineate the handling procedures.
● Custom Error Messages: Develop custom error messages that offer
more detailed insights into the error nature.
● Error Logging: Integrate error logging to document exceptions, facilitating
future analysis and prevention of analogous issues.
Practical Applications
● System Monitoring
Undertake continuous system surveillance to pinpoint and flag potential
issues before escalation.
● Troubleshooting
Facilitate swift identification and rectification of problems through log and
error message analysis.
● Security
Amplify system security through vigilant monitoring and documentation of
unauthorized access attempts.
Further Reading
Background
Problem Statement
The existing infrastructure was devoid of thorough logging and error handling
mechanisms, culminating in extended downtimes and inefficient troubleshooting
procedures. There emerged a critical need to introduce robust frameworks that could
amplify system stability and facilitate efficient maintenance.
Implementation
HealthNet Solutions embarked on an initiative to construct structured logging and
error handling frameworks, employing the following strategies:
Outcome
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
To create custom event logs is to formulate specialised logs that record events
germane to a specific functionality or module within the system. Far from generic,
these logs are crafted to offer detailed insights into particular segments of the
application. Their application extends to recording details about custom applications
or services, enabling focused monitoring and troubleshooting.
Key Components
When embarking on the creation of custom event logs, one should ponder over
several vital components:
● Event Identifiers
Singular identifiers that are allocated to each event type, aiding in their
effortless distinction and promoting efficient filtering and searching.
● Event Categories
The strategy of clustering events into varying categories, dictated by their
characteristics or the modules they pertain to, thereby facilitating
systematic and orderly logging.
● Event Metadata
Incorporation of pertinent metadata such as timestamps, event source,
and event particulars to furnish a well-rounded view of each event.
● Event Severity Levels
The delineation of severity levels to classify events based on their
repercussion, assisting in prioritising response strategies.
Section 2: Applications of Custom Event Logs
The creation of custom event logs finds a place in a myriad of domains, inclusive of:
● Security Monitoring
Establishing custom event logs to exclusively monitor events with security
implications, assisting in the premature detection of potential security
violations.
● Performance Monitoring
Developing logs to oversee the performance metrics of specific modules
or functionalities, fostering proactive performance tuning and
enhancement.
● Compliance and Reporting
Leveraging custom event logs in collating data vital for compliance
reporting, thereby rendering the process more streamlined and efficient.
Background
The conventional event logs utilised by the company were becoming increasingly
challenging for the IT contingent to navigate and pinpoint specific events associated
with their custom-developed applications. The requirement for a more streamlined
approach to log management emerged as a pressing concern.
Implementation
Outcome
The inception of custom event logs markedly uplifted the efficiency of the system
monitoring protocol at GreenTech Innovations. The IT personnel were now equipped
to swiftly identify and react to particular events, diminishing the time and effort
necessitated for troubleshooting.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Understand Conditional Breakpoints in C++
Standard function breakpoints probably help in most debugging sessions. But,
sometimes, there's simply too much code to check, too many objects or cases. What
if you want to filter out code that generates a breakpoint? Here's a look at conditional
breakpoints.
Reference: Bartlomiej Filipek, 2016, 'Understand Conditional Breakpoints in C++', Visual Studio
Magazine, accessed 31 January 2024,
<https://visualstudiomagazine.com/articles/2016/09/01/understand-conditional-breakpoints.aspx>
Reading: Modern C++ Best Practices for Exceptions and Error Handling
This article discusses the preferred approaches and best practices for handling
errors in modern C++ programming. It emphasizes the use of exceptions as the
preferred way to report and handle both logic errors and runtime errors in most
scenarios. The article covers basic guidelines for robust error handling, such as
using exceptions for exceptional code, employing assertions for conditions that
should never occur, and providing exception guarantees for functions.
Reference: Peter Forgacs, 2017, 'Custom C++ Exceptions for Beginners', Peter Forgacs @ GitHub,
accessed 31 January 2024,
<https://peterforgacs.github.io/2017/06/25/Custom-C-Exceptions-For-Beginners/>
Reference: Geeks for Geeks, n.d., 'Exception Handling in C++', Geeks for Geeks, accessed 31
January 2024, <https://www.geeksforgeeks.org/exception-handling-c/>
You'll learn about keywords that are used to work with exceptions: try, catch and
throw, and about different types of exception handlers, including the default handler.
(24:46)
Reference: CodeBeauty, 2021, 'Exception Handling in C++', YouTube, accessed 31 January 2024,
<https://youtu.be/kjEhqgmEiWY>
Reference: Microsoft staff, 2022, 'TraceLogging C/C++ Quick Start', Microsoft Learn, accessed 31
January 2024,
<https://learn.microsoft.com/en-us/windows/win32/tracelogging/tracelogging-native-quick-start>
source: Freepik
● Learn how to design and implement various test cases to validate the
functionality of applications, focusing on real-world examples such as the
"Add Student" application.
● Dive into the techniques and tools used to monitor application
performance, including RAM and CPU usage, and how to capture baseline
analysis for comparisons.
● Discover the methodologies to improve code performance through specific
changes, how to compare before-and-after metrics, and propose further
optimisations.
● Designing and Implementing Test Cases for the "Add Student" Application
to Ensure Functionality.
● Monitoring Application Performance Including RAM and CPU Usage, and
Capturing Baseline Analysis.
● Implementing Code Changes to Improve Performance, Comparing
Before-and-After Metrics, and Suggesting Further Optimisations.
Assessment notes
Assessment 2 is due this week so make sure you upload all required
documents to Canvas.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Designing Tests
The crafting of tests for codes is more than just an auxiliary step, embodying a
central element in the software development lifecycle. It facilitates the early detection
of bugs, consequently conserving time and resources as the project progresses.
Moreover, it serves to validate that alterations instated in the code do not negatively
impact pre-existing functionalities, thereby upholding a superior standard of quality
and dependability.
Further Reading
Reference: 2018, 'Overview of Test Design Techniques in Software Development', Test Automation
Resources, accessed 31 January 2024,
<https://testautomationresources.com/software-testing-basics/software-test-design-techniques/>
When tasked with code testing, one may opt for a range of approaches,
encompassing:
● Unit Testing
This procedure targets the minutest units of code, typically singular
functions or methods, validating their correct operation in isolation.
● Integration Testing
This form of testing focuses on assessing the interplay between diverse
units of code, verifying their seamless operation upon integration.
● System Testing
At this juncture, the entire system undergoes scrutiny to affirm its
compliance with delineated requirements and overall functional
proficiency.
● Acceptance Testing
This approach entails evaluating the system from the vantage point of the
user, ensuring it satisfies their necessities and anticipations.
Further Reading
Explore the difference between unit and functional tests and how to perform them
with the use of a testing framework - the Google Test Framework in particular.
Reference: 2017, 'Unit and Functional Tests in a Nutshell', Coderwall, accessed 31 January 2024,
<https://coderwall.com/p/zj8kjg/unit-and-functional-tests-in-a-nutshell>
For the crafting of efficacious tests for codes, heed the following steps:
● Requirement Analysis
Commence with a lucid comprehension of the requirements and
functionalities that the code is anticipated to deliver.
● Test Case Design
Forge detailed test cases that enumerate the input conditions, execution
protocols, and anticipated outcomes.
● Test Data Preparation
Fabricate pertinent data requisite for testing, aimed at assessing the
functionality of the code.
● Test Execution
Implement the devised tests, either manually or utilising automated testing
instruments, and record the outcomes.
● Result Analysis
Engage in a detailed analysis of the results to pinpoint discrepancies and
areas where the code potentially falls short of expectations.
● Feedback and Iteration
Grounded on the test outcomes, confer feedback and implement
necessary adjustments to bolster the code’s performance and reliability.
Problem Statement
The incumbent testing protocols at the firm lacked sufficient rigour, engendering a
heightened frequency of bugs and errors permeating the production sphere, which
marred the user experience and tarnished the brand’s standing.
Implementation
Outcome
The refurbished testing strategy precipitated a notable elevation in the quality of the
code generated at TechNest Solutions. Bugs and errors were pinpointed early in the
development trajectory, conserving both time and resources.
The streamlined testing protocols further facilitated quicker releases, aiding the firm
in adhering to project deadlines more adeptly. This endeavour highlighted the
quintessential role of devising tests for codes in augmenting software quality and
dependability.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
● Analysing Bottlenecks
Identifying segments in the code or system configuration that might be
inducing delays or inefficiencies.
● Capacity Planning
Anticipating forthcoming system demands and strategising accordingly to
circumvent performance hitches.
● Optimisation
Instituting alterations to boost the system's efficiency based on the results
of the analysis.
● Reporting and Documentation
Crafting detailed reports to record the discoveries and enhancements
applied.
● Setting Benchmarks
Formulate baseline performance indicators to which the system's
performance can be juxtaposed.
● Continuous Monitoring
Employing tools and technologies for ceaseless system performance
monitoring, accruing essential operational data.
● Data Analysis
Examining the amassed data to discern patterns, trends, and potential
areas of concern.
● Implementing Improvements
Implementing necessary alterations to the system to elevate its efficiency,
based on the analytical findings.
● Feedback and Iteration
Upholding a loop of continual refinement by persistently observing and
analysing the system's performance, effectuating adjustments as required.
Background
Skyward Industries, a well-entrenched e-commerce enterprise, was grappling with
escalating user traffic, which was exerting pressure on their existing system
infrastructure.
Problem Statement
Owing to a surge in user numbers, the system started manifesting stress signs,
including delayed response times and recurring downtimes, adversely impacting the
user experience and potentially diminishing sales.
Implementation
Outcome
The venture resulted in a notable amelioration in system performance, denoted by
swifter response times and diminished downtimes. The initiative also promoted more
adept capacity planning, aiding the company in gearing up for further expansion
effectively.
This scenario underlines the critical role of performance monitoring and analysis in
guaranteeing system scalability and delivering a superior user experience.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
This topic will familiarise you with the fundamental concepts and techniques behind
advancing and optimising system performance, supplemented with a relevant case
study to grant a deeper comprehension.
Further Reading
Explore various techniques and best practices for optimizing C++ code.
Reference: Ivan Chiklikchi, 2023, 'C++ Performance Optimization Best Practices', Hackernoon,
accessed 31 January 2024, <https://hackernoon.com/c-performance-optimization-best-practices>
Further Reading
Reference: Thomas Hamilton, 2024, 'Performance Testing Tutorial – Types (Example)', GURU99,
accessed 31 January 2024, <https://www.guru99.com/performance-testing.html>
Background
Horizon E-Solutions, a rapidly expanding e-service provider, was endeavoring to
consolidate its market stance by providing users with a peerless service experience.
Problem Statement
Nevertheless, their progress was obstructed by regular system lags and latency
challenges, which negatively influenced user contentment and obstructed their
growth pathway.
Implementation
Outcome
The venture manifested in significant advancements, with the system now
demonstrating reduced latency and amplified transaction speeds, heightening user
satisfaction and fostering business expansion. This case demonstrates the
transformative potential of performance improvement and optimisation efforts,
illustrating their capacity to propel a business forward by delivering a superior service
experience to users.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Video: Software Testing Explained
This video provides a brief overview of software testing and its significance in the
dynamic and complex world of software development. It emphasizes the challenges
developers face in understanding every layer of abstraction and the evolving
requirements.
Reference: Code for yourself, 2022, 'Do you Even Test?', YouTube, accessed 31 January 2024,
<https://youtu.be/pxJoVRfpRPE>
Reference: Kiruthika Devaraj, 2023, 'Test Case Design Techniques in Software Testing', Testsigma,
accessed 31 January 2024, <https://testsigma.com/blog/test-case-design-techniques/>
C++ Unit Testing: A Complete Guide with Examples and Best Practices
Reference: Rahnuma Tasnim, 2023, 'C++ Unit Testing: A Complete Guide with Examples and Best
Practices', Software Testing Stuff, accessed 31 January 2024,
<https://www.softwaretestingstuff.com/c-unit-testing>
Reference: Severin Ilya, 2023, 'C++ Testing: What Is Its Importance And Implementation', Market
Splash, accessed 31 January 2024, <https://marketsplash.com/tutorials/cpp/cplusplus-tester/>
Reference: Microsoft staff, 2023, 'Write Unit Tests for C/C++ in Visual Studio', Microsoft Learn,
accessed 31 January 2024,
<https://learn.microsoft.com/en-us/visualstudio/test/writing-unit-tests-for-c-cpp>
Reference: Microsoft staff, 2023, 'Tips for Improving Time-Critical Code', Microsoft Learn, accessed
31 January 2024, <https://learn.microsoft.com/en-us/cpp/build/tips-for-improving-time-critical-code>
Reading: Visual Studio 2022 Profiling Tools
A profiler can help you make informed decisions quickly by providing a visual
depiction of execution times and CPU usage for your application. This article
provides a quick look at the most common profiling tools.
Reference: Microsoft staff, 2023, 'Visual Studio 2022: First look at profiling tools', Microsoft Learn,
accessed 31 January 2024,
<https://learn.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour>
Module 10. Recording & Compliance
In the dynamic field of software development, recording and compliance form the
backbone of a reliable and accountable process. This module explores the
importance of meticulously recording test results and ensuring compliance with
program specifications.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
In software development, the act of recording and documenting test results is much
more than just a formality or bureaucratic requirements; it forms a crucial foundation
in crafting reliable and efficient software products.
This practice facilitates the meticulous collection and analysis of test data, fostering
an abundance of information that can be referenced in the future to ensure
compliance and a quality end product. In this section, we will explore each aspect,
complemented with a case study that demonstrates its practical implementation.
● Facilitates Troubleshooting
○ Error Tracing
Aids in backtracking errors to their origin, paving the way for
targeted corrections.
○ Pattern Identification
Aids in discerning patterns, forecasting potential issues before
they escalate to critical levels.
● Promotes Transparency and Collaboration
○ Team Alignment
Keeps all team members in sync and abreast of the current
project status.
○ Client Communication
Assists in updating the client about the progress and quality of
the development procedure.
Components Involved
The Challenge
Approach
The development team commenced the project with a clearly delineated testing
strategy, which underscored the importance of a detailed recording and
documentation of test results. The structure of the testing process was as follows:
Outcome
The detailed recording and documentation of test results empowered the team to
swiftly pinpoint and tackle issues, considerably trimming down time spent on
troubleshooting and corrections. Moreover, the recorded data and documented
outcomes served as a tangible progress tracker, fostering transparent
communications with stakeholders, including the healthcare facility's administration.
Conclusion
This case study illustrates the profound influence that detailed recording and
documentation of test results can wield on the success of a software development
venture. The meticulous strategy adopted by the development team not only
smoothed the development trajectory but also culminated in a product that met the
lofty expectations set initially. Through systematic recording and documentation, the
team managed to craft a solution that significantly uplifted the healthcare facility's
operations, showcasing the pivotal role this practice holds in software development.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
● Specification Documents
Before starting with the compliance checks, it is crucial to have
well-detailed specification documents that clearly outline the expected
functionality and behaviour of the application.
● Compliance Checklist
Developing a compliance checklist, derived from the specification
documents, to serve as a reference point for all compliance verification
activities.
● Automated Testing
Implementing automated testing where possible, to efficiently verify that
the application meets the specified criteria, covering aspects such as
functionality, performance, and security.
● Manual Reviews
Conducting manual reviews to ensure that the more nuanced aspects of
the specifications, which might not be captured through automated testing,
are thoroughly checked.
● Peer Reviews
Engaging in peer reviews to bring different perspectives and expertise into
the compliance verification process, helping to identify potential issues or
oversights.
Practical Application
To put these concepts into practice, here is a step-by-step guide that you can follow:
Further Reading
Background
In response to the evolving digital landscape, a leading financial institution embarked
on a pivotal project to upgrade its online banking system. The objective was to
facilitate a more secure and user-friendly experience for its customers. This
significant undertaking was grounded on stringent specifications, which were
meticulously crafted to address essential facets such as improved security protocols,
enhanced performance, and a refined user experience.
Approach
The culmination of the project marked the successful launch of a modernised online
banking system, epitomising security and user-friendliness. The adherence to the
compliance checklist played a pivotal role in the project’s success, ensuring the
delivery of a system that not only met but surpassed the stipulated specifications.
The meticulous approach adopted during the development process underscored the
institution’s commitment to delivering a product that stood as a beacon of reliability
and security in the online banking sector.
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Test, Execution and Recording
This article discusses the importance of testing, execution, and recording in the
quality assurance cycle for products or processes. It emphasizes the need for
appropriate testing based on the significance of the design element, highlighting that
tests should align with regulatory compliance and ongoing quality standards. The
scope of testing should cover both expected criteria and potential deviations from the
norm.
Reference: 3SL staff, 2021, 'Test, Execution and Recording', 3SL blog, accessed 31 January 2024,
<https://www.threesl.com/blog/test-execution-and-recording/>
Reference: Leary C., 2021, 'Verification vs Validation in Software: Overview & Key Differences', BP
Logic blog, accessed 18 January 2024,
<https://www.bplogix.com/blog/verification-vs-validation-in-software>
Reference: Foram Bhatt, 2023, 'Test Management and Reporting', Medium (website), accessed 18
January 2024,
<https://medium.com/@foramdbhatt13/test-management-and-reporting-b22bb90b00ba>
This article discusses what a test summary report is and how it can help in software
development lifecycle processes.
Reference: The Nerdy Geek, Community Contributor, 2023, 'How to Write a Good Test Summary
Report', Browser Stack (website), accessed 31 January 2024,
<https://www.browserstack.com/guide/how-to-write-test-summary-report>
Reference: Jakub Ciupka, 2024, 'The Importance of Compliance and Security in Software
Development', selleo blog, accessed 31 January 2024,
<https://selleo.com/blog/the-importance-of-compliance-and-security-in-software-development>
(PDF)
Reference: Synopsys, 2020, '4 Software Compliance Gotchas to Avoid', Synopsys, accessed 31
January 2024,
<https://www.synopsys.com/content/dam/synopsys/sig-assets/ebooks/eb-software-compliance-gotcha
s.pdf>
Module 11. Documentation and Code Maintenance
This module provides a comprehensive exploration of the integral aspects of code
documentation and maintenance. Aimed at ensuring long-term efficiency and
readability, the module addresses key topics such as organisational guidelines,
coding standards, and the application of internal documentation to code.
By the end of this module, you'll be well-versed in creating maintainable code and
understanding its documentation.
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), and responding to facilitator
feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Further Reading
Reference: Geeks for Geeks, n.d., 'Coding Standards and Guidelines', Geeks for Geeks, accessed 31
January 2024, <https://www.geeksforgeeks.org/coding-standards-and-guidelines/>
● Drafting Guidelines
As a starting point, consider drafting a set of guidelines that align with the
organisational goals and foster a harmonious working environment.
● Implementing Coding Standards
Once familiar with the coding standards, focus on implementing these
diligently in your projects to witness the transformation it can bring in terms
of readability and maintainability.
Scenario
You are a team member in this dynamic environment. The leadership decides that
it's time to bring a change to uplift the code quality and team collaboration. The
objective is clear: To create a well-structured, maintainable, and uniformly styled
codebase that would streamline the workflow and enhance productivity.
Steps Taken
● Setting Up a Committee
A committee comprising senior developers and project managers was set
up to draft the organisational guidelines and coding standards. They were
tasked with researching and proposing a set of rules that would be both
modern and easy to adopt.
● Drafting the Guidelines
The committee worked diligently to draft comprehensive guidelines that
encompassed best practices in coding, including naming conventions, file
organisation, and commenting. These guidelines were built keeping in
mind the existing challenges and potential growth of the firm.
● Training Sessions
Once the guidelines were drafted, a series of training sessions were
organised. These sessions were interactive, providing team members with
the opportunity to understand the new standards and how to implement
them in their daily workflow.
● Implementation
After the training sessions, the team began to implement the new
standards. A grace period was provided to allow team members to adapt
to the new norms. Peer reviews were encouraged to foster a collaborative
learning environment.
● Feedback and Adjustments
Over time, feedback was collected from the team members about the new
guidelines. Necessary adjustments were made to ensure that the
standards were both efficient and user-friendly.
Outcome
Conclusion
Instructions:
1. Study provided materials or search for articles, papers, and case studies
emphasising the importance of documentation in software development.
2. Prepare a list of key takeaways and reasons why documentation is crucial.
3. In a group setting, discuss your findings and relate them to your own
experiences or projects you're familiar with.
4. Write a summary of the discussion, highlighting the main points and
conclusions reached.
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
Here, we delve deeper into the methodologies and strategies to craft insightful and
useful documentation.
● Comments
Incorporate various forms of comments within your code to convey the
function and purpose of different code sections.
● Descriptive Naming
Choose appropriate and descriptive names for variables, functions, and
classes.
● Maintaining a README File
Maintain a comprehensive README file that encompasses a project
overview, setup instructions, and guidelines.
● API Documentation
Document the API usage thoroughly, offering endpoint descriptions and
examples.
● Change Logs and Version Control
Employ version control systems like Git to track alterations and manage
different versions of the project.
● Including Code Examples
Provide insights through code examples in the form of tutorials or code
snippets.
● Error Handling and Reporting
Develop a robust system for error handling and reporting, incorporating
descriptive error messages and maintaining error logs.
Background
In the heart of a rapidly expanding tech start-up, a group of ambitious developers
embarked on a mission to create a pioneering web application aimed at
revolutionising e-commerce operations. The initial phases of the project were
marked by enthusiasm and rapid development. However, as the team expanded and
the project became more complex, it became apparent that the codebase lacked
sufficient documentation. This gap in internal documentation began causing delays
and confusion, particularly for new members who found it challenging to navigate
and comprehend the project's intricacies.
Scenario
You, having a substantial experience and understanding of the project, are appointed
to lead an initiative to bolster the internal documentation. This task is not only vital to
streamline the ongoing development process but also seen as a strategic move to
set the stage for the project's future scalability and sustainability. The primary
objective is to transform the codebase into a well-documented repository that can
facilitate smoother collaboration and expedite the project’s progression.
Action Plan
To navigate this challenge, you proposed a comprehensive action plan that involved
several strategic steps:
Outcome
1. Streamlined Collaboration
Team members found it easier to collaborate, with clear documentation
reducing misunderstandings and facilitating more productive discussions.
2. Accelerated Debugging Processes
The introduction of systematic error handling and reporting strategies made it
easier to identify and resolve issues swiftly, reducing the time spent on
debugging.
3. Enhanced Onboarding Experience
New members could onboard more seamlessly, with the enhanced
documentation providing a clear roadmap to navigate the project's
complexities.
Topic 3. Developing and Documenting Maintainable
Code
Learner Guide
The Learner Guide provides the core knowledge for this topic. Work through the
materials and be prepared to discuss these in your forums, tutorials or classes.
Expand All
Panels
Collapse All
Panels
● Code Consistency
○ Coding Conventions
○ Code Linting
● Modular Design
○ Decomposition
○ Encapsulation
● Code Comments and Documentation
○ Inline Comments
○ API Documentation
● Version Control
○ Branching Strategy
○ Change Tracking
● Code Reviews
○ Peer Reviews
○ Automated Code Analysis
Background
In a thriving financial firm, the software team was grappling with growing challenges
emanating from an outdated software system. As the firm expanded and
incorporated new members, the inconsistencies in coding standards and sparse
documentation became evident. This scenario not only hampered the onboarding
process but also decelerated the enhancements needed to meet the business's
evolving needs. Identifying this bottleneck, the leadership decided to strategically
revamp the system to bolster maintainability and scalability.
Initial Challenges
Strategies Implemented
● Coding Standards
The journey commenced with the formulation of comprehensive coding
standards. These norms were meticulously documented and disseminated
throughout the organisation, encouraging a uniform approach to code
development.
● Documentation Overhaul
A dedicated task force undertook the mission to revamp the existing
documentation. This team collaborated closely with veteran members to
develop detailed and contemporary documentation, elucidating the various
system modules clearly and providing guidelines and best practices for
interacting with them.
● Modular Approach
A structural shift to a modular design ensued. Each module was
engineered to handle specific functionalities, fostering easier management
and facilitating potential extensions in the future.
● Version Control and Code Reviews
A robust version control system was instituted to efficiently manage
diverse versions of the code. Regular code reviews became a norm,
aiding in maintaining code quality and fostering knowledge transfer among
team members.
Outcome
Further Resources
The resources in this section are for further exploration, providing additional
information for deeper insights.
Expand All
Panels
Collapse All
Panels
Reading: Coding Standards and Best Practices to Follow
Coding standards are a set of guidelines and best practices that are used to create
consistent, high-quality code. Consider coding standards as rules, techniques, and
best practices to develop cleaner, more readable, and more efficient code with
minimal errors. They offer a uniform format for software engineers to build
sophisticated and highly functional code.
Reference: Shreya Bose (Community Contributor), 2023, 'Coding Standards and Best Practices to
Follow', Browser Stack, accessed 31 January 2024,
<https://www.browserstack.com/guide/coding-standards-best-practices>
Reference: Perforce, n.d., 'Coding Standards For Quality and Compliance', Perforce, accessed 31
January 2024, <https://www.perforce.com/resources/qac/coding-standards>
(19:03)
Reference: ArjanCodes, 2023, 'How to Document Your Code Like a Pro', YouTube, accessed 31
January 2024, <https://youtu.be/L7Ry-Fiij-M>
The Google C++ coding style has become very popular and some highlights are
featured in this article.
Reference: Eric Gregori, 2021, 'Google C++ Style Guide Overview', LinkedIn, accessed 31 January
2024, <https://www.linkedin.com/pulse/google-c-style-guide-summary-eric-gregori/>
The goal of this guide is to manage this complexity by describing in detail the dos
and don'ts of writing C++ code. These rules exist to keep the code base manageable
while still allowing coders to use C++ language features productively.
Google C++ Style Guide
Reference: Google, n.d., 'Google C++ Style Guide', GitHub, accessed 31 January 2024,
<https://google.github.io/styleguide/cppguide.html>
Module 1. Revision & Finalisation
Congratulations on reaching the final module of this comprehensive course on
software development. Having traversed a wide range of topics—from the
fundamentals of programming to intricate data structures, from debugging
techniques to compliance and documentation—this module serves to solidify and
integrate what you've learned so far.
Course Recap: A thorough review of all the key concepts, methodologies, and tools
covered throughout the course to reinforce your learning and address any gaps.
Final Project Submission: Guidelines and best practices for finalising your course
project, which should demonstrate the skills and knowledge you've gained.
Assessment notes
Assessment 3 is due this week so make sure you upload all required
documents to Canvas.
The material in this module relates to the following subject learning outcomes:
Student Expectations
During this module, you are expected to spend time working through the prescribed
material prior to attending class. This will enable a more valuable discussion to take
place in online tutorials or conferences, where you will be able to discuss concepts,
present ideas and explore information collaboratively in greater depth.
4 hours for facilitated study. This includes guided facilitated study, watching or
attending course lectures (live or pre-recorded), responding to facilitator feedback.
8 hours for personal study. This includes reading through course material,
undertaking learning activities and exploring additional related resources.
Instructions: