Java project:
A Bank Transaction System For A Regional Bank User Story A
regional rural bank CEO wants to modernize banking experience for
his customers by providing a computer solution for them to post the
bank transactions in their savings and checking accounts from the
comfort of their home. He has a vision of a system, which begins by
displaying the starting balances for checking and savings account
for a customer. The application first prompts the user to enter the
information for a transaction, including whether a withdrawal or
deposit is to be made, whether the transaction will be posted to
the checking or savings account, and the amount of the transaction.
When the user (customer) finishes deposits and withdrawals, the
application displays the fees and payments for the month followed
by the final balances for the moth. The application needs to be
friendly and it needs to validate the user entries. Operation • The
application begins by displaying the starting balances for a
checking and savings account. • The application prompts the user to
enter the information for a transaction, including whether a
withdrawal or deposit is to be made, whether the transaction will
be posted to the checking or savings account, and the amount of the
transaction. • When the user finishes entering deposits and
withdrawals, the application displays the fees and payments for the
month followed by the final balances for the month.
A typical customer interaction:
Welcome to the Account application
Starting Balances Checking: $1,000.00 Savings: $1,000.00
Enter the transactions for the month
Withdrawal or deposit? (w/d): w Checking or savings? (c/s): c
Amount?: 500
Continue? (y/n): y
Withdrawal or deposit? (w/d): d Checking or savings? (c/s): s
Amount?: 200
Continue? (y/n): n
Monthly Payments and Fees Checking fee: $1.00 Savings interest
payment: $12.00
Final Balances Checking: $499.00 Savings: $1,212.00
Assumptions • There is no database for this system, that means nothing is stored or read from • The starting deposits are $1000 for both the accounts for each run. Banking fee is $1/month, and interest earned is 1%/month • Bank fee is flat fee and charged only once at the end of transactions for the checking account only • Interest earned is calculated only once for the balance left in the savings account only Requirement 1) The CEO of this bank has hired you. Your job is to write an object oriented Java program to provide the above experience, simulating a simplified banking experience. You need to identify the classes and its hierarchy (use inheritance). You should also have proper interfaces identified, which mandates all the required behaviors as described in the problem domain 2) Provide an application (user) class as well, which uses these classes to complete the user interaction. Your program needs to be idiot proof, meaning, you need to validate user entries and guide the user properly to enter correct information. 3) Overdraft is not allowed and final balance should not be negative for any accounts
AccountBalance.java
import java.text.NumberFormat;
public class AccountBalance {
public static void main(String[] args) {
CheckingAccount
checkingAccount = new CheckingAccount(1.00);
SavingsAccount
savingsAccount = new SavingsAccount(0.01);
checkingAccount.setBalance(1000.00);
savingsAccount.setBalance(1000.00);
NumberFormat currency = NumberFormat.getCurrencyInstance();
Console.displayLine("Welcome to the Account application\n");
Console.displayLine("Starting Balances");
displayBalances(checkingAccount, savingsAccount);
Console.displayLine();
Console.displayLine("Enter the transactions for the month\n");
String choice = "y";
while
(choice.equalsIgnoreCase("y")) {
String transactionType = Console.getString("Withdrawal or deposit?
(w/d): ", "w", "d");
String accountType = Console.getString("Checking or savings? (c/s):
", "c", "s");
double amount = Console.getDouble("Amount? ");
//
if (transactionType.equalsIgnoreCase("w")) {
//
amount = Console.getWithdrawalDouble("Amount? ");
//
} else {
//
amount = Console.getDouble("Amount? ");
//
}
Console.displayLine();
// code to perform transaction
Account account = null;
if (accountType.equalsIgnoreCase("c")) {
account = checkingAccount;
} else {
account = savingsAccount;
}
if (transactionType.equalsIgnoreCase("w")) {
if (amount > account.getBalance()) {
Console.displayLine("Amount entered exceeds account
balance.\nPlease enter a valid amount.\n");
} else {
account.withdraw(amount);
}
} else {
account.deposit(amount);
}
choice = Console.getString("Continue? (y/n): ", "y", "n");
Console.displayLine();
}
// apply interest and
fees
checkingAccount.subtractMonthlyFee();
savingsAccount.setMonthlyIntPayment(savingsAccount.getBalance(),
savingsAccount.getMonthlyIntRate());
savingsAccount.applyPaymentToBalance();
Console.displayLine("\nMonthly Payments and Fees");
Console.displayLine("Checking
Fee:
" + currency.format(checkingAccount.getMonthlyFee()));
Console.displayLine("Savings Interest Payment: "
+ currency.format(savingsAccount.getMonthlyIntPayment()));
Console.displayLine();
Console.displayLine("Final Balances");
displayBalances(checkingAccount, savingsAccount);
}
private static void
displayBalances(CheckingAccount ca, SavingsAccount sa) {
NumberFormat currency =
NumberFormat.getCurrencyInstance();
Console.displayLine("Checking: " +
currency.format(ca.getBalance()));
Console.displayLine("Savings: " +
currency.format(sa.getBalance()));
}
}
CheckingAccount.java
public class CheckingAccount extends Account {
double monthlyFee;
public CheckingAccount(double fee) {
monthlyFee = fee;
}
public double getMonthlyFee() {
return monthlyFee;
}
public void subtractMonthlyFee () {
setBalance(getBalance() -
monthlyFee);
}
}
SavingsAccount.java
public class SavingsAccount extends Account {
double monthlyIntRate;
double monthlyIntPayment;
public SavingsAccount(double rate) {
monthlyIntRate = rate;
}
public double getMonthlyIntRate() {
return monthlyIntRate;
}
public void setMonthlyIntPayment(double balance,
double rate) {
monthlyIntPayment = balance *
rate;
}
public double getMonthlyIntPayment() {
return monthlyIntPayment;
}
public void applyPaymentToBalance() {
setBalance(getBalance() +
getMonthlyIntPayment());
}
}
Account.java
public class Account implements Balancable, Withdrawable,
Depositable {
protected double balance = 0;
@Override
public void deposit(double amount) {
// TODO Auto-generated method
stub
balance += amount;
}
@Override
public void withdraw(double amount) {
// TODO Auto-generated method
stub
balance -= amount;
}
@Override
public double getBalance() {
// TODO Auto-generated method
stub
return balance;
}
@Override
public void setBalance(double amount) {
// TODO Auto-generated method
stub
balance = amount;
}
}
Balancable.java
public interface Balancable {
double getBalance();
void setBalance(double amount);
}
Withdrawable.java
public interface Withdrawable {
void withdraw(double amount);
}
Console.java
import java.util.Scanner;
public class Console {
private static Scanner sc = new
Scanner(System.in);
public static void displayLine() {
System.out.println();
}
public static void displayLine(String s)
{
System.out.println(s);
}
public static String getString(String prompt)
{
System.out.print(prompt);
String s =
sc.nextLine();
return s;
}
public static String getString(String prompt, String
s1, String s2) {
String s = "";
System.out.print(prompt);
boolean isValid = false;
while (!isValid) {
s =
sc.next();
if(s.equalsIgnoreCase(s1) || s.equalsIgnoreCase(s2)) {
isValid = true;
} else {
System.out.println("Error! This entry is
required. Try again.");
}
sc.nextLine();
}
return s;
}
public static int getInt(String prompt)
{
int i = 0;
while (true) {
System.out.print(prompt);
try {
i = Integer.parseInt(sc.nextLine());
break;
} catch (NumberFormatException e) {
System.out.println("Error! Invalid integer. Try again.");
}
}
return i;
}
public static int getInt(Scanner sc, String
prompt) {
int i = 0;
boolean isValid =
false;
while (!isValid) {
System.out.print(prompt);
if (sc.hasNextInt()) {
i = sc.nextInt();
isValid = true;
} else {
System.out.println("Error! Invalid integer value. Try
again.");
}
sc.nextLine(); // discard any other data entered on the line
}
return i;
}
public static int getInt(Scanner sc, String
prompt,
int min, int max) {
int i = 0;
boolean isValid =
false;
while (!isValid) {
i = getInt(sc, prompt);
if (i <= min) {
System.out.println(
"Error! Number must be greater than " + min + ".");
} else if (i >= max) {
System.out.println(
"Error! Number must be less than " + max + ".");
} else {
isValid = true;
}
}
return i;
}
public static double getDouble(String prompt)
{
double d = 0;
while (true) {
System.out.print(prompt);
try {
d = Double.parseDouble(sc.nextLine());
break;
} catch (NumberFormatException e) {
System.out.println("Error! Invalid decimal. Try again.");
}
}
return d;
}
public static double getDouble(Scanner sc,
String prompt) {
double d = 0.0;
boolean isValid =
false;
while (!isValid) {
System.out.print(prompt);
if (sc.hasNextDouble()) {
d = sc.nextDouble();
isValid = true;
} else {
System.out.println("Error! Invalid decimal value. Try
again.");
}
sc.nextLine(); // discard any other data entered on the line
}
return d;
}
public static double getDouble(Scanner sc,
String prompt,
double min, double max) {
double d = 0.0;
boolean isValid =
false;
while (!isValid) {
d = getDouble(sc, prompt);
if (d <= min) {
System.out.println(
"Error! Number must be greater than " + min + ".");
} else if (d >= max) {
System.out.println(
"Error! Number must be less than " + max + ".");
} else {
isValid = true;
}
}
return d;
}
Depositable.java
public interface Depositable {
void deposit (double amount);
}

Java project: A Bank Transaction System For A Regional Bank User Story A regional rural bank...
Project 9-2: Account Balance Calculator Create an application that calculates and displays the starting and ending monthly balances for a checking account and a savings account. --->Console Welcome to the Account application Starting Balances Checking: $1,000.00 Savings: $1,000.00 Enter the transactions for the month Withdrawal or deposit? (w/d): w Checking or savings? (c/s): c Amount?: 500 Continue? (y/n): y Withdrawal or deposit? (w/d): d Checking or savings? (c/s): s Amount?: 200 Continue? (y/n): n Monthly Payments and Fees Checking fee: $1.00 Savings...
****USING PYTHON***** Write a program to simulate a bank transaction. There are two bank accounts: checking and savings. First, ask for the initial balances of the bank accounts; reject negative balances. Then ask for the transactions; options are deposit, withdrawal, and transfer. Then ask for the account; options are checking and savings. Reject transactions that overdraw an account. At the end, print the balances of both accounts
Create an Inheritance hierarchy that a bank may use to represent customer's bank accounts (Checking and Savings), this includes a GUI user interface that allows user to login, and deposit or withdraw, and application to display the transaction and final balance. All the bank customers can: - Create a new account - Deposit (Credit) money into their account and/or withdraw (debit) money from their account. - Application should expect user to login to their account using login/password Create necessary classes...
You have been hired as a programmer by a major bank. Your first project is a small banking transaction system. Each account consists of a number and a balance. The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, and balance inquiries. The application consists of the following functions: N- New account W- Withdrawal D- Deposit B- Balance Q- Quit X- Delete Account Use the following...
The Checking account is interest free and charges transaction fees. The first two monthly transactions are free. It charges a $3 fee for every extra transaction (deposit, withdrawal). The Gold account gives a fixed interest at 5% while the Regular account gives fixed interest at 6%, less a fixed charge of $10. Whenever a withdrawal from a Regular or a Checking account is attempted and the given value is higher than the account's current balance, only the money currently available...
JAVA PROGRAMMING LANGUAGE!!!! JAVA PROGRAMMING LANGUAGE!!!! JAVA PROGRAMMING LANGUAGE!!!! Bank Account and Savings Account Classes Design an abstract class named BankAccount to hold the following data for a bank account: • Balance • Number of deposits this month • Number of withdrawals • Annual interest rate • Monthly service charges The class should have the following methods: Constructor: The constructor should accept arguments for the balance and annual interest rate. deposit: A method that accepts an argument for the amount of...
The objective of this project is to provide experience working with user interface menus and programmed decision making. Modify the C++ source you created in Project # 2 to incorporate the following requirements: 1. Present a menu to the user which includes: a. Enter checking account transaction b. Enter savings account transaction c. Quit 2. If the user selects a., request the checking account balance, the checking account transaction date, the checking account description, and the checking account amount from...
Should be in C#
Create an inheritance hierarchy that a bank might use to
represent customers’ bank accounts. All customers at this back can
deposit (i.e. credit) money into their accounts and withdraw (i.e.
debit) money from their accounts. More specific types of accounts
also exist. Savings accounts, for instance, earn interest on the
money they hold. Checking accounts, on the other hand, charge a fee
per transaction.
Create base class Account and derived classes SavingsAccount and
CheckingAccount that inherit...
BANK ATM application program in JAVASCRIPT, that allows the user to manage transaction data. like withdraw,deposit,etc. Make sure it produces tabular feedback to the user. (meaning user should be able to enter a quanity let's say $20 withdrawal and balance of $100, so it's balance will be $80..As well to deposit money and add the balance to that deposit. Finally to show (-) signs if balance is overdraw,,,Program reads input from the user though the web page., any help is...
JAVA PLEASE Create a class called Account with the following instance data Integer id Double balance Provides the following methods Default constructor (defaults balance to 100) Constructor with parameters for the ID and the starting balance Accessor and mutator methods for id and balance Method to perform a withdrawal Method to perform a deposit Create a class called Bank which has an array of Account objects. This class will manage the accounts. It must provide methods Do withdrawal Do deposits...