Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java 8.0 The Cash class. The Cash class represents an account that deals in money. The Cash class will have a balance, an interest

In Java 8.0

The Cash class. The Cash class represents an account that deals in money. The Cash class will have a balance, an interest rate, and a record of the amount of interest earned. The class should have the following methods.

  1. getBalance: takes no input and returns a double that is the current balance in the account.

  2. getInterestRate: takes no input and returns a double that is the interest rate.

  3. setInterestRate: takes a double as input and returns nothing. Changes the interest rate.

  4. transfer: takes a double as input and returns nothing. Reduces the current balance by the input amount.

  5. getInterestEarned: takes no input and returns a double that is the amount of interest accrued this month.

  6. processDay: takes no input and returns nothing. If the account balance is positive, multiplies the balance by the interest rate (divided by 365) and adds the amount to the current monthly interest.

  7. processMonth: takes no input and returns nothing. Adds the current monthly interest to the balance and sets the current monthly interest to zero.

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago