This is a multi-module Maven project containing Parasoft demo applications.
This project consists of two modules:
- bank: Banking application module with sample bank operations
- atm: ATM (Automated Teller Machine) banking terminal that depends on bank
parasoft-demo-jbank/
├── pom.xml # Parent POM with shared configuration
├── README.md
├── bank/ # Banking application module
│ ├── pom.xml
│ ├── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── parasoft/
│ │ └── jdemo/
│ │ └── bank/
│ │ ├── Bank.java
│ │ ├── Account.java
│ │ ├── Customer.java
│ │ ├── CreditCard.java
│ │ ├── AbstractTransaction.java
│ │ ├── DepositTransaction.java
│ │ ├── WithdrawalTransaction.java
│ │ ├── ITransaction.java
│ │ ├── ICreditAgency.java
│ │ ├── BankState.java
│ │ ├── ConnectionException.java
│ │ └── LogAccountInfo.java
│ │ └── test/
│ │ └── java/
│ └── target/
└── atm/ # ATM application module
├── pom.xml
├── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── parasoft/
│ │ └── jdemo/
│ │ └── atm/
│ │ ├── ATM.java
│ │ ├── Account.java
│ │ ├── Bank.java
│ │ └── BaseDisplay.java
│ └── test/
│ └── java/
└── target/
To build all modules:
mvn clean installTo build a specific module:
cd bank
mvn clean installTo compile without running tests:
mvn clean compileThe bank module contains a sample bank application with various errors and bad practice examples which can be detected by Jtest analysis.
Key Components:
Bank.java- Main bank class managing accountsAccount.java- Bank account representationCustomer.java- Customer informationCreditCard.java- Credit card management- Transaction classes for deposits and withdrawals
- Error handling and logging utilities
The atm module contains the ATM (Automated Teller Machine) banking terminal application. An ATM allows customers to perform financial transactions such as withdrawals, deposits, and balance inquiries without needing a human teller.
Origin: Converted from C++ to Java implementation with enhanced interactive features.
Key Components:
ATM.java- Main ATM controller with interactive menu system and transaction processingAccount.java- ATM account representation with balance managementBank.java- Account management system for ATM operationsBaseDisplay.java- User interface for displaying messages and balance information
Interactive Features:
-
Main Menu:
- Create new accounts with password protection
- Login to existing accounts
- Exit application
-
Transaction Menu (after login):
- View current account balance
- Deposit money into account
- Withdraw money from account
- Logout and return to main menu
Running the ATM Application:
# Compile the project first
mvn clean compile
# Run the ATM application
java -cp atm/target/classes com.parasoft.jdemo.atm.ATMUsage Example:
- Create a new account with initial deposit and password
- Login using your account number and password
- Perform transactions (view balance, deposit, or withdraw)
- Logout when finished
Dependencies:
- Depends on the
bankmodule for banking operations
- Java: 11
- Build Tool: Maven
- Testing: JUnit 5 (Jupiter), JUnit Vintage, Mockito
- Quality Analysis: Parasoft Jtest
The project uses Maven's multi-module reactor build. The build order is:
- Parent POM
- bank module
- atm module (depends on bank)
The project is configured with:
- UTF-8 source encoding
- Java 11 source and target compatibility
- Shared dependency management in parent POM
- Common plugin configuration for all modules