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.

Answers

Answer 1

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.

Design An Application For Bob's E-Z Loans. The Application Accepts A Client's Loan Amount And Monthly
Design An Application For Bob's E-Z Loans. The Application Accepts A Client's Loan Amount And Monthly

Related Questions

For dinner, a restaurant allows you to choose either Menu Option A: five appetizers and three main dishes or Menu Option B: three appetizers and four main dishes. There are six kinds of appetizer on the menu and five kinds of main dish.

How many ways are there to select your menu, if...

a. You may not select the same kind of appetizer or main dish more than once.
b. You may select the same kind of appetizer and/or main dish more than once.
c. You may select the same kind of appetizer or main dish more than once, but not for all your choices, For example in Menu Option A, it would be OK to select four portions of 'oysters' and one portion of 'pot stickers', but not to select all five portions of 'oysters'.)

In each case show which formula or method you used to derive the result.

Answers

Answer:

The formula used in this question is called the probability of combinations or combination formula.

Explanation:

Solution

Given that:

Formula applied is stated as follows:

nCr = no of ways to choose r objects from n objects

  = n!/(r!*(n-r)!)

The Data given :

Menu A : 5 appetizers and 3 main dishes

Menu B : 3 appetizers and 4 main dishes

Total appetizers - 6

Total main dishes - 5

Now,

Part A :

Total ways = No of ways to select menu A + no of ways to select menu B

          = (no of ways to select appetizers in A)*(no of ways to select main dish in A) + (no of ways to select appetizers in B)*(no of ways to select main dish in B)

          = 6C5*5C3 + 6C3*5C4

          = 6*10 + 20*5

          = 160

Part B :

Since, we can select the same number of appetizers/main dish again so the number of ways to select appetizers/main dishes will be = (total appetizers/main dishes)^(no of appetizers/main dishes to be selected)

Total ways = No of ways to select menu A + no of ways to select menu B  

          = (no of ways to select appetizers in A)*(no of ways to select main dish in A) + (no of ways to select appetizers in B)*(no of ways to select main dish in B)

          = (6^5)*(5^3) + (6^3)*(5^4)

          = 7776*125 + 216*625

          = 1107000

Part C :

No of ways to select same appetizers and main dish for all the options

= No of ways to select menu A + no of ways to select menu B  

= (no of ways to select appetizers in A)*(no of ways to select main dish in A) + (no of ways to select appetizers in B)*(no of ways to select main dish in B)

=(6*5) + (6*5)

= 60

Total ways = Part B - (same appetizers and main dish selected)      

= 1107000 - 60

= 1106940

This represents a group of Book values as a list (named books). We can then dig through this list for useful information and calculations by calling the methods we're going to implement. class Library: Define the Library class. • def __init__(self): Library constructor. Create the only instance variable, a list named books, and initialize it to an empty list. This means that we can only create an empty Library and then add items to it later on.

Answers

Answer:

class Library:      def __init__(self):        self.books = [] lib1 = Library()lib1.books.append("Biology") lib1.books.append("Python Programming Cookbook")

Explanation:

The solution code is written in Python 3.

Firstly, we can create a Library class with one constructor (Line 2). This constructor won't take any input parameter value. There is only one instance variable, books, in the class (Line 3). This instance variable is an empty list.

To test our class, we can create an object lib1 (Line 5).  Next use that object to add the book item to the books list in the object (Line 6-8).  

Describe the Software Development Life Cycle. Describe for each phase of the SDLC how it can be used to create software for an Employee Payroll System that allows employees to log the number of hours completed in a work period and then generate their pay. Use Microsoft Word to complete this part of the assessment. Save your file as LASTNAME FIRSTNAME M08FINAL1 were LASTNAME is your lastname and FIRSTNAME is your first name. Upload your answer to this question; do not submit this assessment until you have completed all questions. This question is worth 25 points.

Answers

Answer:

Check the explanation

Explanation:

SDLC

SDLC stands for Software Development Life Cycle

It provides steps for developing a software product

It also checks for the quality and correctness of a software

The main aim of SDLC is to develop a software, which meets a customer requirements

SDLC involves various phases to develop a high-quality product for its end user

Phases of SDLC

           There are seven phases in a software development life cycle as follows,

Requirement Analysis   Feasibility Study   Design    Coding    Testing Deployment      Maintenance

kindly check the attached image below

Requirement analysis

This is the first stage in a SDLC.

In this phase, a detailed and precise requirements are collected from various teams by senior team members

It gives a clear idea of the entire project scope, opportunities and upcoming issues in a project

This phase also involves, planning assurance requirements and analyze risk involved in the project

Here, the timeline to finish the project is finalized

Feasibility Study

In this stage, the SRS document, that is “Software Requirement Specification” document is defined, which includes everything to be designed and developed during the life cycle of a project

Design

In this phase as the name indicates, software and system design documents are prepared, based on the requirement specification document

This enable us to define the whole system architecture

Two types of design documents are prepared in this phase as follows,

High-Level Design

Low-Level Design

Coding

In this phase, the coding of project is done in a selected programming language

Tasks are divided into many units and given to various developers

It is the longest phase in the SDLC

Testing

In this stage, the developed coding is tested by the testing team

The testing team, checks the coding in the user point of view

Installation/Deployment

In this stage, a product is released by the company to the client

Maintenance

Once the product is delivered to the client, the maintenance phase work will start by fixing errors, modifying and enhancing the product.

Employee Payroll System

Requirement analysis

Gather information from various team for requirement

Analyze the number of employees to handle the project

Timeline to finish the project, eg.1 month

Feasibility Study

The system requirements such as how many systems are required

Decide which software to be installed to handle the project.

For example, if we are going to develop the software using C language, then software for that has to be installed

The SRS document has to be prepared

Design

In this the HLD and LLD is prepared, the overall software architecture is prepared

The modules involved in coding are decided

Here the modules can be employee, payroll manager, Employee Log time, account details

The input and output are designed, such as employee name is the input and output is the salary for him, based on working hours

Coding

Here the coding is divided into various sections and given to 2 or more employees

One may code employee detail, one will code working hours of employees and one may code the banking details of employee

Testing

The coding is tested for syntax, declaration, data types and various kinds of error

The testing team will test the coding with various possible values

They may even check with wrong values and analyze the output for that

Installation

Now the software is installed in the client system and the client is calculating the payroll for an employee based on working hours in a month

Maintenance

If any error occurs, the team will clear the issue.

When a new employee joins, then the employee data will added to the database and the database is updated

Also if the client asks for any new features, it will done in this phase.

4. Write an interface ObjectWithTwoParameters which has a method specification: double area (double d1, double d2) which returns the area of a particular object. Write three classes RectangleClass, TriangleClass, and CylinderClass which implement the interface you created. Also, write a demo class which creates objects of RectangleClass, TriangleClass, and CylinderClass and call the corresponding methods

Answers

Answer:

The java program for the given scenario is as follows.

import java.util.*;

//interface with method area

interface ObjectWithTwoParameters

{

double area (double d1, double d2);

}

class RectangleClass implements ObjectWithTwoParameters

{

//overriding area()

public double area (double d1, double d2)

{

return d1*d2;

}

}

class TriangleClass implements ObjectWithTwoParameters

{

//overriding area()

public double area (double d1, double d2)

{

return (d1*d2)/2;

}  

}

class CylinderClass implements ObjectWithTwoParameters

{

public double area (double d1, double d2)

{

return ( 2*3.14*d1*d1 + d2*(2*3.14*d1) );

}

}

public class Test

{

public static void main(String[] args)

{

//area displayed for all three shapes

ObjectWithTwoParameters r = new RectangleClass();

double arear = r.area(2, 3);

System.out.println("Area of rectangle: "+arear);

ObjectWithTwoParameters t = new TriangleClass();

double areat = t.area(4,5);

System.out.println("Area of triangle: "+areat);

ObjectWithTwoParameters c = new CylinderClass();

double areac = c.area(6,7);

System.out.println("Area of cylinder: "+areac);

}

}

OUTPUT

Area of rectangle: 6.0

Area of triangle: 10.0

Area of cylinder: 489.84

Explanation:

1. The program fulfils all the mentioned requirements.

2. The program contains one interface, ObjectWithTwoParameters, three classes which implement that interface, RectangleClass, TriangleClass and CylinderClass, and one demo class, Test, containing the main method.

3. The method in the interface has no access specifier.

4. The overridden methods in the three classes have public access specifier.

5. No additional variables have been declared.

6. The test class having the main() method is declared public.

7. The area of the rectangle, triangle and the cylinder have been computed as per the respective formulae.

8. The interface is similar to a class which can have only declarations of both, variables and methods. No method can be defined inside an interface.

9. The other classes use the methods of the interface by implementing the interface using the keyword, implements.

10. The object is created using the name of the interface as shown.

ObjectWithTwoParameters r = new RectangleClass();

Rewrite this if/else if code segment into a switch statement int num = 0; int a = 10, b = 20, c = 20, d = 30, x = 40; if (num > 101 && num <= 105) { a += 1; } else if (num == 208) { b += 1; x = 8; } else if (num > 208 && num < 210) { c = c * 3; } else { d += 1004; }

Answers

Answer:

public class SwitchCase {

   public static void main(String[] args) {

       int num = 0;

       int a = 10, b = 20, c = 20, d = 30, x = 40;

       switch (num){

           case 102: a += 1;

           case 103: a += 1;

           case 104: a += 1;

           case 105: a += 1;

           break;

           case 208: b += 1; x = 8;

           break;

           case 209: c = c * 3;

           case 210: c = c * 3;

           break;

           default: d += 1004;

       }

   }

}

Explanation:

Given above is the equivalent code using Switch case in JavaThe switch case test multiple levels of conditions and can easily replace the uses of several if....elseif.....else statements.When using a switch, each condition is treated as a separate case followed by a full colon and the the statement to execute if the case is true.The default statement handles the final else when all the other coditions are false

D-H public key exchange Please calculate the key for both Alice and Bob.
Alice Public area Bob
Alice and Bob publicly agree to make
N = 50, P = 41
Alice chooses her Bob
picks his
Private # A = 19 private #
B= ?
------------------------------------------------------------------------------------------------------------------------------------------
I am on Alice site, I choose my private # A = 19.
You are on Bob site, you pick up the private B, B and N should have no common factor, except 1.
(Suggest to choose B as a prime #) Please calculate all the steps, and find the key made by Alice and Bob.
The ppt file of D-H cryptography is uploaded. You can follow the steps listed in the ppt file.
Show all steps.

Answers

Answer:

See explaination

Explanation:

Please kindly check attachment for the step by step solution of the given problem.


3.34 LAB: Mad Lib - loops in C++

Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.

Write a program that takes a string and integer as input, and outputs a sentence using those items as below. The program repeats until the input is quit 0.

Ex: If the input is:
apples 5
shoes 2
quit 0

the output is:
Eating 5 apples a day keeps the doctor away.
Eating 2 shoes a day keeps the doctor away.

Make sure your answer is in C++.

Answers

Answer:

A Program was written to carry out some set activities. below is the code program in C++ in the explanation section

Explanation:

Solution

CODE

#include <iostream>

using namespace std;

int main() {

string name; // variables

int number;

cin >> name >> number; // taking user input

while(number != 0)

{

// printing output

cout << "Eating " << number << " " << name << " a day keeps the doctor away." << endl;

// taking user input again

cin >> name >> number;

}

}

Note: Kindly find an attached copy of the compiled program output to this question.

In this exercise we have to use the knowledge in computational language in C++ to describe a code that best suits, so we have:

The code can be found in the attached image.

What is looping in programming?

In a very summarized way, we can describe the loop or looping in software as an instruction that keeps repeating itself until a certain condition is met.

To make it simpler we can write this code as:

#include <iostream>

using namespace std;

int main() {

string name; // variables

int number;

cin >> name >> number; // taking user input

while(number != 0)

{

// printing output

cout << "Eating " << number << " " << name << " a day keeps the doctor away." << endl;

// taking user input again

cin >> name >> number;

}

}

See more about C++ at brainly.com/question/19705654

6 things you should consider when planning a PowerPoint Presentation.

Answers

Answer: I would suggest you consider your audience and how you can connect to them. Is your presentation, well, presentable? Is whatever you're presenting reliable and true? Also, no more than 6 lines on each slide. Use colors that contrast and compliment. Images, use images. That pulls whoever you are presenting to more into your presentation.

Explanation:

Write a program to read as many test scores as the user wants from the keyboard (assuming at most 50 scores). Print the scores in (1) original order, (2) sorted from high to low (3) the highest score, (4) the lowest score, and (5) the average of the scores. Implement the following functions using the given function prototypes: void displayArray(int array[], int size) - Displays the content of the array void selectionSort(int array[], int size) - sorts the array using the selection sort algorithm in descending order. Hint: refer to example 8-5 in the textbook. int findMax(int array[], int size) - finds and returns the highest element of the array int findMin(int array[], int size) - finds and returns the lowest element of the array double findAvg(int array[], int size) - finds and returns the average of the elements of the array

Answers

Answer: Provided in the explanation segment

Explanation:

Below is the code to carry out this program;

/* C++ program helps prompts user to enter the size of the array. To display the array elements, sorts the data from highest to lowest, print the lowest, highest and average value. */

//main.cpp

//include header files

#include<iostream>

#include<iomanip>

using namespace std;

//function prototypes

void displayArray(int arr[], int size);

void selectionSort(int arr[], int size);

int findMax(int arr[], int size);

int findMin(int arr[], int size);

double findAvg(int arr[], int size) ;

//main function

int main()

{

  const int max=50;

  int size;

  int data[max];

  cout<<"Enter # of scores :";

  //Read size

  cin>>size;

  /*Read user data values from user*/

  for(int index=0;index<size;index++)

  {

      cout<<"Score ["<<(index+1)<<"]: ";

      cin>>data[index];

  }

  cout<<"(1) original order"<<endl;

  displayArray(data,size);

  cout<<"(2) sorted from high to low"<<endl;

  selectionSort(data,size);

  displayArray(data,size);

  cout<<"(3) Highest score : ";

  cout<<findMax(data,size)<<endl;

  cout<<"(4) Lowest score : ";

  cout<<findMin(data,size)<<endl;

  cout<<"(5) Lowest scoreAverage score : ";

  cout<<findAvg(data,size)<<endl;

  //pause program on console output

  system("pause");

  return 0;

}

 

/*Function findAvg that takes array and size and returns the average of the array.*/

double findAvg(int arr[], int size)

{

  double total=0;

  for(int index=0;index<size;index++)

  {

      total=total+arr[index];

  }

  return total/size;

}

/*Function that sorts the array from high to low order*/

void selectionSort(int arr[], int size)

{

  int n = size;

  for (int i = 0; i < n-1; i++)

  {

      int minIndex = i;

      for (int j = i+1; j < n; j++)

          if (arr[j] > arr[minIndex])

              minIndex = j;

      int temp = arr[minIndex];

      arr[minIndex] = arr[i];

      arr[i] = temp;

  }

}

/*Function that display the array values */

void displayArray(int arr[], int size)

{

  for(int index=0;index<size;index++)

  {

      cout<<setw(4)<<arr[index];

  }

  cout<<endl;

}

/*Function that finds the maximum array elements */

int findMax(int arr[], int size)

{

  int max=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]>max)

          max=arr[index];

  return max;

}

/*Function that finds the minimum array elements */

int findMin(int arr[], int size)

{

  int min=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]<min)

          min=arr[index];

  return min;

}

cheers i hope this help!!!


The equation of certain traveling waves is y(x.t) = 0.0450 sin(25.12x - 37.68t-0.523) where x and y are in
meters, and t in seconds. Determine the following:
(a) Amplitude. (b) wave number (C) wavelength. (d) angular frequency. (e) frequency: (1) phase angle, (g) the
wave propagation speed, (b) the expression for the medium's particles velocity as the waves pass by them, and (i)
the velocity of a particle that is at x=3.50m from the origin at t=21.os​

Answers

Answer:

A. 0.0450

B. 4

C. 0.25

D. 37.68

E. 6Hz

F. -0.523

G. 1.5m/s

H. vy = ∂y/∂t = 0.045(-37.68) cos (25.12x - 37.68t - 0.523)

I. -1.67m/s.

Explanation:

Given the equation:

y(x,t) = 0.0450 sin(25.12x - 37.68t-0.523)

Standard wave equation:

y(x, t)=Asin(kx−ωt+ϕ)

a.) Amplitude = 0.0450

b.) Wave number = 1/ λ

λ=2π/k

From the equation k = 25.12

Wavelength(λ ) = 2π/25.12 = 0.25

Wave number (1/0.25) = 4

c.) Wavelength(λ ) = 2π/25.12 = 0.25

d.) Angular frequency(ω)

ωt = 37.68t

ω = 37.68

E.) Frequency (f)

ω = 2πf

f = ω/2π

f = 37.68/6.28

f = 6Hz

f.) Phase angle(ϕ) = -0.523

g.) Wave propagation speed :

ω/k=37.68/25.12=1.5m/s

h.) vy = ∂y/∂t = 0.045(-37.68) cos (25.12x - 37.68t - 0.523)

(i) vy(3.5m, 21s) = 0.045(-37.68) cos (25.12*3.5-37.68*21-0.523) = -1.67m/s.

Other Questions
What do mexicans refer the mexican american war as Write a program to read as many test scores as the user wants from the keyboard (assuming at most 50 scores). Print the scores in (1) original order, (2) sorted from high to low (3) the highest score, (4) the lowest score, and (5) the average of the scores. Implement the following functions using the given function prototypes: void displayArray(int array[], int size) - Displays the content of the array void selectionSort(int array[], int size) - sorts the array using the selection sort algorithm in descending order. Hint: refer to example 8-5 in the textbook. int findMax(int array[], int size) - finds and returns the highest element of the array int findMin(int array[], int size) - finds and returns the lowest element of the array double findAvg(int array[], int size) - finds and returns the average of the elements of the array I saw the dog...........out of the house.a. runb. is runningc. rand. was running. i need help ASAP. you need to be good at fractions.fill in the missing numbers:2/3 = _/6 = 12/_ = _/21 Which type of graph would you use to show the number of pages in each book on the bookshelf? Cuando se puede utilizar la cita en una entrevista?? y = 5x 6Identify the y-intercept of thefollowing equation. Consider sending a 1,600-byte datagram into a link that has an mtu of 500 bytes. suppose the original datagram is stamped with the identification number 291. how many fragments are generated? what are the values in the various fields in the ip datagram(s) generated related to fragmentation? 9. What is the volume of the given prism? Round the answer to the nearest tenth of a centimeter.The figure is not drawn to scale.8.8 cm/4.7 cm13.1 cm313.3 cm3436.4 cm541.8 cm3681.5 cm3 Find the radius of a cylinder with volume351.9 cubic cm and height 7 cm. Sara Bought a computer that was originally priced at $896.The computer was on sale for 12% off. When she bought the computer, a 7% tax was added to the sale price. How much did Sara spend on the computer. Round to the nearest cent! 100 points!The following data shows the weight, in pounds, of 6 boxes:5, 3, 3, 4, 5, 4What is the value of the mean absolute deviation of the weight of the boxes, and what does it represent about the weight of a box? A))1.2 pounds; on average, the weight of a box varies 1.2 pounds from the mean of 4 pounds B))0.7 pound; the weight of 50% of the boxes is greater than 0.7 poundC)) 1.2 pounds; the weight of 50% of the boxes is greater than 1.2 pounds D))0.7 pound; on average, the weight of a box varies 0.7 pound from the mean of 4 pounds Base on the information in the passage which of the following is most likely to be true kievs importance to Russian society can be best illustrated by The dimensions of a chocolate box are: height=x + 2 inches, length=2x+5 inches, and width=4x-1 inches. If the volume of the chocolate box is 605 cubic inches, what is the value of x? Which of these conclusions is correct about P and Q in the diagram? P represents the land and Q represents the ocean. P represents the ocean and Q represents the land. P represents the land and Q represents the atmosphere. P represents the atmosphere and Q represents the ocean. Select the verb in the preterite tense that best completes the sentence.Pepito se ________ la mueca ayer, y hoy no puede escribir.A) torciB) torcieronC) torcD) torciste Album covers are an effective way to:O A. indicate the high production values on the recording.O B. lend an air of respectability and trustworthiness to alternativemusicians.O c. get people who would otherwise download music to buy thealbumD. provide listeners with additional information about the music andmusicians.mm There are four countries in the region of Central Asia.Please select the best answer from the choices providedTF In which year did BEACH volleyball first become an olympic game