Computer Programming Module

29-09-2020

Introduction

The Computer Programming module in the Cyber Security Degree focused on introducing the fundamentals of Object-Oriented Programming (OOP) using Python 3.0+. The development environment used for this module was Spyder IDE, which provided a smooth and intuitive interface for Python development. Below is a summary of some key topics covered throughout the module:

  • Software Design Methodology
  • SI Units & Number Systems
  • Variables, Simple I/O & Decision Structures
  • Functions, Modules & Various Scope
  • Repetitive Structures, Lists, Tuples & Dictionaries
  • Testing & Debugging
  • Object-Oriented Programming (OOP)

Banking System Application

For the main piece of work, we were tasked with developing a Banking System Application in Python. This project helped solidify the core concepts of OOP while applying them to a practical, real-world scenario.

Features of the Banking System:

  1. Account Management:

    • The application allowed users to create and manage bank accounts, where each account could have a balance and perform basic transactions like deposits and withdrawals.
  2. Persistent Storage:

    • One of the key features was the ability to store the balance of each account, ensuring that data is not lost when the program is closed and reopened. This was accomplished by using file handling to save the account details to a file.
  3. Admin Accounts:

    • The system also featured admin accounts, which had elevated privileges compared to normal users. Admins were able to perform certain restricted actions, such as deleting accounts or viewing all users' balance information, while normal users were only allowed to access their own accounts.

Key Concepts Applied:

  • Classes and Objects: The program utilized classes to represent accounts, and objects were created for each user’s bank account.
  • Encapsulation: The application implemented encapsulation by restricting direct access to sensitive data (such as account balances), ensuring only certain methods could modify or retrieve the balance.
  • Inheritance: The admin accounts inherited from a base user class but had additional methods and properties, demonstrating the use of inheritance in OOP.
  • Persistence: The use of file I/O ensured that user data persisted between program executions, utilizing techniques like reading from and writing to a text file.

Conclusion

This Banking System Application project provided hands-on experience with fundamental Object-Oriented Programming principles and the Python programming language. It not only reinforced key concepts like classes, objects, file handling, and admin permissions but also served as a solid foundation for understanding more complex programming structures in future projects.


Sources:

  • None