Reference no: EM1367777
Create an inheritance hierarchy containing base class Account and derived classes SavingsAccount and CheckingAccount that inherit from class Account. Make sure all fields, methods, and parameters are declared abstract, final, public, private, protected where appropriate.
Base class Account should include one data member of type double to represent the account balance. The class should provide aa constructor that receives an initial balance and uses it to initialize the data member. The constructor should validate the initial balance to ensure that it is greater than or equal to 0.0. If not, the balance should be set to 0.0 and the constructor should display an error message, indicating that the initial balance was invalid.
The class should provide several methods. Method credit should add an amount to the current balance. Method debit should withdraw money from the account and ensure that the debit amount does not exceed the account's balance. If it does, the balance should be left unchanged and the function should print an error message. Method getBalance should return the current balance.
Derived class SavingsAccount should inherit the funcionality of an Account, but also inclute a data member of type double indicating the yearly interest rate (percentage) assigned to the account. SavingsAccount's constructor should receive the initial balance, as well as an initial value for the SavingsAccount's interest rate. SavingsAccount should provide a method applyInterest that applies the interest rate of the account to its balance, increasing the balance.
Derived class CheckingAccount should inherit from base class Account and include an additional data member of type double that represents the fee charged per transaction. Its constructor should receive the initial balance, as well as a parameter indicating the fee. The credit and debit methods should be redefined to subtract the fee from the account balance whenever either transaction is performed successfully. Note that you must not duplicate code.
Remember to test your code extensively before submitting. Submit the three .java files containing the above classes.
Asset market model and exchange rates.
: Suppose the spot exchange rate in dollars and yen is e=$1/100yen. The interest rate on a 6 months dollar denominated assets is i($)=1 percent and interest rate on comparable 6 months yen denominated assets
|
Economics-decision making in multi-national firms
: Can you articulate how macroeconomics and microeconomics come into play in the context of firm decision-making in a global business. Please provide an example.
|
Understanding of transcultural concepts
: What unique features of families require an understanding of transcultural concepts? Describe factors the nurse will require to consider when planning culturally appropriate nursing care.
|
Underestimating actual costs
: Assume the military bureaucracy consistently misinforms Congress on total costs of producing military hardware. Suppose that it underestimates the actual costs and that the political representatives believe these estimates.
|
Create inheritance hierarchy containing base class
: Create an inheritance hierarchy containing base class Account and derived classes SavingsAccount and CheckingAccount that inherit from class Account.
|
Important information regarding nursing research
: According to Polit and Beck (2006), nurses in different settings are adopting a research-based (or evidence-based) practice which incorporates research findings into their decisions and interaction with clients.
|
Determinants of demand or supply
: Identify which of the determinants of demand or supply are affected and also indicate whether demand or supply increases or decreases.
|
Optimal price and output combination
: Assume an airline flying on the New York - Chicago route has estimated the demand curves for three different types of customers: business (no advance purchase), leisure (7 day advance purchase), and discount (14 day advance purchase) travelers.
|
Determine the value of the spot rate
: Assume that on January 1, 1999 spot exchange rate was Yen/£=198. Over the year, British inflation rate was 4 percent, and the Japanese inflation rate was 6 percent.
|