answer.
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
riadik2000 [5.3K]
1 year ago
8

Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the

customer's loan balance each month until the loan is paid off. b. Modify the Bob's E-Z Loans application so that after the payment is made each month, a finance charge of 1 percent is added to the balance.

Computers and Technology
1 answer:
zmey [24]1 year ago
4 0

Answer:

part (a).

The program in cpp is given below.

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   //variables to hold balance and monthly payment amounts

   double balance;

   double payment;

   //user enters balance and monthly payment amounts

   std::cout << "Welcome to Bob's E-Z Loans application!" << std::endl;

   std::cout << "Enter the balance amount: ";

   cin>>balance;

   std::cout << "Enter the monthly payment: ";

   cin>>payment;

   std::cout << "Loan balance: " <<" "<< "Monthly payment: "<< std::endl;

   //balance amount and monthly payment computed

   while(balance>0)

   {

       if(balance<payment)    

         { payment = balance;}

       else

       {  

           std::cout << balance <<"\t\t\t"<< payment << std::endl;

           balance = balance - payment;

       }

   }

   return 0;

}

part (b).

The modified program from part (a), is given below.

#include <stdio.h>

#include <iostream>

using namespace std;

int main()

{

   //variables to hold balance and monthly payment amounts

   double balance;

   double payment;

   double charge=0.01;

   //user enters balance and monthly payment amounts

   std::cout << "Welcome to Bob's E-Z Loans application!" << std::endl;

   std::cout << "Enter the balance amount: ";

   cin>>balance;

   std::cout << "Enter the monthly payment: ";

   cin>>payment;

   balance = balance +( balance*charge );

   std::cout << "Loan balance with 1% finance charge: " <<" "<< "Monthly payment: "<< std::endl;

   //balance amount and monthly payment computed

   while(balance>payment)

   {

           std::cout << balance <<"\t\t\t\t\t"<< payment << std::endl;

           balance = balance +( balance*charge );

           balance = balance - payment;

       }

   if(balance<payment)    

         { payment = balance;}          

   std::cout << balance <<"\t\t\t\t\t"<< payment << std::endl;

   return 0;

}

Explanation:

1. The variables to hold the loan balance and the monthly payment are declared as double.

2. The program asks the user to enter the loan balance and monthly payment respectively which are stored in the declared variables.  

3. Inside a while loop, the loan balance and monthly payment for each month is computed with and without finance charges in part (a) and part (b) respectively.

4. The computed values are displayed for each month till the loan balance becomes zero.

5. The output for both part (a) and part (b) are attached as images.

You might be interested in
10. (P37) Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently lon
MissTica

Answer:

see explaination

Explanation:

For GBN:

A sends will 9 segments in total. These are initially sent segments 1, 2, 3, 4, 5 and later re-sent segments 2, 3, 4, and 5.

B will send 8 ACKs. They are 4 ACKS with sequence number 1, and 4 ACKS withsequence numbers 2, 3, 4, and 5.

For SR:

A sends 6 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later re-sent segments 2. B sends 5 ACKs. They are 4 ACKS with sequence number 1, 3, 4, 5. And there is oneACK with sequence number 2.

For TCP:

A sends 6 segments in total. They are initially sent segments 1, 2, 3, 4, 5 and later re-sent segments 2. B sends 5 ACKs. They are 4 ACKS with sequence number 2. There is one ACK withsequence numbers 6.

Let it be observed that TCP always send an ACK with expected sequencenumber.

b). TCP. This is because TCP uses fast retransmit without waiting until time out.

8 0
1 year ago
Identify the articulation site that allows us to nod our head ""yes"".
Luden [163]

Answer:

Occipital bone-atlas

Explanation:

The occipital bone is a bone that covers the back of your head; an area called the occiput. The occipital bone is the only bone in your head that connects with your cervical spine (neck).  The occipital bone surrounds a large opening known as the foramen magnum.

The foramen magnum allows key nerves and vascular structures passage between the brain and spine. Namely, it is what the spinal cord passes through to enter the skull. The brainstem also passes through this opening.

The foramen magnum also allows 2 key blood vessels traversing through the cervical spine, called the vertebral arteries, to enter the inner skull and supply blood to the brain

8 0
2 years ago
Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
Kipish [7]

Answer:

code = 010100000001101000101

Explanation:

Steps:

The inequality yields 2^{k} - 1 > = M+K, where M = 16. Therefore,

The second step will be to arrange the data bits and check the bits. This will be as follows:

Bit position              number              Check bits            Data Bits

21                                   10101

20                                  10100

The bits are checked up to bit position 1

Thus, the code is 010100000001101000101

3 0
2 years ago
Read 2 more answers
Which collaboration technology is becoming more and more popular within organizations because it provides a means for forming ad
Leona [35]

Answer:

d) Social networking sites

Explanation:

-Intranet is a network that is created by an organization to share information, tools and different services inside the company.

-Wikis are websites used to share content and knowledge and different users can modify the information.

-VoIP is a technology that allows you to make calls over the internet.

-Social networking sites are online platforms that allow people to connect with organizations and other people, create communities online and share different types of information.

-Unified communications is a system that has different communication methods through a single application.

According to this, the collaboration technology that is becoming more and more popular within organizations because it provides a means for forming ad hoc groups, networking and locating potential business allies is social networking sites.

8 0
1 year ago
A student who used a regression model that included indicator variables was upset when receiving only the following output on th
jeka57 [31]

Answer:

This is a multicolinearity problem and the student should determine the variable(s) that cause(s) the problem and remove it.

Explanation:

This information means that there exists a linear combination between the independent variables. The problem might have developed due to multicolinearity producing almost perfectly linearly dependent columns.

This could also be as a results of single matrix created when the student use an incorrect indicator variables and included an additional indicator column which created linearly dependent columns.

4 0
1 year ago
Other questions:
  • A slide contains three text boxes and three images that correspond to the text boxes. Which option can you use to display a text
    5·2 answers
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    7·1 answer
  • Write a program that computes and prints the average of the numbers in a text file. You should make use of two higher-order func
    9·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • You can deal with gaps in an PHP array in all but one of the following ways. Which one is it? a. Use the array_values() function
    14·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • In this question, you will experimentally verify the sensitivity of using a precise Pi to the accuracy of computing area. You ne
    14·1 answer
  • If Maya wants to access a view that would control multiple slides within a presentation, which view should she utilize? Master v
    9·1 answer
  • 4. Why does Hancock believe that our communication online is more honest than we might<br> expect?
    15·2 answers
  • A homeowner uses a smart assistant to set the house alarm, get packages delivery updates, and set time on the outdoor lights. Wh
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!