Concept explainers
When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first month’s interest on $1,000 is 1000 × 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 — 6 = 19. This means after making the first payment, the loan amount is 1,000 — 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 × 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 — 5.89 = 19.11 and the remaining balance after the second payment is 981 — 19.11 = 961.89. This process is repeated until the loan is paid. Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Mindtap Computing, 1 Term (6 Months) Printed Access Card For Malik's C++ Programming: From Problem Analysis To Program Design, 8th (mindtap Course List)
- Computer Science Investing in stocks is a way to create assets that are supposed to provide financial security over time. In solving this problem, we assume that an investor buys several shares of stock at a certain price. These shares are going to be sold later on for a different price. Obviously, if the selling price is higher than the acquisition price, the investor makes a profit, registering capital gain. If the shares are sold at a lower price, the investor has a loss, which marks a negative capital gain. This whole process is done over a period of time, and you are required to create a scenario for buying and selling shares. The assumption is that the investor sells shares in the order in which they were purchased. The goal is to calculate the capital gain over time. Suppose that you buy n shares of stock or mutual fund for d dollars each. Later, you sell some of these shares. If the sale price exceeds the purchase price, you have made a profit—a capital gain. On the other…arrow_forwardA performance venue hosts many concerts a year. Performers perform several times a year for the concerts. Each concert has one or more performers and has a name and a specified seating arrangement. A concert is held in one (and only one) of several concert halls, each of which has a room number and the number of seats. Each concert generates revenues from the sales of tickets. Assume that the price of the ticket is the same for the same concert, but different prices for different concerts.Identify several attributes and a key field for each entity. Represent this situation of concerts and performers with an E-R diagramarrow_forwardSuppose you are trying to make a schedule for use of the auditorium for different clubs in a school. The auditorium can be used in the afternoons from Sunday to Thursday. There are five clubs: Music, Drama, Dance, Photography, Computer. There are a few rules that must be followed: a)The auditorium can be used by only one club on a day. b)Computer club wants to use on Monday or Thursday. c)Drama club wants on Wednesday or Thursday. d)Music club is fine with any day. Dance club wants on Monday or Wednesday. e)Photography club wants on Sunday, Tuesday or Wednesday. Formulate this problem as a CSP. Draw the constraint graph. Show the steps followed by backtracking search algorithm and derive a solution.arrow_forward
- In the US Higher Education sector, a degree is classified using a Grade Point Average (GPA). The grades ‘A’, ‘B’, ‘C’, ‘D’ or ‘F’ are called academic grades. Each ‘A’ is worth 4 points, each ‘B’ is worth 3 points, each ‘C’ is worth 2 points, each ‘D’ is worth 1 point and each ‘F’ is worth 0 points. The GPA is found by calculating the number of points and then dividing by the number of academic grades. A student may also have a non-academic grade of ‘W’ (for withdrew) which is not counted at all in the calculation. You can assume that the student will have at least one academic grade in their list of grades. There are many ways of calculating a GPA from a list of grades, but you must follow the algorithm given by this top-level decomposition: > Find GPA. >> Input a list of academic and non-academic grades. >> Create a new list that consists of the number of points for each academic grade in the input list. >> Add up the values in the new list and divide by the…arrow_forwardA chest of drawers, also called a dresser or a bureau, is a type of cabinet that has multiple parallel, horizontal drawers generally stacked one above another (See Figure 1). Each drawer has a lock to secure any property inside, but sometimes a drawer may not be secure even when it is locked. For instance, imagine a scenario where the second drawer from the top is locked, but the top drawer is not. In such a case, a burglar can access the second drawer by opening the top drawer and gaining access to the property inside the second drawer. Given the number of drawers, n, and the number of secure drawers, k. You can assume that nk. Write an O (nk) algorithm to find a number of ways to ensure that exactly k drawers are secure. For example, the number of drawers n = 6, and number of secure drawers k = 4. The output is 6 (ULLLLL, LULLLL, LLULLL, LLLULL, LLLLUL, and LLLLUU). FIGURE 1. Chest of Drawersarrow_forwardLoan negotiation is usually not a straightforward task. A type of loan is the discount installment loan. This type of loan has the following characteristics. Supposing a loan has face value of GHC 1000, interest is 13% and the duration is 24 months. The interest is compounded by multiplying the face value by 0.13 to produce GHC 130. The figure (130) is then multiplied by the loan period of 2 years to give GHC 260 as the total interest owed. This amount is immediately deducted from the face value leaving the customer with only GHC 740. Repayment is then made in monthly equal installments based on the face value. This means that the monthly payment will be GHC 1000 divided by 24 which is approximately 41.67. This method of calculating the monthly repayment is not too bad if the consumer needs only GHC 760 but the calculation is a bit complicated if the consumer needs GHC 1000. a. Write a program that will take 3 inputs 1. The amount the consumer needs 2. The interest rate 3. The duration…arrow_forward
- Project Optimization and regression: Exact and approximate methods to solve 0-1 Knapsack problem Description The 0/1 Knapsack Problem and Logistics Transportation companies such as TNT and Royal Mail face daily problems in logistics. Consider the following simple logistics problem, which you will solve: An airline cargo company has 1 aeroplane which it flies from the UK to the US on a daily basis to transport some cargo. In advance of a flight, it receives bids for deliveries from (many) customers. Customers state the weight of the cargo item they would like delivered, and the amount they are prepared to pay. The airline is constrained by the total amount of weight the plane is allowed to carry. The company must choose a subset of the packages (bids) to carry in order to make the maximum possible profit, given the weight limit that they must respect. In mathematical form the problem is: Given a set of N items each with weight wi and value vi, for i=1 to N, choose a subset of items…arrow_forwardFive members of an obesity club want to know how much they have lost or gained weight since the last time they met. To do this, they carry out a weighing ritual where each one is weighed on ten different scales in order to have a more accurate average of their weight. If there is a positive difference between this average weight and the weight of the last time they met, it means that they gained weight. But if the difference is negative, it means that they lost weight. What the problem requires is that for each person a sign is printed that says "went up" or "under" and the amount of pounds. Write a program in C++ that uses a function. The user must enter the initial weight and the 10 weights of the scales. Please do not use arrays or vectorarrow_forwardYou have a backpack that can carry at most 15 kg of stuff (following image). There are ten boxes of five types (A, B, C, D, and E), with two boxes of each type. The weights and values of the boxes are given in the figure. You want to select some of these boxes to put in your backpack in order to maximize their total value, but you cannot exceed the backpack’s weight capacity. Additionally,• if a type B box is selected, then no type C box can be selected• at least one box of either type A or type D must be selected Formulate an integer linear programming model to help you make the bag packing decision. To assist you, below are your decision variables.• yi: select (= 1) or not select (= 0) type i box, i = A, B, C, D, E.• xj: The number of type j boxes selected, j = A, B, C, D, E.arrow_forward
- Read this:Selective Service Registration Registration with the Selective Service is mandatory in America. The law states "it is the duty of every male citizen of the United States between the ages of 18 and 25, to register." The law does not require women to register. Failure to register for selective service is a crime. If found guilty, a person could be fined up to $250,000. They might also receive a sentence of five years in prison. All men over 18 should register online at the Selective Service System website (www.sss.gov). Registration can also be done at any US Post Office. It is a duty that allows for freedom in America. Explain the purpose for registering with the Selective Service System. Is this action a duty or a responsibility?arrow_forwardA large company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% their gross sales for that week. For example, a salesperson who sells $5,000 worth of merchandise in a week receives $200 plus 9% of $5,000, or a total of $650. You’ve been supplied with a list of the items sold by each salesperson. The values of these items are shown in the table below. Develop a Java application that inputs one salesperson's items sold for last week and calculates and displays that salesperson's earnings. There is no limit to the number of items that can be sold. Item Value 239.99 2 129.75 3 99.95 4 350.89 Objectives This assignment was designed to reinforce programming concepts from Chapter 4. In this assignment you will practice: • Using if-else statements Sample Runs Run: Run: Enter number sold of product #1: 20 Enter number sold of product #2: 30 Enter number sold of product #3: 0 Enter number sold of product #4: 45 Earnings this week: $2403.41 Enter number…arrow_forwardDoming, Melvin, and Sebastian could each be a dancer, a mechanic, or a singer. None has a job that starts with the same letter as his name. Doming recently has his car repaired by the mechanic. Who has which job? A. Doming is the singer, Melvin is the dancer, and Sebastian is the mechanic. B. Doming is the mechanic, Melvin is the singer, and Sebastian is the dancer. C. Doming is the dancer, Melvin is the singer, and Sebastian is the mechanic. D. Doming is the singer, Melvin is the mechanic, and Sebastian is the dancer.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole