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:

Histogram

This is a graphical representation of data using bars of different heights where each bar groups numbers into ranges.

Unimodal

Describing a distribution with a single peak or mode, representing the most frequently occurring value.

Empirical Rules

A set of guidelines that indicate how the data are spread in a normal distribution, specifically stating that approximately 68%, 95%, and 99.7% of the data fall within one, two, and three standard deviations from the mean, respectively.

Standard Deviations

A measure of the amount of variation or dispersion of a set of values, indicating how much the values differ from the mean.

Related Questions