Skip to content

Release - Transaction Console v2.x

 Updated: 10 min read

Actions

  1. Open Google Drive folder to view all associated files and source.

  2. Open presentation in Google Slides.

  1. Open GitHub Repository source for this project.

“Transaction Console” is a command-line interface (CLI) application developed entirely in C that simulates a transaction process similar to that of an ATM. It provides users with a console-based environment to perform various transaction-related operations, as part of a project conducted by the Deogiri Institute of Engineering and Management Studies for the “Design and Analysis of Algorithms” subject.

Table of contents

Open Table of contents

1. Features

Here are the key aspects and functionalities of the “Transaction Console”:

  1. Command-Line Interface (CLI): The application is accessed through a command-line interface, allowing users to interact with it by typing commands and receiving corresponding responses.

  2. Cross-Platform Support: The “Transaction Console” is designed to work on both Windows and Linux operating systems, ensuring compatibility and accessibility for a wide range of users.

  3. ASCII Color Codes: The application incorporates ASCII color codes to enhance the visual aesthetics of the console interface. This feature adds a touch of visual appeal to the user experience.

  4. Command Recognition: The console is capable of recognizing and interpreting commands entered by the user. It can understand and process various transaction-related commands without relying on regular expressions. If a command is not recognized, the console gracefully ignores it.

  5. Error Handling: The “Transaction Console” includes error handling capabilities to ensure a smooth user experience. It provides informative error messages in case of incorrect inputs or exceptional situations, allowing users to understand and rectify their actions.

  6. Offline Functionality: The application operates entirely offline and doesn’t require any local file storage. This ensures that users can perform transactions and access the features of the “Transaction Console” without relying on an internet connection or external data sources.

  7. Optimization with Greedy Approach: The “Transaction Console” incorporates a Greedy Approach to solve a specific problem statement related to maximizing denominations in a currency system. It intelligently chooses the best available option at each step to optimize the utilization of given denominations and fill the remaining amount effectively.

Overall, the “Transaction Console” offers a user-friendly and efficient environment for simulating transaction processes. It combines the power of the C programming language, CLI interactivity, error handling, offline functionality, and optimization techniques to provide a comprehensive solution for transaction-related operations.

2. Getting Started

To get started with the Transaction Console, follow these steps:

  1. Head to the latest release in this repository.

  2. Download the executable file for your operating system (Windows or Linux) from the release page.

  3. Once the file is downloaded, you can directly execute it without the need for any compilation or building steps. The executable file contains the compiled version of the “Transaction Console” application.

  4. Open a command-line interface (CLI) or terminal on your computer.

  5. Navigate to the location where you saved the downloaded executable file.

  6. Execute the “Transaction Console” application by running the appropriate file. Refer to usage section for more info.

  7. The console interface will appear, ready for you to enter commands and perform transaction-related operations.

  8. If you ever need help or want to learn more about the available commands and their usage, simply type the command help in the console. The application will provide you with detailed information about each command and guide you through the process.

3. Usage

Please note that the “Transaction Console” already provides the compiled executable file for your convenience. It eliminates the need for manual compilation or building steps, allowing you to quickly start using the application.

All you need to do is run the appropriate executable file.

Just Double click for windows users

For linux users, simply run

./Linux64_Transaction_Console.out 

Also you can compile the code (if needed) in the src folder.

gcc cs50.c bank.c token.c main.c -o Linux64_Transaction_Console.out

can do (optionally) memory check using

valgrind ./Linux64_Transaction_Console.out 

or (optionally) time check using

time ./Linux64_Transaction_Console.out 

4. Documentation

    Command $: help
    Command $: login
    Command $: deposit (amount)
    e.g.    $: deposit 300
    Command $: withdraw (amount)
    e.g.    $: withdraw 300
    Command $: withdraw cash (amount) (note-denom...) done
    e.g.    $: withdraw cash 300 100 50 done
  Command $: show
  Command $: logout
  Command $: exit

Please note that all commands should be entered exactly as shown, including any required arguments and in the correct order. Refer to the command descriptions above for proper usage.

5. Walk Through

  1. Dashboard of Transaction Console: Dashboard of Transaction Console displaying the initial prompt for the bank name. After entering the bank name, it welcomes the user to the console interface.

TC-Interface.png

  1. Executed Help Command: Output of the executed Help command displaying the information and usage instructions for the available commands in the “Transaction Console”.

TC-Intro.png

  1. Login, Deposit, Withdraw, Show Status, and Logout: Various commands available in the “Transaction Console” including Login, Deposit, Withdraw, Show Status, and Logout. Each command enables the user to perform specific actions within the transaction system.

TC-1st-Tour.png

  1. Login, Show Status, Withdraw (with denomination using greedy), Show Status, Logout: Step-by-step demonstration of the transaction process. It showcases logging into the system, displaying the account status, making a withdrawal with denominations using a greedy approach, showing the updated account status, and finally logging out from the console.

TC-2nd-Tour.png

  1. Error Handling Demonstration: Demonstration of error handling in the “Transaction Console”. Examples include accessing the console without logging in, typing an incomplete command like deposit without specifying the amount, and typing a wrong command like “abcd” which is ignored gracefully by the console.

TC-Error-Handling.png

                   **                  
                ** ** **               
             ***        ***            
          ***              ***         
       ***                    ***      
    ***                          ***   
 *** ** ************************ ** ***
                                       
    ****    ****         ****   ****   
     **      **           **     **    
     **      **           **     **    
     **      **           **     **    
     **      **           **     **    
     **      **           **     **    
    ****    ****         ****   ****   
                                       
   **********************************  
 **************************************

Previous Project
Release - QR Notes v1.0.0-beta