Skip to content

ChaoPhone/ATM-simulator-by-cpp-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATM Cross-Platform Simulator

Overview

The ATM Cross-Platform Simulator is a command-line application that simulates an ATM system, allowing users to perform various banking operations such as checking balances, withdrawing cash, transferring funds, and changing passwords. The project is designed to be cross-platform, supporting both Unix-like systems and Windows.

Features

  • User account management
  • Password verification and change
  • Cash withdrawal with daily and single transaction limits
  • Fund transfer between accounts
  • User-friendly command-line interface

Project Structure

atm-cross-platform
├── src
│   ├── main.cpp               # Entry point of the application
│   ├── ATM.cpp                # Implementation of the ATM class
│   ├── Server.cpp             # Implementation of the Server class
│   ├── UI.cpp                 # Implementation of the UI class
│   └── include
│       ├── ATM.hpp            # Header for the ATM class
│       ├── Server.hpp         # Header for the Server class
│       └── UI.hpp             # Header for the UI class
├── data
│   └── userinfo.txt           # User account information storage
├── tests
│   ├── CMakeLists.txt         # CMake configuration for tests
│   └── test_atm.cpp           # Unit tests for the ATM application
├── cmake
│   └── modules
│       └── FindSomeDep.cmake   # CMake module for dependency management
├── scripts
│   ├── build.sh               # Build script for Unix-like systems
│   └── build.bat              # Build script for Windows systems
├── CMakeLists.txt             # Main CMake configuration file
├── makefile                   # Makefile for building the project
├── .gitignore                 # Git ignore file
├── LICENSE                    # Licensing information
└── README.md                  # Project documentation

Getting Started

Prerequisites

  • C++ compiler (g++, clang, etc.)
  • CMake (for building the project)
  • Make (optional, for using the makefile)

Building the Project

  1. Clone the repository:

    git clone <repository-url>
    cd atm-cross-platform
    
  2. Using CMake:

    mkdir build
    cd build
    cmake ..
    make
    
  3. Using Makefile:

    make
    

Running the Application

After building the project, you can run the ATM simulator:

./atm  # On Unix-like systems
atm.exe  # On Windows

Running Tests

To run the unit tests, navigate to the tests directory and use CMake to build and execute the tests.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Chongqing University_25 Mingyue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors