1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
xeze [42]
3 years ago
5

Assume the existence of a BankAccount class. Define a derived class, SavingsAccount that contains two instance variables: the fi

rst a double, named interestRate, and the second an integer named interestType. The value of the interestType variable can be 1 for simple interest and 2 for compound interest. There is also a constructor that accepts two parameters: a double that is used to initialize the interestRate variable, and a string that you may assume will contain either "Simple", or "Compound", and which should be used to initialize the interestType variable appropriately. There should also be a pair of functions getInterestRate and getInterestType that return the values of the corresponding data members (as double and int respectively).
Computers and Technology
1 answer:
Fynjy0 [20]3 years ago
8 0

Answer:

Class SavingsAccount : public BankAccount

{

double interestRate;

int interestType;

public SavingsAccount(double interestRate, string interestType)

{

this.interestRate=interestRate;

if(interestType=="Simple")

this.interestType=1;

else if(interestType=="Compound")

this.interestType=2;

}

public double getInterestRate()

{

return this.interestRate;

}

public int getInterestType()

{

return this.interestType;

}

}

Explanation:

You might be interested in
Please tell fast plzzzzzzzzzzz.​
kumpel [21]

Answer:

9

Explanation:

1×2^3+0+0+1×2^0

8+1=9

6 0
3 years ago
How will you identify a file type on your computer?
Andru [333]

You use the extension on the end of the file to tell you the type of a file

The extension is the .whatever in the name of the file

5 0
3 years ago
An output device is any device that displays, prints, or plays content stored on a computer. from the list below, identify the d
inysia [295]
Answer is C = Speaker

How? as the speaker is the only item on the list that displays any type of content, that being audio, it's the only feasible answer to this question.
3 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Pepsi [2]

Answer:

the diaphragm

hope it helps

6 0
3 years ago
Read 2 more answers
How are people that have a lot of points and Brainliests still be only "Ambitious"? Here's an example:
Fiesta28 [93]

Answer:

some times brailny just a wile to update them selves due to all the people on it

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Suggest two other subtasks that may be performed in a dice game?
    15·2 answers
  • Do most facebook and twitter users access the platform from their personal computers?
    6·2 answers
  • A retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales exceed 125% or
    5·1 answer
  • If your vehicle catches fire while you are driving, you should:
    5·2 answers
  • (Financial application: compound value) Suppose you save $100 each month into a savings account with the annual interest rate 5%
    8·1 answer
  • jeff wants to create a website with interactive and dynamic content. Which programming language will he use?
    11·2 answers
  • You are trying to log in to your old computer, and can't remember the password. You sit for hours making random guesses... I'm s
    10·1 answer
  • As technology advances, does technology become more of less complex?
    14·1 answer
  • 2. What is the name for an action performed by the VR Robot?
    7·2 answers
  • For each obstacle, select the best solution. failing to find other members for a club: failing a class: failing to get the credi
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!