Question: Create a Transaction class include transaction number, date, type, amount. Use type of string for date. There is no need to use Date or DateTime
Create a Transaction class include transaction number, date, type, amount. Use type of string for date. There is no need to use Date or DateTime object. You only need, the constructor and toString() methods in the Transaction class. (3 points)
Automatically generate transaction number from a static number and include toString() override for all variables and then create an array to hold the following transactions
1. 16/08/2017 Open Account 100
2. 22/08/2017 Withdraw 50
3. 23/09/2017 Deposit 100
Serialized the array and saves it to a file named transactions.txt
Read the array from the file and reconstruct a new array from this data and print out each item in the array to the console
Create a BankAccount class with attributes containing name, account number, balance, transaction and overdraft. Account number should be generated automatically from a static number. You only need the constructor and 4 methods mention below in the BankAccount class. All variables except overdraft are serializable (4 points)
include methods of deposit(String date, double amount), withdraw(String date, double amount), getTransactionDetail(), and toString() override for all variables
print out Insufficient fund message if the withdraw amount is greater than the balance. Transaction with insufficient fund should not be included in the transaction details.
create a BankAccount object with date 16/08/2017 and amount of 100. Make withdraw and deposit with following information
22/08/2017 Withdraw 200
23/08/2017 Deposit 100
01/09/2017 Withdraw 50
serialize the BankAccount object and saves it to a file name accountdetails.txt and deserialize the file and print out the account details followed by the transaction
Example of account details:
Account Number: 1001 Name: Jenny, Lee Balance: 150.0 Overdraft: 100.0
Example of transaction details:
1. 16/08/2017 Open Account: 100.0
2. 22/08/2017 Deposit: 100.0
3. 23/08/2017 Withdraw: 50.0
Create a text file containing the following information without the double quotes (2 points)
Would you like to increase your overdraft? Please type Yes/No at the end of the line.
append Yes or No at the end of this file using RandomAccessFile object
print the appended file to the console
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
