The objective of this project is to demonstrate your ability to apply programming logic in the C language and adapt to an existing codebase by implementing new features and fixing existing issues. You are given a partially implemented ATM management system. Your task is to add the missing features and ensure proper file-based persistence and functionality.
-
π§Ύ Registration
- Users can register with a unique username (duplicates are not allowed).
- User data is stored in
database.db.
-
π Login
- Users can log in to access account operations securely.
-
π Update Account Information
- Users can update the country or phone number of an account.
- Prompts for account
idand field to update. - All changes are written back to
database.db.
-
π Check Account Details
- Users can retrieve information for a single account using its
id. - Interest is displayed based on account type:
savings: 7%fixed01: 4%fixed02: 5%fixed03: 8%current: No interest
- Users can retrieve information for a single account using its
-
πΈ Make Transactions
- Supports withdrawals and deposits for eligible accounts.
- β Transactions are not allowed for fixed-term accounts.
-
π Remove Account
- Allows users to delete their own accounts.
- Changes are persisted in
database.db.
-
π Transfer Ownership
- Users can transfer ownership of an account to another registered user.
- Validates both accounts and updates ownership in the database.
.
βββ data
β βββ database.db # Stores all user and account data
βββ src
βββ auth.c # Handles login and registration
βββ funcs.c # Core functionality for account operations
βββ header.h # Shared declarations
βββ header.h.gch # Precompiled header (can be ignored or regenerated)
βββ main.c # Program entry point
βββ manageDB.c # File/database handling
βββ system.c # System UI and navigation logic
To compile the project, run:
gcc src/*.c -l sqlite3 -o atmTo execute:
./atm- All data is stored in a single file:
data/database.db.
Feel free to enhance this project further by adding encryption, a GUI, or additional validations.