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
adell [148]
3 years ago
6

Charge a $5 penalty if an attempt is made to withdraw more money than available in the account.Here the account string is "S" or

"C". "S" is for savings account. "C" is for checking account. For the deposit or withdraw, it indicates which account is affected. For a transfer it indicates the account from which the money is taken; the money is automatically transferred to the other account.
Business
1 answer:
romanna [79]3 years ago
8 0

Answer:

C++ code is explained below

Explanation:

class Account {

 double balance;

 double add(double sum) {

   balance += sum;

   return sum;  

 }

 double withdraw(double sum) {

   if (sum > balance) {  

     balance -= 5;

     return -5; // this will come in handy in Prob. 6  

   } else {  

     balance -= sum;

     return balance; // Notice: always >= 0 (never < 0)

   }

 }

 double inquire() { return balance; }  

 Account() { balance = 0; }

 Account(double sum) { balance = sum; }

 double interest (double rate) {

   return rate * balance;  

 }

}

_______________________________

class Bank {

 Account checking;

 Account savings;  

 void deposit(double amount, String account) {

   if (account.equals("C")) checking.add(amount);  

   else // my default

     savings.add(amount);  

 }

 void withdraw(double amount, String account) {

   if (account.equals("C")) checking.withdraw(amount);  

   else // my default

     savings.withdraw(amount);  

 }

 void transfer (double amount, String account) {

   if (account.equals("C"))  

     if (checking.withdraw(amount) >= 0)  

       savings.add(amount);  

     else checking.add(5); // somewhat fault-tolerant

   else // default

     if (savings.withdraw(amount) >= 0)  

       checking.add(amount);  

     else savings.add(5);  // no penalty for transfers

 }

 void printBalances() {

   System.out.println(

     "Checking: " + checking.inquire() +

     "\nSavings: " + savings.inquire()

   );  

 }

}

You might be interested in
​a(n) __________ is used to determine the benefits that target customers value and how customers rate the relative value of vari
deff fn [24]

The answer is customer value analysis. This is responsible for providing information in regards with the organization’s way of how they are able to maintain or work well with their competitions and to their customers. This is considered to be important because it provided a basis and comparison with the rivals existing in the organizations.

6 0
3 years ago
Brian is a truck driver who delivers products throughout Massachusetts. His friend Chris is a traffic planner for the same state
DiKsa [7]

Answer:

Assuming that you can only choose one answer, the most suitable one would be (A) Chris designs models to make traffic flow better, which enables Brian to get to his company’s warehouse faster.

Explanation:

This answer is correct because Chris is a traffic planner – thus he merely designs the traffic flow, he does not create it, thus making answer (D) incorrect. Though (B) is true, it doesn’t relate to Chris’ career, making it false as well. As for (C), the answer is not correct because Chris doesn’t design the maps of the state, he only designs the traffic flow.

6 0
2 years ago
Read 2 more answers
Time, energy, and money are examples of:
KengaRu [80]

Answer:

Flexible resources

Explanation:

Flexible resources are defined as those that can be utilised under different categories of resource groups.

They are able to serve multiple functions.

For example money can be used for different activities like production of goods, training of staff, purchase of raw materials, and so on.

Time can be allocated to different endeavours.

Same applies to energy. It can be focused on pursuing various objectives

8 0
2 years ago
Bellingham Company produces a product that requires 2.3 standard pounds per unit. The standard price is $3.45 per pound. 15,700
Andru [333]

Answer:

A) Price       7,080     U

B) Quantity 4,630.5  U

C) Total        11.710,5‬ U

Explanation:

DIRECT MATERIALS VARIANCES

(standard\:cost-actual\:cost) \times actual \: quantity= DM \: price \: variance

std cost  $3.45

actual cost  $3.65

quantity 35,400

difference  $(0.20)

(0.2) \times 35,400 = DM \: price \: variance

price variance  $(7,080.00)

(standard\:quantity-actual\:quantity) \times standard \: cost = DM \: quantity \: variance

std quantity 36110.00

actual quantity 35400.00

std cost  $3.45

difference 710.00

(710) \times 3.45 = DM \: quantity \: variance

quantity variance  $2,449.50

Total Variance: 2,449.5 - 7,080 = -4.630,5‬

8 0
3 years ago
Maizie files a suit against NuProducts, Inc. NuProducts responds that even if Maizie's statement of the facts is true, according
ycow [4]

Answer: 3. a motion to dismiss.

Explanation:

When a party believes that a case has no legal basis, in other words the party does not believe that what they did warrants a court case, they would file a motion to dismiss so as not to waste resources fighting something they see as frivolous.

In this case, NuProducts is essentially filing a motion to dismiss when they say that they did nothing wrong according to the law. They would prefer if the courts simply dismissed the case so that they would not incur costs to fight the case.

4 0
3 years ago
Other questions:
  • As a financial advisor, what will you tell your client, Ryan, he should be willing to pay for an investment property that he pla
    7·1 answer
  • "books are the best of things, well used; abused, among the worst. what is the right use? what is the one end which all means go
    12·1 answer
  • The stockholders equity section of Martino Inc. at the beginning of the current year appears below.Common stock, $10 par value,
    15·1 answer
  • For many​ years, the International Nickel Company of Canadathe International Nickel Company of Canada essentially operated as a
    6·1 answer
  • The balance of an account is determined by
    10·1 answer
  • Please select whether below is true or false?
    9·1 answer
  • ​Apple has made a success from anticipating what consumers would want in new technological advances, convenience, and ease of us
    12·1 answer
  • If income increases by $100 and consumption increases by $75, the slope of the consumption function equals _____.
    8·1 answer
  • You have bad credit and they tell you that they can give you a loan on the $15,000
    11·1 answer
  • if the insured must rent a car because his was stolen, what is the maximum dollar amount of coverage available under the commerc
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!