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
Types of bonds
aliina [53]

Answer: 1. A . Treasury bonds are not completely riskless, since their prices will decline when interest rates rise.

2. A. The New York City government

3. B. Municipal bonds

4. A. An investor from Kansas that invests in a municipal bond issued by the State of Kansas will pay neither state nor federal taxes on the bond’s coupon payments

5. B. Treasury bonds

Explanation:

1. Treasury Bonds are known as the safest bonds in the world and so are generally considered risk-less. However this is not so as they still fall victim to Interest rate risk which is the risk that their prices will decline when interest rates rise because bond prices are inversely related to price.

2. The City of New York issued to bonds in question so it is a New York City Government bond.

3. Municipal Bonds are issued by a state, county or a municipality so the above is a Municipal bond as it was issued by the City of New York.

4. Municipal Bonds attract no Federal taxes and when buying a Municipal bond as a resident of the Municipality you are in, you will.not get charged the Municipal taxes either on the bond coupon payments.

5. Default risk is the risk that the issuer will not pay back. US Treasury Bonds are known as the safest in the world and have not been defaulted on in over a century. They therefore have the lowest default risk.

6 0
3 years ago
Big Dom’s Pawn Shop charges an interest rate of 27.5 percent per month on loans to its customers. Like all lenders, Big Dom must
lidiya [134]

Answer:

APR is 330% and EAR is 1745.53%

Explanation:

Given:

Monthly interest rate = 27.5%

APR or annual percentage rate = 27.5×12 = 330%

So, Big Dom should report an APR of 330% to customers.

EAR or effective annual rate = (1+\frac{APR}{m}) ^{m}-1

Here,

APR is 330% and m is 12

330÷12 = 27.5%

substituting the value in the above formula:

EAR = 1.275^{12}-1

        = 17.4553 or 1745.53%

3 0
3 years ago
Primera Company produces two products and uses a predetermined overhead rate to apply overhead. Primera currently applies overhe
pychu [463]

Answer:

Primera Company

1. Plantwide predetermined overhead rate:

= $1,536,000/768,000

= $2.00 per direct labor hour

Overhead assigned to each product:

                                   Product 1    Product 2

Direct labor hours     480,000        147,200

Predetermined overhead

 rate  = $2 per direct labor hour

Total overhead =    $960,000    $294,400

2. Predetermined departmental overhead rates:

Department 1:    

Direct labor hours $2 ($1,536,000/768,000)

Department 2

Machine hours = $7.385 ($1,536,000/208,000)

Overhead assigned:

Product 1 = $960,000 (480,000 * $2)

Product 2 = $70,896 (9,600 * $7.385)

3. The applied overhead for the year:

Department 1 = $1,254,400 (627,200 * $2)

Department 2 = $1,512,448 (204,800 * $7.385)

Total   =            $2,766,848

Overapplied overhead for the firm = $1,134,848 ($2,766,848 - $1,632,000)

4. Debit Manufacturing overhead $1,134,848

Credit Cost of goods sold $1,134,848

To transfer the overapplied overhead to cost of goods sold.

Additional information needed if the variance is material is to determine the percentages to allocated to Work in process, Finished Goods, and Cost of Goods Sold.

Explanation:

a) Data and Calculations:

Estimates:

                            Department 1   Department 2      Total  

Direct labor hours    640,000            128,000        768,000

Machine hours            16,000            192,000        208,000

Overhead cost       $384,000       $1,152,000    $1,536,000

Actual results:

                            Department 1   Department 2      Total  

Direct labor hours     627,200             134,400       761,600

Machine hours             17,600            204,800      222,400

Overhead cost       $400,000       $1,232,000  $1,632,000

                       Product 1 Product 2        Total  

Direct labor hours:

Department 1 480,000    147,200      627,200

Department 2  96,000     38,400       134,400

Machine hours:

Department 1    8,000        9,600         17,600

Department 2 24,800    180,000      204,800

3 0
3 years ago
A market economy is regulated between two things?
sleet_krkn [62]
Producers and Consumers
4 0
3 years ago
The goal in a command economy is economic __________.
tankabanditka [31]
The correct answer is Equality
7 0
3 years ago
Other questions:
  • Portia Grant is an employee who is paid monthly. For the month of January of the current year, she earned a total of 8,888. The
    11·2 answers
  • Select the items that describe what is most likely to happen when the Federal Reserve decreases the money supply.
    9·1 answer
  • In situations where rivals can readily copy the successful features of a company's strategy or duplicate its attempts to attract
    15·1 answer
  • On October 10, Joleen Vora applied for a $50,000 life insurance policy with Magnum Life Insurance Co. She named her husband, Jay
    15·1 answer
  • All purchases are paid for as follows: a. 10% in the month of purchase, b. 40% in the following month, and c. 50% two months aft
    10·1 answer
  • The current ratio is calculated as total current assets divided by total current liabilities.
    13·1 answer
  • Mike deposited $100,000 in a bank and procured a certificate of deposit on it, payable to himself, for repayment in five years w
    12·1 answer
  • The Jackson-Timberlake Wardrobe Co. just paid a dividend of $1.05 per share on its stock. The dividends are expected to grow at
    9·1 answer
  • XYZ Co. manufactures bicycles. Demand for this year’s model is expected to occur at a constant annual rate of 9200 items. One bi
    6·2 answers
  • To create and capture customer value, companies must engage the first step of the marketing process, which is __________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!