Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My previous java code import java.util.Scanner; public class Main { // testing main method public static void main(String[] args) { // create an instance for

image text in transcribed

image text in transcribed

image text in transcribed

My previous java code

import java.util.Scanner; public class Main { // testing main method public static void main(String[] args) { // create an instance for Scanner to take inputs from user Scanner input=new Scanner(System.in); // read initialDeposit as input from user System.out.print("Enter initial deposit: "); double initialDeposit=input.nextInt(); // create a random account number int accountNumber=((int)(Math.random()*100)); double interestRate=0.0; // calculate interestRate if(initialDeposit Let's update our program from last week (bankAccountSelection.java), updates include: (1) Get customer first and last name for customer (refer to section 4.4.5) (2) Get input for what type of account: SAVINGS or CHECKING, if a customer chooses to open a Checking account they must open a Savings account with a minimum deposit of $100 (refer to section 4.4.7 Comparing Strings) (3) Generate account numbers using the Math random() method (refer to section 4.2.5) (4) Compute which account has the maximum initial deposit (refer to section 4.2.4) (5) Determine which account has the most amount deposited to it (refer to section 4.2.4) (4) format output (refer to section 4.6) Pseudocode Problem Description: Write a program that opens a Customer Bank Account(s) and then outputs a formatted (Section 4.6) representation of the Customer's Banking Accounts Information. A customer must open a SAVINGS account if they wish to open a CHECKING Account. Minimum deposit in savings must be $100.01. get input for: name (first and last), type of account they want to open (Checking or Savings), initial deposit. use the Math.random() method to generate the bank Account number(s) (refer to section 4.2.5) set the interestRate based on the initial deposit for Savings account ONLY: 0-$100 (inclusive) ->inital deposit must be over $100.00; $100.01 - $500 (inclusive) -> interest rate = .035; $500.01 - $1000 (inclusive) -> interest rate = .045; $100.01 - $500 (inclusive) -> interest rate = .035; $500.01 - $1000 (inclusive) -> interest rate = .045; anything over $1000.00 -> interest rate = .05. Math max() method (section 4.2.4): Determine which account Checking or Savings) has the highest initial deposit. Output all the account information: name (format to all CAPS - reference table 4.7), account number, type of account Checking/Savings), initial deposit and a calculation of future balance in 1 year for the Savings account ONLY. Display the account name that has the higher balance (i.e. use the Math max() method). Example Output: Name: TERRAIN, HERCULES Acct: 1234 Checking Acct: 5678 Savings Estimated Savings balance in 1 Year deposit: $400.00 deposit: $150.00 $226.66 Checking account has the higher initial deposit: Example Output2: Name: THRICE, TRINITY Acct: 0 Acct: 8765 Savings Estimated Savings balance in 1 Year deposit: $0.00 deposit: $150.00 $156.00 deposit: $0.00 deposit: $150.00 $156.00 Savings account has the higher initial deposit: Example Output3: no accounts opened - initial deposit requirements not met. Flow Chart TO G NEW FOT PETE anil Det 1000 wa Dar PRETUT POLATIES DICAS Och GED TOTRICT PORTE DRAAI DEFINE Let's update our program from last week (bankAccountSelection.java), updates include: (1) Get customer first and last name for customer (refer to section 4.4.5) (2) Get input for what type of account: SAVINGS or CHECKING, if a customer chooses to open a Checking account they must open a Savings account with a minimum deposit of $100 (refer to section 4.4.7 Comparing Strings) (3) Generate account numbers using the Math random() method (refer to section 4.2.5) (4) Compute which account has the maximum initial deposit (refer to section 4.2.4) (5) Determine which account has the most amount deposited to it (refer to section 4.2.4) (4) format output (refer to section 4.6) Pseudocode Problem Description: Write a program that opens a Customer Bank Account(s) and then outputs a formatted (Section 4.6) representation of the Customer's Banking Accounts Information. A customer must open a SAVINGS account if they wish to open a CHECKING Account. Minimum deposit in savings must be $100.01. get input for: name (first and last), type of account they want to open (Checking or Savings), initial deposit. use the Math.random() method to generate the bank Account number(s) (refer to section 4.2.5) set the interestRate based on the initial deposit for Savings account ONLY: 0-$100 (inclusive) ->inital deposit must be over $100.00; $100.01 - $500 (inclusive) -> interest rate = .035; $500.01 - $1000 (inclusive) -> interest rate = .045; $100.01 - $500 (inclusive) -> interest rate = .035; $500.01 - $1000 (inclusive) -> interest rate = .045; anything over $1000.00 -> interest rate = .05. Math max() method (section 4.2.4): Determine which account Checking or Savings) has the highest initial deposit. Output all the account information: name (format to all CAPS - reference table 4.7), account number, type of account Checking/Savings), initial deposit and a calculation of future balance in 1 year for the Savings account ONLY. Display the account name that has the higher balance (i.e. use the Math max() method). Example Output: Name: TERRAIN, HERCULES Acct: 1234 Checking Acct: 5678 Savings Estimated Savings balance in 1 Year deposit: $400.00 deposit: $150.00 $226.66 Checking account has the higher initial deposit: Example Output2: Name: THRICE, TRINITY Acct: 0 Acct: 8765 Savings Estimated Savings balance in 1 Year deposit: $0.00 deposit: $150.00 $156.00 deposit: $0.00 deposit: $150.00 $156.00 Savings account has the higher initial deposit: Example Output3: no accounts opened - initial deposit requirements not met. Flow Chart TO G NEW FOT PETE anil Det 1000 wa Dar PRETUT POLATIES DICAS Och GED TOTRICT PORTE DRAAI DEFINE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago