Examlex

Solved

Create a Class Named Account That Contains an Integer Field

question 64

Essay

Create a class named Account that contains an integer field for an account number and a double field for an account balance. The class contains a constructor that requires an account number and sets the balance to 0.0. Include a set() method for the balance, a get() method for the account number, and a get() method for the account balance. Create two subclasses named Checking and Savings. Within the Checking class, the get() method should display the String "Checking Account Information", the account number, and the balance. Within the Savings class, add a field to hold the interest rate, and require the Savings constructor to accept an argument for the value of the interest rate. The Savings get() method displays the String "Savings Account Information", the account number, the balance, and the interest.


Definitions:

Ending Retained Earnings

This is the total amount of net income left over for a company after it has paid out dividends to its shareholders, shown at the end of a financial period.

Net Income

The earnings a company has left after subtracting all costs, taxes, and expenses from its overall revenue.

Adjusting Entry

A journal entry made at the end of an accounting period to record revenue or expenses in the period they occur rather than when cash is received or paid.

Unearned Subscription Revenue

Refers to the money received for services or products that have not yet been delivered or performed, often recognized as a liability on the balance sheet.

Related Questions