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

Bank account program in java using constructors

20/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:

Fatimah Syeda
Engineering Mentor
A+GRADE HELPER
Calculation Master
Top Writing Guru
Professor Smith
Writer Writer Name Offer Chat
Fatimah Syeda

ONLINE

Fatimah Syeda

As an experienced writer, I have extensive experience in business writing, report writing, business profile writing, writing business reports and business plans for my clients.

$18 Chat With Writer
Engineering Mentor

ONLINE

Engineering Mentor

I have read your project details and I can provide you QUALITY WORK within your given timeline and budget.

$47 Chat With Writer
A+GRADE HELPER

ONLINE

A+GRADE HELPER

I am an academic and research writer with having an MBA degree in business and finance. I have written many business reports on several topics and am well aware of all academic referencing styles.

$49 Chat With Writer
Calculation Master

ONLINE

Calculation Master

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$24 Chat With Writer
Top Writing Guru

ONLINE

Top Writing Guru

I am an experienced researcher here with master education. After reading your posting, I feel, you need an expert research writer to complete your project.Thank You

$32 Chat With Writer
Professor Smith

ONLINE

Professor Smith

I will be delighted to work on your project. As an experienced writer, I can provide you top quality, well researched, concise and error-free work within your provided deadline at very reasonable prices.

$22 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

Intrinsic and extrinsic motivation questionnaire for students - Principle of moments class 11 - Strategic management case study with questions and answers pdf - Assignment on robert frost - Sequence diagram return object - Dr jekyll and mr hyde chapter 1 summary - Op - Ge supra lockbox forgot code - Attention getter for breastfeeding speech - Label the digestive system worksheet answers - Personal philosophy of success essay examples - Disadvantages of system analysis and design - Assignment - How many vowels does a trumpet have - Flps homework - Aluminum sulfite molar mass - A loving partner is a safe sheltera loving partner is a safe shelter - Words that describe matter - How to create a family pedigree - What is the square root of 526 - 737 800 startup procedure - Write a program that scores a blackjack hand - Atkins and murphy model of reflection examples - Cinderella man last fight - Ib chemistry topic 9 - Human growth discussion - Athlean x program pdf download - Bigger biceps athlean x - Four layer bandage system - World language research foundation - Moat farm junior school - Do a checkout chore crossword clue - InfoTech Import Strategy in Plan- Week 4 - Vicmap topographic maps online - Documentation for below Question - Solver white paint colours - Postings are made daily to subsidiary ledgers so that: - NURSING: EVIDENCED-BASED PRACTICE PROJECT - Statistics - AMP 2 - Offer in business law ppt - Motivation for sentiment analysis - Devon bishop age 45 is single - Wireshark lab ethernet and arp - Vcaa music group performance list - Fisher 2004 ib psychology - Python-Assignment 1 - Help with Assignment - Flags waving character map - How to draw a crime scene sketch - Write an article - Red flags in financial statement analysis pdf - Letters from the inside tracey - Wk 5, HCS 335: DR 2 - Interest Arbitration - How far will you travel worksheet - Siemens ts31 test set manual - Arrange the following compounds in order of decreasing acidity - Mobile charging using coin - Author of the alchemist crossword clue - What does the luna moth symbolize in literature - Bhavika investments a group of financial advisors - Vce physics extended practical investigation ideas - Conveyor belt project part 5 answers - Relative extrema on a graph - Stem Cell. - Toyota business level strategy analysis - Healthy and unhealthy food speech - Retroviral Integration - Week # 12 Discussion NURSING LEADERSHIP & MANAGEMENT - W1 on activity statement - The mainstream view is that macro instability is caused by - Code of conduct and ethics nsw police - Two cars emerge side by side from a tunnel - Back titration caco3 hcl naoh - Mana 4322 test bank - Why do you need supporting materials in your speeches - Tst 102 sraw test plan - Answer reading questions. - Internet systems development software technologies - Final business plan - Why were the events at dunkirk memorable in military history - What departmentalization bases are likely being used at hp - Community addiction team glasgow - Lpab exam time table - Physiology SA help needed - Darshanam deva devasya darshanam papanasam - Capstone make up work 1 - Assignment - Nursing - Memory assingment - 2d shapes stage 1 - Australian curriculum civics and citizenship - +971561686603 Abortion pills in Dubai/Abu Dhabi-mifepristone & misoprostol in DUBAI - 4 bit synchronous up down counter using t flip flops - Combustion of hydrazine equation - Hardangervidda nature centre norway - Which of the following statements regarding standard test marketing is correct? - The sheik and the slave nicola italia read online - Importance of partnership working with other professionals