DEV Community

Ahmed Ishiba
Ahmed Ishiba

Posted on

Banking system C++

One of my first projects using C++ and Qt was a banking system which I think is the basic project every student has done at least once
It actually gave me a good understanding of C++ and Qt
The project was to be submitted as a final project to my embedded linux diploma and they had some requirements which was

  • The project must be divided into a server and client application ,I wrote the client application as a QML GUI with some logic as to interpret the button presses and text as signals which then send them to the server application
  • the communication between the 2 application must be done using sockets (which I had no experience with and was the most frustrating thing to get working)
  • there should be a user and admin option for the project

First

I decided to start with the easiest thing which was the GUI it was pretty simple, only had to learn some stuff in QML so I opened the documentation and tried some basic stuff since my application is not that advanced

Second

I wrote the signals and slots and incorporated them in my GUI so the button presses actually had an impact

Third

I started doing the server application as a CLI then I added the communication part later, I used a json format for my database since I saw that Qt already had a nice library to interface with json files, next was the classes I made the database as a class and added methods like load, save and other database related functions then for the user class I wrote the methods that was required and is accessible for the user as for the admin I just inherited from the user class and overloaded some functions in order to give the admin more permissions and privileges and added functions that are only accessible to admins

Fourth

fourth came the problem that I kept procrastinating and dreading, the communication.Big shout out to claude AI because he kinda co published it, I learnt some basic stuff about TCP and how to implement it in Qt using their built in library then claude took the steering wheel and wrote stuff I somewhat understand and am too lazy to actually learn

here are some images i created using PlantUML that showcase the inheritance and usage of this banking system

github repo for source code:https://github.com/Ahmed-Ishiba/Cpp-Qt-banking-system.git

Top comments (0)