Welcome to the Payment Management Module repository for the Object-Oriented Programming (OOP) course. This project involves designing and implementing a system to manage various payment services for a company. Below is a detailed guide on the project's requirements, structure, and implementation.
This project simulates a payment management system with three payment service types:
- Convenient Card
- EWallet
- Bank Account
- Manage payment service accounts.
- Process transactions such as payments and money transfers.
- Handle exceptions and specific transaction requirements.
- Implement interfaces for extensible functionality.
.
├── Input Files
│ ├── IDCard.txt # Contains ID card information.
│ ├── PaymentInformation.txt # Details of payment service accounts.
│ ├── TopUpHistory.txt # History of top-up transactions.
│ ├── Bill.txt # Details of payment transactions.
├── Expected Output
│ ├── Req3.txt
│ ├── Req4.txt
│ ├── Req5.txt
│ ├── Req6.txt
│ ├── Req7.txt
│ ├── Req8.txt
│ ├── Req9.txt
├── Source Files
│ ├── TestReq1.java # Tests for Requirement 1.
│ ├── TestReq2.java # Tests for Requirement 2.
│ ├── Test.java # Tests for Requirements 3-9.
│ ├── Bill.java # Predefined Bill class.
│ ├── CannotCreateCard.java # Custom exception for card creation.
│ ├── IDCard.java # IDCard class.
│ ├── IDCardManagement.java # Manages IDCard objects.
│ ├── ConvenientCard.java # ConvenientCard class.
│ ├── EWallet.java # EWallet class.
│ ├── BankAccount.java # BankAccount class.
│ ├── TransactionProcessing.java # Handles transaction processing.
└── README.md # Documentation for the project.
-
Clone the repository
git clone https://github.com/nhathao512/Payment-Service-Management-Module.git cd PaymentManagementModule -
Input Files
- Ensure the
inputdirectory contains the required files:IDCard.txt,PaymentInformation.txt,TopUpHistory.txt, andBill.txt.
- Ensure the
-
Compilation
- Use
javacto compile all.javafiles:javac *.java
- Use
-
Execution
- Run the provided test files to validate the implementation of each requirement:
java TestReq1 # Test Requirement 1 java TestReq2 # Test Requirement 2 java Test # Test Requirements 3-9
- Run the provided test files to validate the implementation of each requirement:
-
Output Files
- Results will be written to the
outputdirectory for comparison with expected results in theexpected_outputfolder.
- Results will be written to the
-
ConvenientCard Class Implementation
- Define rules for creating cards based on age.
- Handle
CannotCreateCardexceptions.
-
EWallet and BankAccount Transfer Implementation
- Implement the
transfermethod for handling money transfers with transaction fees.
- Implement the
-
File Parsing
- Parse
PaymentInformation.txtto populate payment accounts.
- Parse
-
Adult Convenient Cards
- Filter and return a list of adult ConvenientCard accounts.
-
Accounts with All Services
- Identify customers who have all three service types.
-
Top-Up Processing
- Process top-up transactions from
TopUpHistory.txt.
- Process top-up transactions from
-
Unsuccessful Transactions
- Identify failed transactions from
Bill.txt.
- Identify failed transactions from
-
Largest Bank Payments
- Determine accounts with the largest successful bank payments.
-
Discounted Transactions
- Apply discounts to eligible transactions based on customer attributes and purchase details.
- Ensure all file paths are relative for compatibility.
- Modify
mainmethods in test files for additional debugging if needed. - Compare output files against
expected_outputfor validation.
-
Submit the following files only:
ConvenientCard.javaEWallet.javaBankAccount.javaIDCard.javaTransactionProcessing.java
-
Structure for submission:
MSSV_HoTen.zip ├── ConvenientCard.java ├── EWallet.java ├── BankAccount.java ├── IDCard.java └── TransactionProcessing.java -
Submit the
.zipfile to the ELIT system by 23:59, 04/06/2023.
- Use Java 11 or Java 8.
- Do not alter method names or signatures.
- Avoid hardcoding file paths.
- Ensure the program compiles and runs using provided
mainmethods. - Any plagiarism or unauthorized assistance will result in disqualification.
This project is licensed under the License.
Special thanks to Ton Duc Thang University and the Faculty of Information Technology for providing this comprehensive exercise in Object-Oriented Programming.