Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You shall define a Customer class: nce Room . A customer has a first name, last name, and social security number. The social security number
You shall define a Customer class: nce Room . A customer has a first name, last name, and social security number. The social security number is a String variable and must comply with this format: XXX-XX-Xxxx where 'x' is a digit between 0-9. If a customer is supplied with an invalid SSN, a message must be printed stating SSN of the customer is invalid: however, the account still is created. You shall define a Bank Account class. A BankAccount has a customer account number, and a balance. . For each bank account, a 10 digit random account number must be created. Bank account shall define the following: o deposit o withdraw o applyinterest Every time there is a deposit or withdrawal, the amount and current balance should be displayed. One cannot withdraw more than the funds available in the account. You shall define two types of bank accounts: CheckingAccount and SavingAccount. Each account accrues interest. A saving account accrues 5% fixed interest and a checking account accrues 2% for any amount in excess of $10000 (For example, if there is $11000 in the checking account, the interest is only applied to $1000). You shall define the Bank Main class that defines the main method. You can use the "main" method shown below to test your application. The expected output is also provided. public class Bank Main public static void main(String[] args) { Checking Account acct 1 = new CheckingAccount'Alin Parker" "123-45-6789" 1000.0ft: CheckingAccount acct2-new CheckingAccount("Mary Jones 987-654321.500.0f): Soving Account acct3new SavingAccount("John", "Smith, 1233-45-6789.2000f): acti deposit(22000.con acct2.deposit(12000.00f): cocti withdraw[2000.00f): acct withdraw(1000 con: occt1.applyinterest(); acct 2 applyinterest: acct 1 checkBalance: dcct2.checkBoloncel); acct1.withdraw(30000.00 Type here to search
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started