Question: Please help me write this Java class function. We are using the latest version of java. Thank You! Please provide screenshots of your code and

Please help me write this Java class function. We are using the latest version of java. Thank You! Please provide screenshots of your code and output since it is easier to see the format that way.

Please help me write this Java class function. We are using the

latest version of java. Thank You! Please provide screenshots of your code public class BankDemo1 { public static void main(String[] args) { Bank csumbBank = new Bank("CSUMB"); System.out.println("========== READ DATA =========="); csumbBank.readData("C:\\tmp\\test1.txt"); System.out.println("========== DONE =========="); System.out.println(" ========== BANK INFORMATION =========="); csumbBank.bankInfo(); System.out.println(" ========== ACCOUNT INFORMATION =========="); csumbBank.accountInfo(1000); csumbBank.deposit(1000, 150.25); System.out.println(" ========== ACCOUNT INFORMATION =========="); csumbBank.accountInfo(1000); csumbBank.withdraw(1000, 100); System.out.println(" ========== ACCOUNT INFORMATION =========="); csumbBank.accountInfo(1000); System.out.println(" ========== ACCOUNT CLOSE =========="); if (csumbBank.closeAccount(1000)) { System.out.println("Account closed."); } System.out.println(" ========== TRANSACTION INFO =========="); csumbBank.transaction(1000); System.out.println(" ========== TRANSACTION INFO =========="); csumbBank.transaction(2000); } } 

and output since it is easier to see the format that way.

This is the class used to get the correct date and time format:

import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { LocalDateTime now = LocalDateTime.now(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd, HH:mm:ss"); String formatDateTime = now.format(formatter); System.out.println(formatDateTime); } } 

Sample Execution Result 1:

public class BankDemo1 { public static void main(String[] args) { Bank csumbBank

= new Bank("CSUMB"); System.out.println("========== READ DATA =========="); csumbBank.readData("C:\\tmp\\test1.txt"); System.out.println("========== DONE =========="); System.out.println(" public class BankDemo2 { public static void main(String[] args) { Bank csumbBank = new Bank("CSUMB"); csumbBank.readData("C:\\tmp\\test1.txt"); System.out.println("========== NEW CUSTOMERS =========="); csumbBank.newCustomer("Bob Smith", "123 University Center", 93955, "123-45-6789"); csumbBank.newCustomer("Unknown Smith", "123 University Center", 93955, "777-77-7777"); System.out.println(" ========== NEW ACCOUNTS =========="); csumbBank.newAccount("777-77-7777", 4000, 1, 100.50); csumbBank.newAccount("123-45-7777", 2000, 1, 100.50); csumbBank.newAccount("123-45-7777", 4000, 1, 100.50); System.out.println(" ========== ACCOUNT INFO =========="); csumbBank.accountInfo(7000); System.out.println(" ==== CUSTOMER WITH LAST FOUR DIGIT SSN ===="); csumbBank.customerInfoWithSSN(7979); System.out.println(" ==== CUSTOMER WITH SSN 7777 ===="); csumbBank.customerInfoWithSSN(7777); System.out.println(" ==== CUSTOMER WITH SSN 6789 ===="); csumbBank.customerInfoWithSSN(6789); // We try to close the account 2000. csumbBank.closeAccount(2000); System.out.println(" ==== REMOVE CUSTOMER: 555-55-5555 ===="); csumbBank.removeCustomer("555-55-5555"); System.out.println(" ==== REMOVE CUSTOMER: 777-77-7777 ===="); csumbBank.removeCustomer("777-77-7777"); } } 
========== BANK INFORMATION =========="); csumbBank.bankInfo(); System.out.println(" ========== ACCOUNT INFORMATION =========="); csumbBank.accountInfo(1000); csumbBank.deposit(1000, 

you will develop four classes called Bank, Account, Customer, and Transaction to store account information, customer information, and transaction information of a bank. Based on the sample input data and sample run, you should identify operations of the project you can use either Array or ArrayList. If you use arrays, you can assume that your Bank class can have maximum 30 Accounts, 30 Customers, and 100 Transactions. Note that an Account object can have only one Customer, and each Customer can have a maximum of two Accounts (-one checking and one savings account). A Transaction object should include the account number, transaction type( deposit, withdrawal, and closing an account), and trans- action date/time information Sample Input File The following file represents a sample bank data file, c: \\tmp\\test1.txt, which is used in the sample runs below. Note that the first line (- 4) indicates the number of customers in the bank. The customer's information includes the name, address, zip code, and Social Security Number (SSN). Note that each customer data is delimited by comma symbol (). After the customer data, there is a number of accounts5 in the example). Each account in formation has SSN, account number, account type (1: checking, 2: savings), and current balance. Again, comma is used as a delimiter. 4 Tom Smith,123 University Center,93955,777-77-7777 Alice Smith,123 University Center, 93955, 888-88-8888 Joe Otter,2440 Ocean Avenue,93900,999-99-9999 Monica Smith,123 University Center, 93955,123-45-7777 777-77-7777,1000,1,10.0 888-88-8888,2000,1,50.25 777-77-7777,3000,2,100.0 999-99-9999,5000,1,100.25 888-88-8888, 6000,2,500.25 you will develop four classes called Bank, Account, Customer, and Transaction to store account information, customer information, and transaction information of a bank. Based on the sample input data and sample run, you should identify operations of the project you can use either Array or ArrayList. If you use arrays, you can assume that your Bank class can have maximum 30 Accounts, 30 Customers, and 100 Transactions. Note that an Account object can have only one Customer, and each Customer can have a maximum of two Accounts (-one checking and one savings account). A Transaction object should include the account number, transaction type( deposit, withdrawal, and closing an account), and trans- action date/time information Sample Input File The following file represents a sample bank data file, c: \\tmp\\test1.txt, which is used in the sample runs below. Note that the first line (- 4) indicates the number of customers in the bank. The customer's information includes the name, address, zip code, and Social Security Number (SSN). Note that each customer data is delimited by comma symbol (). After the customer data, there is a number of accounts5 in the example). Each account in formation has SSN, account number, account type (1: checking, 2: savings), and current balance. Again, comma is used as a delimiter. 4 Tom Smith,123 University Center,93955,777-77-7777 Alice Smith,123 University Center, 93955, 888-88-8888 Joe Otter,2440 Ocean Avenue,93900,999-99-9999 Monica Smith,123 University Center, 93955,123-45-7777 777-77-7777,1000,1,10.0 888-88-8888,2000,1,50.25 777-77-7777,3000,2,100.0 999-99-9999,5000,1,100.25 888-88-8888, 6000,2,500.25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!