Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Savings account class java program

16/10/2021 Client: muhammad11 Deadline: 2 Day

Java - Bank Account Program

Java - Bank Account Program

**Disclaimer: This must be unique. I know there are solutions for this already posted on the site, but they fail the originality check tremendously. **

Create a class called BankAccount. The BankAccount class should contain a String to store the customer name and a double to store the account balance. The BankAccount class should have two constructors, as follows:

public BankAccount(String name, double balance)

throws NegativeAmountException

{

// set name and balance

// make sure balance is not negative

// throw exception if balance is negative

}

public BankAccount(String name)

throws NegativeAmountException

{

// set name and use 0 balance

}

As can be seen, the first constructor throws a NegativeAmountException if the balance being used to create the bank account is negative. You will have to create this exception class yourself.

The BankAccount class should also contain methods to make a deposit, make a withdrawal, get the current balance, and print a bank account statement. The interfaces for these methods should appear as follows:

// update balance by adding deposit amount

// make sure deposit amount is not negative

// throw exception if deposit is negative

public void deposit(double amount) throws NegativeAmountException

// update balance by subtracting withdrawal amount

// throw exception if funds are not sufficient

// make sure withdrawal amount is not negative

// throw NegativeAmountException if amount is negative

// throw InsufficientFundsException if balance < amount

public void withdraw(double amount)

throws InsufficientFundsException, NegativeAmountException

// return current balance

public double getBalance()

// print bank statement including customer name

// and current account balance

public void printStatement();

Use the BankAccount class as the superclass for a SavingsAccount class. In addition to the behaviors of a BankAccount, a SavingsAccount also accumulates interest; therefore, the SavingsAccount class contains a double that is populated with the current interest rate. In addition to its constructors (you decide what the constructors should be), the SavingsAccount class should contain the following methods:

// post monthly interest by multiplying current balance

// by current interest rate divided by 12 and then adding

// result to balance by making deposit

public void postInterest()

// print bank statement including customer name

// and current account balance (use printStatement from

// the BankAccount superclass)

// following this also print current interest rate

public void printStatement()

Once these two classes are completed, create a driver class called FinalExam containing a main method that tests the SavingsAccount class. Within the driver test class, create a SavingsAccount object and then use it to make deposits and withdrawals, and to post the monthly interest.

To make the program simpler, you can incorporate the initial data for the Savings Accounts directly in the program (e.g., no need to prompt for the account holder name or starting balance). The only things you need to prompt for are the deposit amount and the withdrawal amount. Also, to simplify the task, the only exceptions that you should handle are the NegativeAmountException and the InsufficientFundsException. If either of these exception conditions occurs, print an appropriate error message and terminate the application. You can simply re-throw any IOExceptions from the main.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Writing Guru
Top Academic Guru
Online Assignment Help
Assignment Hub
Top Grade Tutor
Exam Attempter
Writer Writer Name Offer Chat
Top Writing Guru

ONLINE

Top Writing Guru

I have worked on wide variety of research papers including; Analytical research paper, Argumentative research paper, Interpretative research, experimental research etc.

$23 Chat With Writer
Top Academic Guru

ONLINE

Top Academic Guru

I reckon that I can perfectly carry this project for you! I am a research writer and have been writing academic papers, business reports, plans, literature review, reports and others for the past 1 decade.

$20 Chat With Writer
Online Assignment Help

ONLINE

Online Assignment Help

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$18 Chat With Writer
Assignment Hub

ONLINE

Assignment Hub

I am an elite class writer with more than 6 years of experience as an academic writer. I will provide you the 100 percent original and plagiarism-free content.

$23 Chat With Writer
Top Grade Tutor

ONLINE

Top Grade Tutor

I have written research reports, assignments, thesis, research proposals, and dissertations for different level students and on different subjects.

$19 Chat With Writer
Exam Attempter

ONLINE

Exam Attempter

I have written research reports, assignments, thesis, research proposals, and dissertations for different level students and on different subjects.

$39 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

S43a real property act - Nmr worksheet with answers - Excel module 4 sam end of module project 1 - Four seasons organizational structure - Car rental management system in java - How to make a basic website using notepad - Advantages and disadvantages of virtual circuit packet switching - American History SINCE WAR - Hub and spoke model in supply chain - Penjodoh bilangan jam tangan - Strategic group mapping of banking industry - Assignment part 2 - Essay - Who is bob cratchit - 9/8 muston street mosman - Limiting reagent lab baking soda vinegar answers - King lear this is the excellent foppery of the world - The true luxury global consumer insight - Asset maintenance engineer job description - Evidence for evolution includes all of the following except - Pakenham east precinct structure plan - Market maneuvering among industry rivals - The management of zigby manufacturing prepared - Atomic packing factor of graphite - Dr joseph john cmc ludhiana - Math - Macquarie winton global alpha fund - Bill gates as a transactional leader - Wayfarer mast for sale - Structured observation definition psychology - Assignment - What is at&t mission statement - Nuts and bolts of college writing 2nd edition - El almacén velasco es buenísimo no centro comercial - I need summary for "How Pharmacists Can Help Patients with GERD" - Competitive advantage case study coca-cola - Do civil engineers make a lot of money - Library chamberlain.edu - The invisible gorilla chapter 4 summary - Primary Document Analysis - Versa lite burn brite - Assignment Preparation - Apple ethics and social responsibility - Samsung mdc rs232 protocol - Using superposition find vo in the circuit - What does the matchmaker criticize mulan for - Outliers book analysis - Iec 60364 7 714 - Bygone japanese camera that merged with konica - Eth 321 week 1 alternative dispute resolution - Asme b30 17 pdf - Planet earth pole to pole worksheet - Slide pane in powerpoint 2013 - Practice with taxonomy and classification answers - Mini Research Paper - Ready player one opening scene - Cross functional essay - Ford pinto case study summary - Ids 100 project 2 kwl chart special education - Tip passes city of joondalup - Week 5 MM - 2012 nfpa 99 power strip requirements - Can money buy happiness essay 200 words - Cassowary coast regional council waste management - Pea plant crosses worksheet answers - Security Architecture and Design - What lie did captain beatty tell montag - Words their way derivational relations list - Societies in the world discussion - Patagonia core values - My last duchess poetry foundation - Advance Pharmacology - Disney junior hd fios - Analysis of Ethical Considerations - Assignment 5 - Bock water heater troubleshooting - Turkey Point: More Questions Than Answers? - Characters in eveline by james joyce - Balancing chemical equations using linear algebra - Unit 2 IP PC - Journalize the transactions including explanations - Leadership as a Vocation - 3 types of carburetors - Philosophy paper - Study island progress monitoring - How to read literature like a professor chapter 7 summary - Mr resistor garratt lane - Bli bli soccer club - Adelaide's aria it's my wedding - Nate's classroom has three tables of different lengths - How does the volume occupied by a cubic centimeter - Mcdonalds french fries vegetarian lawsuit - Hno3 aq ba oh 2 aq - General survey nursing assessment example - David peat net worth - How strong are the competitive forces confronting lululemon - Explain the principle of least privilege - Isotopic abundance practice problems with answers - Cleaning company case study - Journal of heart centered therapies