0% found this document useful (0 votes)
8 views37 pages

ATM Transaction Tracker Programming Guide

Tech Hub is an IT company specializing in digital services such as software development and AI-driven solutions, aiming to enhance business operations. The document outlines the programming process for an ATM Transaction History Tracker, detailing algorithm definition, coding, testing, and debugging. It also discusses programming paradigms including procedural, object-oriented, and event-driven programming, highlighting their characteristics and applications.

Uploaded by

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

ATM Transaction Tracker Programming Guide

Tech Hub is an IT company specializing in digital services such as software development and AI-driven solutions, aiming to enhance business operations. The document outlines the programming process for an ATM Transaction History Tracker, detailing algorithm definition, coding, testing, and debugging. It also discusses programming paradigms including procedural, object-oriented, and event-driven programming, highlighting their characteristics and applications.

Uploaded by

ranaqasimk88
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Programming Assignment

Introduction
Tech Hub: Empowering Innovation Through Technology
Tech Hub is a top IT company known for providing clients worldwide with cutting-edge digital
services and technologies that change how things are done. Tech Hub helps companies improve
their operations and gain a competitive edge by focusing on software development, cloud
computing, privacy, and AI-driven solutions. Our goal is to promote new ideas, speed up the
digital change process, and provide flexible, safe, and user-centered technology that adapts to
the changing needs of modern businesses. Tech Hub is at the top of the IT business and is
shaping the future of technology. They have a team of skilled professionals behind them and are
committed to quality (Greenstein, 2006).
The problem to be discussed ATM Transaction History Tracker.

LO1: Define Basic Algorithms and Outline the


Programming Process

Defining Basic Algorithms.


It is a limited set of step-by-step directions for how to do a certain job or solve a problem. When
it comes to computing, algorithms are what make logic work and show you how to write code
that works (Carmen, 2006).
For the ATM Transaction History Tracker, a basic algorithm for depositing and recording a
transaction could be:
1. Start
2. Prompt the user for the deposit amount
3. Add the amount to the current balance
4. Append a "Deposit" entry to the transaction history
5. Display confirmation
6. End
for withdrawal:
1. First Start
2. Prompt the user for the withdrawal amount
3. Check if the balance is sufficient
4. If yes, subtract the amount and log the transaction
5. If no, display an error
6. End
After that, these methods can be written in pseudocode, which makes turning them into real
computer code easier.
BEGIN
PROMPT user to enter withdrawal amount
IF amount ≤ balance THEN
balance ← balance - amount
ADD "Withdrawal" to transaction history
DISPLAY success message
ELSE
DISPLAY "Insufficient funds"
END IF
END

Programming Process Overview


The programming process generally involves the following stages:

1. The Problem Analysis: Understand the task and user requirements.


2. The Algorithm Design: Develop a logical flow or step-by-step plan.
3. Pseudocode/Flowchart: Represent the algorithm in a human-readable form.
4. Coding: Translate pseudocode into a programming language (e.g., Python).
5. Compilation/Interpretation:
 Compiler: Converts entire code to machine code (e.g., C/C++).
 Interpreter: Executes code line-by-line (e.g., Python).
6 Linking: Combines various program modules (relevant in compiled languages).
7 The Testing and Debugging: Identify and fix logic or syntax errors.
8 Documentation: Write comments and create user manuals or reports.
9 Deployment: Release the application for use.
10 Maintenance: Update or fix post-release issues.
P1 – Understanding Algorithms and How Applications Are
Built.

What is an Algorithm?
An algorithm is essentially a series of steps that are both obvious and logical, and they are
followed to accomplish a job or find a solution to a problem. Consider it to be similar to a
recipe; just as a culinary recipe will instruct you on how to prepare a meal in a step-by-step
manner, an algorithm will instruct a computer on what actions to perform and in what
sequence to perform them(Cormen, 2006).
The following is an example of how the algorithm would work in an automated teller machine
(ATM) system if a user wishes to withdraw money:

1 Enquire of the user the amount of money they wish to withdraw.


2 Determine whether the user's account has enough amount of money.
3 In that case, the sum should be deducted from their total balance.
4 . Include the transaction in the record of records.
5 The user should be shown the updated balance.

How Applications Are Built – The Process Explained


Understand the Problem
In the first phase, it is necessary to have a complete comprehension of the issue that the
application is attempting to resolve. In the case of the ATM tracker, for instance, the objective is
to provide customers with the ability to deposit or withdraw money as well as view their
transaction history(Management Association, Information Resources, 2016).
Plan the Logic.
It is essential to lay out the functionality of the application before beginning the development
process. Algorithms are implemented at this point in it. They detail the app's expected behavior
at each stage of the process.
Use Pseudocode or Flowcharts
After the algorithm, many developers, in order to visualize the logic, either design a flowchart or
write pseudocode, which are statements that are similar to basic English sentences that
illustrate how the code should handle itself.
Write the Code
The next step is to code. At this point, the algorithm and pseudocode are transformed into
actual code by employing a programming language such as Python, Java, or C++.
Test the Application
Tests are performed on the code after it has been written to ensure that it functions correctly.
The developers examine the software to see whether or not it behaves appropriately in
response to the input provided by the user.
Fix Bugs and Improve
If there are issues (bugs), they are resolved. It is possible that at this stage, the software may be
made more user-friendly, or other functionality will be added.

P2 – Steps from Writing Code to Execution.


After planning has been done and the code is ready, the next step is to write the program.
Writing the code is only one part of the process, however. Before a computer can run correctly
and give the right result, it has to go through several steps. In general, this is how it works:
Writing the Code
This is where a computer language, like Python, Java, or C++, is used to turn the method into
real code. One way to do this is with an IDE (Integrated Development Environment), like
PyCharm or Visual Studio Code. Code is made in the ATM Transaction Tracker to handle things
like deposits, withdrawals, checking the balance, and seeing a list of transactions(Studocu,
2023).
Saving the File
Once the code is written, it is saved with the right file name, [Link] for Python,.java for Java,
[Link] for C++.
Compilation or Interpretation
This step works in different ways depending on the language:
In interpreted languages, such as Python, a computer reads the code and runs it line by line.
This makes testing easier, but it might take longer to run. Compiled languages, like C++, use a
translator to turn the text into machine code all at once. This process makes a usable file and
then checks it for mistakes. This project uses Python, which runs code straight from the source
file with the help of an interpreter.
Linking (for Compiled Languages)
A linker takes all the parts of code that are different or that use outside libraries and puts them
all together into one file. In Python, you can't see this step, but it's very important in built
languages like C and C++.
Running the Program (Execution)
The program is ready to run once the code has been read or built without any mistakes. The
system follows the directions, and the person using it can talk to the program. People who use
the ATM Transaction Tracker can see a menu with choices like "deposit," "withdraw," "view
balance," or "view history" once the script is run. They can then interact with the program in
real time(Slatkin, 2015).
Debugging and Output
The developer will use testing tools to find and fix problems with the program if it doesn't work
right or gives errors. The code is run again once it's been fixed.

M1 – Analyzing the Process of Writing Code and


Challenges Faced
Writing code may appear to be a simple endeavor – one sits down, inputs directives into a
computer, and the program executes. However, the procedure necessitates meticulous
preparation, adept problem-solving, and considerable patience. This text examines the coding
process and outlines some prevalent issues encountered by programmers.

The Process of Writing Code


Understanding the Problem
Before coding, it is essential to comprehensively grasp the program's requirements. Ambiguous
criteria will result in an ineffective solution. This phase often includes reviewing a summary,
engaging with people, or deconstructing the work into manageable components.
Planning the Logic
Upon comprehending the problem, the subsequent step is to create an algorithm or flowchart.
This facilitates the organization of ideas and the formulation of a sequential plan that the code
will adhere to. Certain developers employ pseudocode to initially articulate this reasoning in
straightforward terms.
Composing the Code
Upon establishing the strategy, the programmer composes the code utilizing a designated
programming language. This section needs meticulous attention - even a little typographical
error or missing symbol might result in program failure.
Evaluation and Troubleshooting
Upon completion of the code, it undergoes testing to ensure it functions as intended. Errors are
prevalent, hence debugging tools are employed to identify and rectify them. This method can
be laborious, particularly when faults are not readily apparent.

Enhancing and Optimizing


After the primary code functions correctly, the developer may revisit it to enhance its structure,
increase efficiency, or incorporate comments for improved comprehension. This is also the
moment to verify whether the code adheres to best practices and coding standards(Slatkin,
2015).
ATM Transaction History Tracker – Python Code
Challenges Faced During Coding
Syntax Errors
A prevalent issue is the utilization of erroneous syntax. An absent colon, bracket, or indentation
can prevent the code from executing.
Logic Errors
Even if the code runs without crashing, it may not do what it’s supposed to. These errors are
harder to catch because the program runs but gives the wrong result.
Time Management
Writing good code takes time. If a deadline is tight, developers might rush and make mistakes,
or skip testing, which can lead to bigger problems later.
Debugging Complex Issues
Some bugs are tricky to find, especially if they’re caused by unexpected input or interactions
between different parts of the program(Slatkin, 2015).

D1 Evaluate the implementation of an algorithm in a


suitable language. Evaluate the relationship between the
written algorithm and the code variant.
Evaluation of the Algorithm Implementation in Python

Python was chosen as the computer language for the ATM Transaction History Tracker because
it is easy to learn and write code. Python works especially well for this kind of app because it
lets you make changes quickly and handles user input and conditional logic well. The program
stores transaction records in Python's dynamic list data structure, which lets users' activities be
tracked in real time and a variety of ways. The implementation is set up in modules, with
separate features for entering and withdrawing money, checking the amount, and seeing a log
of transactions. This modularity makes the code clearer, easier to manage, and faster to fix. The
main control loop is a menu-driven system that makes things easy to understand and fun to use.
Each choice in the menu directly runs the corresponding function, making it easy to move
around and use the console-based environment(Necaise, 2016).

Relationship Between the Written Algorithm and the Code

To see how the algorithm and its code are related, let's look at an example of an algorithm step
and the code that goes with it.
Overall Evaluation

The finished program works the same way as the first method and is very similar to it. If
statements, function calls, and data structure moves are used to show each choice or step in the
method in the code. The careful matching of algorithm logic and code structure can be seen in
the way that lists are used to store transaction history, float variables are used to store balance,
and input is checked. The modular function-based design also keeps the logical purpose while
making things clear, easy to understand, and simple to keep up to date. The ATM Transaction
History Tracker's Python code implements the algorithm. Implementation accuracy and
efficiency are shown by the direct link between algorithm steps and code lines. This connection
makes the application operate as intended and easy to expand or troubleshoot.

Common Errors and Debugging Actions

Error Example in Code How It Was Resolved


Type

Syntax Missed colon in if amount > 0 Used the Python interpreter to locate and correct
Error the syntax.

Value The user enters text instead of Wrapped input handling in a try-except block to
Error a number prevent crashing.

Logic Allowing withdrawal more than Added a condition to check if the amount <=
Error the balance balance before deducting.

Debugging Application
LO2 Explain the characteristics of procedural, object-
oriented, and event-driven.
Procedural Programming is built on the idea that instructions should be carried out in a
structured, logical order. The program is broken up into smaller functions or procedures that do
specific jobs. This is called a top-down approach. Function calls make this type of computing
easy to reuse code, and it's usually only used for small or simple tasks. Variables and data are
usually shared between parts of the program, and control moves in a clear, straight line. This
approach is often used in languages like C and early versions of Python(Atencio, 2016).

Object-Oriented Programming (OOP) is about how to use objects, which are instances of
classes, to describe things in the real world. Encapsulation, inheritance, and polymorphism are
some of the features that this paradigm allows. These make code more organized, reusable, and
scalable. If you have a system that is big or complicated, OOP can help you keep the data and
behavior together. Each object is in charge of its state, and objects can talk to each other
through methods. Java, C++, and Python (when used with classes) are all well-known OOP
languages(Mössenböck, 1995).
Event-driven programming is built around the idea of reacting to events or human actions, like
pressing a key or clicking a button. When an event happens, the computer runs the event
handlers that go with it. This method is often used in GUI-based programs, games, and web
apps that need to respond quickly to user input. The program's flow changes based on what
happens and when it happens. For event-driven programming, people often use languages like
Python, JavaScript, Visual Basic, and languages with GUI tools like Tkinter(Open University,
2007).
P3 – Discussion on Programming Paradigms: Procedural,
Object-Oriented, and Event-Driven.
Aspect Procedural Object-Oriented Event-Driven
Programming Programming (OOP) Programming

Definition Sequential Programming based on Programming driven by


programming is objects created from events (e.g., user input,
based on step-by- classes, representing real- sensor signals, messages).
step instructions. world entities.

Structure Follows a top-down Organized around classes Based on event listeners


structure using and objects containing and handlers responding
functions and attributes and methods. to user/system actions.
procedures.

Main Elements Functions, variables, Classes, objects, methods, Events, event listeners,
loops, and inheritance, encapsulation, handlers, and callbacks.
conditionals. and polymorphism.

Flow of Linear and Based on object Non-linear, driven by the


Execution sequential. interactions and method occurrence of events.
calls.

Data Handling Global or local Data encapsulated within Data is handled in


variables; shared objects; interaction via response to events and
freely across methods. often within event
functions. handlers.

Use Case Simple scripts, Banking systems, GUI applications, mobile


Examples calculators, and file management software, apps, web interfaces.
readers. and games.

Programming C, Pascal, Python Java, C++, Python (with JavaScript, Visual Basic,
Languages (basic). classes), C#. Python (with Tkinter or
PyQt).

Advantages Easy to understand; Promotes code reuse, Enables interactive, user-


suitable for small scalability, and friendly applications.
tasks. maintainability.
Challenges Less modular; harder Can become complex due Debugging event flow can
to maintain in large to many class be challenging; logic may
systems. dependencies. be scattered.

Relation to Can be used within Can incorporate Often built on top of OOP
Others OOP methods or procedural logic in class (for GUI components) and
event handlers. methods; often used with may use procedural logic
event-driven design. in handlers.

M2 – Comparison of Programming Paradigms in the ATM


Transaction History Tracker Application.
Procedural Programming

Procedural code is mostly used to make the ATM program's main features work, like deposits,
withdrawals, and writing transaction histories. There are separate actions that are run in a
certain order by functions like deposit (), withdraw (), and print history (). The main loop that
gives the user choices and controls the flow is also procedural because it uses if-else statements
to control each step(Alex Louwe Kooijmans et al., 2012).

2. Object-Oriented Programming (OOP)

A modular version of the program can utilize classes to encapsulate functionality. A Bank
Account class may include characteristics such as balance and history, as well as methods like
deposit (), withdraw (), and get history (). This facilitates the creation and independent
management of many user accounts, enhancing code reusability and scalability(Pecinovsky,
2013).
Event-Driven Programming (If GUI is used)
Enhancing the application with a GUI utilizing Python's Tkinter incorporates event-driven
programming. Button clicks (e.g., "Deposit", "Withdraw", "View History") activate event
handlers that perform designated functions. These actions rely on user involvement instead of a
predetermined sequence, rendering the program dynamic and responsive.
deposit button = Button (window, text="Deposit", command=handle deposit).

Comparison Summary
Aspect Procedural Object-Oriented Event-Driven
Used For Core logic, Creating reusable account User interaction through
input/output, and objects and data models. GUI buttons or events.
balance updates.
Code Functions and control Classes and methods Event listeners are
Structure flow (if-else, loops). encapsulating data and linked to GUI actions.
logic.
Execution Sequential, Based on object Triggered by user
Flow command-line based. interactions and method actions like clicks or
calls. inputs.
Suitability Simple logic and flow. Scalable design and user Interactive, responsive
management. applications.
Presence in Present in the CLI- Present in Present if the GUI is
Application based version. modular/advanced versions implemented with
using classes. Tkinter or PyQt.
D2 – Critical Evaluation of Source Code Implementing
Multiple Paradigms.
The ATM Transaction History Tracker uses procedural, object-oriented, and event-driven
paradigms. A critical analysis of its source code shows how various paradigms affect structure,
maintainability, and functionality. Each paradigm contributes differently to development, and
their cohabitation has pros and cons.

Procedural Paradigm Evaluation

The ATM Transaction History Tracker's CLI sequentially deposits, withdraws, and prints history.
This code makes updating balances and storing transactions easy for novices. Procedures are
limited by program growth. New account types and login features may need repetitive code and
clutter, making scaling and maintenance tougher. The software uses unencapsulated global
variables like balance and history, which increases the possibility of accidental mistakes and
makes it less secure and harder to debug(Fincher and Robins, 2019).

Object-Oriented Paradigm Evaluation

OOP in the modular ATM Transaction History Tracker uses bank accounts. Account balance and
transaction history are linked to depositing funds and examining transaction logs. The program
is flexible and scalable because it can produce several account instances. OOP can provide
overdraft protection, account verification, modularity, code reuse, and data encapsulation to
prevent unauthorized access.

Event-Driven Paradigm Evaluation

Tainter GUIs event-drive ATM Transaction History Trackers. When users click "Deposit" or
"Withdraw", event handlers call functions or class methods. A more intuitive and accessible UI
makes the program feel like an ATM system, boosting user experience. Working without a
command-line menu boosts engagement and responsiveness. This transition is tricky. A non-
linear control flow hampers logic testing and debugging. Having too many GUI elements in one
file might fragment event-handling code, making it harder to maintain and understand(Yeager,
2012).
Analysis
The ATM Transaction History Tracker uses multiple programming paradigms, demonstrating a
well-rounded and successful design approach. Procedures for deposits and withdrawals are
simple to learn and use. Object-oriented programming provides structure and scalability by
enclosing account data and behaviors in classes. This simplifies code organization and reuse.
The Tainter GUI's event-driven paradigm simplifies app interaction and makes it more
responsive and understandable. Combining these paradigms requires careful planning. If you
don't separate GUI elements from data handling and business logic, the codebase can quickly
become convoluted and hard to manage. Using architectural patterns like Model-View-
Controller (MVC) or separating the project into data, logic, and interface files or modules can
make the software easier to comprehend, maintain, and add to.

LO3 – Implementing Basic Algorithms in Code Using an


IDE.
Code Implementation (Python)
Python and VS Code are used to demonstrate how the ATM Transaction History Tracker is built.
The algorithm for deposits, withdrawals, and transaction history is coded. IDE tools and
capabilities can be utilized to develop a basic algorithm.
IDE Features Utilized
 Highlighting syntax makes it easy to tell the difference between strings, functions, keywords,
and variables.
 Code Completion and IntelliSense: offering keywords and methods helps you type faster and
make fewer mistakes.
 Integrated Terminal: This lets you run and test the code right in VS Code.
 Error Detection: Shows you grammar and logic mistakes right away.
 File Explorer organizes project files so that they can be used flexibly if the program grows.
 Integration of Version Control (Git): This helps keep track of changes and handle different
versions of the code (optional but recommended)(Kenneth Leroy Busbee, 2018).
P3 – Program Implementation of an Algorithm Using an
IDE.
This section illustrates the execution of a fundamental algorithm in Python for monitoring ATM
transactions. The application encompasses functionalities for fund deposits, monetary
withdrawals, and transaction history review, thereby satisfying the fundamental criteria of the
algorithm established in Activity 1. The code is authored and executed in Visual Studio Code (VS
Code), a prevalent integrated development environment (IDE) that facilitates Python
programming with features including syntax highlighting, code recommendations (IntelliSense),
debugging utilities, and integrated terminal execution(Sripada Rama Sree, n.d.).

Python Code
M3 – Enhancing the Algorithm Using IDE Features
To meet the needs of M3, the previously written algorithm was made more efficient, scalable,
and easy to manage. The Visual Studio Code (VS Code) IDE's full set of features were also used.
These changes show how good programming practices can turn a simple algorithm into an
application that is easier to use and more reliable with the right tools(S Arakawa and Sharma,
1996).
Enhancements Made to the Algorithm

Area Original Version Enhanced Version

Input Validation Limited to basic error Added robust validation for numeric input and
catching non-negative values

Code Modularity Basic class with Introduced clearer method documentation and
procedural logic refactoring for readability

Transaction Not available Each transaction now records the date and
Timestamps time for a detailed history

Transaction Export Not available New feature to export transaction history to


a .txt file

User Feedback Basic print messages Improved clarity with formatted outputs

Updated Python Code.


IDE Features Used to Enhance Development

Feature How It Helped

IntelliSense Suggested method names and parameters, reducing errors


and increasing speed

Code Formatting (Shital) Automatically formatted the code for improved readability

Linting (via Plint) Helped identify unused imports, unreachable code, and
variable misuse

Integrated Terminal Enabled fast execution and real-time debugging without


leaving the editor

Live Server (for GUI variant Allowed visual inspection of the GUI-based event-driven
testing) version (if used)

Git Integration Helped track code changes and manage versioning during
enhancement phases

D3 – Evaluation of Using an IDE vs. Not Using an IDE in


Application Development.
Benefits of Using an IDE (e.g., VS Code)

Feature Evaluation

Code Assistance Speeds up development by suggesting functions, syntax, and variables,


(IntelliSense) reducing human error and improving accuracy.

Debugging Tools IDEs offer built-in debuggers that allow breakpoints, step-through
execution, and variable inspection, making bug tracking and correction
much more efficient.
Real-time Error Syntax and some logical errors are identified as you type, preventing
Highlighting issues before runtime.

Integrated Terminal Allows seamless code execution and testing within the same window,
eliminating the need to switch between environments.
Code Formatting & Ensures consistent and readable code through automatic formatting
Linting tools and linters.

Project Built-in file explorers and Git integration help manage multiple files and
Management maintain version control within the IDE.

Extensions & Additional tools like Python formatter, Pylint, or GitLens enhance
Plugins productivity and code quality.

Limitations: Without an IDE (e.g., Notepad + Command Prompt).

Limitation Evaluation

No Code Developers must memorize syntax and logic, increasing the risk of typos
Suggestions and slowing development.

Manual Without built-in debuggers, developers must rely on print statements


Debugging and trial-and-error for error resolution, which is time-consuming and
inefficient.

Error Discovery at Errors only become visible when the program is executed, making
Runtime troubleshooting more difficult.

No Integrated External programs are required for version control, formatting, and
Tools running the program, resulting in a disjointed workflow.

Higher Learning Beginners may struggle with command-line operations and manual
Curve configurations.

Project Example Comparison: ATM Transaction Tracker


With IDE:
Developed in half the time due to suggestions and real-time feedback.

Debugging was quick using breakpoints and variable inspection.

Improved user experience by exporting transaction history, easily implemented using IDE’s
syntax hints.

Without IDE:
Manual code execution through the command line took longer and was error-prone.
No real-time feedback caused multiple crashes before finding minor issues.
Lack of formatting tools made the code harder to read and maintain.

LO4 – Debugging Process and Importance of Coding


Standards.
Importance of Coding Standards
Key Reasons Why Coding Standards Matter

Reason Description

Readability A clear and uniform structure makes code easier to read and
understand by others.

Maintainability Code written with standards is easier to debug, enhance, and maintain
over time.

Error Prevention Standards often enforce naming conventions and formatting that
prevent logical or syntactic errors.

Team In team environments, shared standards ensure everyone writes code


Collaboration in a consistent style.

Professionalism Adherence to standards reflects software engineering best practices


and industry norms.

Understanding the Debugging Process


Debugging is a crucial step in software development that involves identifying, analyzing, and
correcting errors or flaws in a program to ensure it runs as intended. This process not only helps
in fixing immediate issues but also improves overall code quality and reliability.
Key Steps in the Debugging Process:
Error Identification
The first step is to locate the problem using tools like error messages, stack traces, or alerts
provided by the development environment. For example, in the ATM application, entering a
non-numeric value when prompted for a deposit might trigger a Value Error.
Setting Breakpoints
Breakpoints can be added in IDEs such as Visual Studio Code to temporarily stop the program’s
execution at specific lines. This allows the developer to examine the program’s state at that
moment.
Step-through Execution
By running the code one line at a time, developers can observe the program’s behavior closely.
This helps pinpoint the exact line or condition where things go wrong.
Variable Inspection
During debugging, checking the current values of variables helps determine if they are holding
the expected data. Any inconsistency here can offer clues about the bug.
Fixing the Issue
After diagnosing the problem, the next step is to modify the code to eliminate the error. This
might involve correcting a logical mistake, adjusting conditions, or rewriting a faulty expression.
Testing
Finally, the program is tested again using the same and additional inputs to confirm that the
issue has been resolved and no new bugs have been introduced(Agans, 2006).
Debugging the ATM Transaction History Tracker (Step-by-Step).
Last step: Use IDE Debugging Tools
If using Visual Studio Code, follow these debugging steps:

Tool Description

Breakpoint Click beside the line number where the bug might be (e.g., amount =
float(input(...))) to pause execution there.

Run → Start Starts the application in debug mode.


Debugging (F5)

Step Over (F10) Executes the next line without diving into functions — useful for
checking flow.

Variables Panel Shows current variable values — lets you confirm what's inside the
amount or self. Balance.

Console Output View any exceptions or print messages to follow the user flow and
outputs.
An Integrated Development Environment (IDE) provides
various tools to simplify and improve the debugging
process:
Feature Purpose Example (ATM Tracker)

Breakpoints Temporarily halts program Pause at withdraw () to check


execution at specific lines. balance calculations.

Step Over/Into/Out Navigate through code one line or Trace function logic in transaction
function at a time. history to ensure correct order.

Watch Window Monitor changes in specific Watch the balance variable


variables. during deposit and withdrawal.

Call Stack Displays the sequence of function Trace calls from the main menu
calls that led to a particular point. to transaction methods.

Error List Panel Lists syntax and runtime errors Shows Value Error from invalid
instantly. user input.

Console/Terminal Displays real-time outputs, print Confirms transaction completion


Output statements, and debug logs. messages or error messages.

Variable Inspector Shows all active variable names View the current transaction log
and their current values. or user-entered amounts.

Explanation of the Debugging Process.


Finding mistakes or bugs in a computer program and fixing them one step at a time is called
debugging. These mistakes can be in the syntax, the logic, or the runtime, and they stop the
program from working right or as planned. As the name suggests, debugging's main goal is to
make sure that the software works as expected and gives people correct results.
Step 1: Figuring out what the issue is
Watching how the program works and looking for strange results, system crashes, or error
messages is the first step in debugging. These clues let the programmer know that a part of the
code is not working right(Agans, 2006).
Step 2: Making the Mistake Again
Once the problem is found, the developer has to make sure that the mistake always happens.
This helps us figure out the exact circumstances in which the bug appears, which makes it easier
to find its source.
Step 3: Looking at the Code
The developer looks at the relevant part of the code after the mistake has been reproduced.
This can be done by going over the logic by hand or using debugging tools to track the steps
being taken and the values that are being saved in variables at each one.
Step 4: Finding the Bug
This step is all about finding the exact spot or state in the program where the error is
happening. To find the source of the problem, developers may leave out certain lines of code or
try certain blocks of code.
Step 5: Getting rid of the bug
The developer changes the code to fix the mistake once the source of the error is found. This
could mean changing the logic, the conditions, the way variables are assigned, or the way data
is checked.
Step 6: See if the answer works
After a fix is made, the program is tried again with both the same and new inputs to make sure
the problem is gone and no new ones have been added.
Step 7: Last Look Over and Record
Lastly, the writer checks the fixed code to make sure it's good. If working in a collaborative or
team setting, they may write down the bug and how it was fixed.

P5 – Explanation of the Coding Standard Used in the


Code.
A consistent set of coding standards was used to make sure that the code for the ATM
Transaction History Tracker is clean, easy to read, easy to update, and looks good. These
guidelines are important for both solo and group programming, especially for programs that
work with financial information and need to be accurate and clear(Long et al., 2011).
Meaningful Naming Conventions
All variables, functions, and class names were named clearly to reflect their purpose. For
instance:
 Balance, transaction history, and account number clearly describe the data they hold.
 Function names like deposit (), withdraw (), and show_transaction_history () describe their
functionality.
Consistent Indentation
The normal indentation for Python, which is four spaces per level, was utilized throughout the
entirety of the program. Due to the fact that Python relies on indentation to define code blocks,
this makes the code easier to understand and provides protection against syntax
issues(w3Schools, 2017).
M4 – Examining How the Debugging Process Helps
Develop More Secure, Robust Applications
Debugging is essential to software development. It guarantees the product's functionality and
resistance to frequent defects. Debugging fixes problems and boosts application security,
dependability, and robustness when done correctly. An ATM Transaction History Tracker
requires precision and reliability; therefore, this is crucial.
Logical error detection and elimination
Developers can debug code line by line to find faulty logic. A withdrawal function logic fault in
an ATM system could allow overdrafts or inaccurate balance updates. Debugging tools find and
solve these problems before program deployment, ensuring all actions work as intended.

Security Vulnerabilities Prevention


Unvalidated input and poorly managed exceptions are frequent security issues. Allowing non-
numeric input in finance might cause crashes or exploitation. Developers can test edge cases,
inspect variable values at runtime, and impose strict validation using debugging. This procedure
elegantly handles harmful or erroneous input, improving application security.

Variable State and Program Flow Monitoring


Breakpoints and watch windows in modern IDEs monitor variable values, stack traces, and
program execution in real time. The visibility allows developers to comprehend the influence of
every code function and decision structure. It's easy to find faulty computations or unexpected
behavior, which helps build a strong application.

Root-cause analysis and error isolation


Debugging helps pinpoint mistakes, saving development time and preventing new defects while
patching. This methodical approach improves code quality by fixing the cause, not simply the
symptoms. In financial applications, a small mistake can cause big inconsistencies, thus,
precision is crucial(Studocu, 2024).

D4 – Evaluation of the Role and Purpose of Coding


Standards in Individual and Team Settings
Individual Developer
Solo programmers benefit from coding standards' discipline and consistency. Following a
standard keeps code readable and understandable over time. Poorly structured or inconsistent
code makes it hard to follow when developers maintain or upgrade older programs.

Within a Team Environment


Coding standards are a crucial component of collaborative projects since they guarantee that
multiple developers can work on the same codebase without causing any confusion or
disagreement. It is possible that every member of the team has a unique set of coding habits,
which, if not managed, can result in code that is inconsistent and difficult to comprehend.
Coding standards that are unified make it possible for the team to collaborate.
Quality control and the power to fix problems
It's easier to test, fix bugs, and keep up with code that follows a standard. When improvements
or changes are made in the future, bugs are often introduced, especially when the original
coders are no longer available. When repair engineers follow standard procedures, they can
learn the system more quickly and make changes with little chance of breaking how it works.

Lowering Risk and Improving Security


Buffer overflows and injection attacks are reduced by secure coding standards like input
validation and exception management. All developers following these security-conscious criteria
strengthens the system against attackers.
Industry Relevance
Financial, healthcare, and aerospace businesses must follow coding standards for regulatory
compliance and software auditability. Familiarity and discipline prepare individuals and teams
for high-stakes contexts(Patel, 2024).

Conclusion
The ATM Transaction History Tracker project taught me about the entire software development
lifecycle, from algorithm definition and programming paradigms to implementation, debugging,
and code quality evaluation. This endeavor highlighted the need for planning and reasoning.
Starting with an algorithm translates a real-world problem into a step-by-step computational
solution that is converted into pseudocode and functional code using a programming language.
Exploring procedural, object-oriented, and event-driven programming paradigms showed how
each had unique benefits. The procedural model handled transaction logic, whereas OOP
encapsulated, reused, and modularized data, making the system more maintainable. In current
user interfaces, event-driven features provide responsiveness and real-time interaction.
Implementing the project in an IDE showed the benefits of syntax highlighting, error detection,
version control, and debugging tools. They increased productivity, resolved errors quickly, and
made the program more robust and error-free. Through issue identification and resolution at
various phases of development, the debugging process improved system security and reliability.
Reference list
Agans, D.J. (2006). Debugging. AMACOM/American Management Association.
Alex Louwe Kooijmans, Ramos, E., Niek De Greef, Delhumeau, D., Donna Eng Dillenberger,
Potter, H., Williams, N. and IBM Redbooks (2012). Transaction Processing: Past, Present, and
Future. IBM Redbooks.
Atencio, L. (2016). Functional Programming in JavaScript. Simon and Schuster.
Cormen, T.H. (2006). Introduction to Algorithms.
Fincher, S.A. and Robins, A.V. (2019). The Cambridge Handbook of Computing Education
Research. Cambridge University Press.
Greenstein, S.M. (2006). Computing. Cheltenham, Uk ; Northampton, Ma: Edward Elgar
Publishing.
Kenneth Leroy Busbee (2018). Programming Fundamentals.
Long, F., Dhruv Mohindra, Seacord, R.C., Sutherland, D.F. and Svoboda, D. (2011). The CERT
Oracle Secure Coding Standard for Java. Addison-Wesley Professional.
Management Association, Information Resources (2016). Renewable and Alternative Energy:
Concepts, Methodologies, Tools, and Applications. IGI Global.
MössenböckH. (1995). Object-Oriented Programming in Oberon-2. Berlin, Heidelberg: Springer
Berlin Heidelberg.
Necaise, R.D. (2016). Data structures and algorithms using Python. Hoboken, New Jersey: Wiley.
Open University (2007). Putting Java to work. Unit 7. Event-driven programming. Milton Keynes:
Open University.
Patel, R. (2024). Understanding Coding Standards: Why They Matter - Ravi Patel - Medium.
[online] Medium. Available at: [Link]
standards-why-they-matter-cc75adcba245.
Pecinovsky, R. (2013). OOP - learn object oriented thinking and programming. Repin-Zivonin:
Tomas Bruckner.
S Arikawa and Sharma, A.K. (1996). Algorithmic learning theory : 7th international workshop,
ALT ’96, Sydney, Australia, October 23-25, 1996 : proceedings. Berlin ; New York: Springer.
Slatkin, B. (2015). Effective Python. Addison-Wesley Professional.
Sripada Rama Sree (n.d.). Algorithms and Computational Theory for Engineering Applications.
Springer Nature.
Studocu. (2023). [Solved] Determine the steps taken from writing code to execution - Computing
Research Project - Studocu. [online] Available at:
[Link]
writing-code-to-execution [Accessed 11 Jun. 2024].
Studocu. (2024). [Solved] 43 Prepare a report by including followings Evaluate how the - BTEC
HND In Software / Networking Engineering (business intelligenc) - Studocu. [online] Available at:
[Link]
including-followingsevaluate-how-the-debugging-process-can.
w3Schools (2017). Introduction to Python. [online] [Link]. Available at:
[Link]
Yeager, D.P. (2012). Object-Oriented Programming Languages and Event-Driven Programming.
Mercury Learning and Information.

You might also like