Negotiating a consumer loan is not always straightforward. One form of loan is the discount installment loan, which works as follows. Suppose a loan has a face value of $1,000, the interest rate is
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
ABSOLUTE C++ -TEXT
Additional Engineering Textbook Solutions
INTERNATIONAL EDITION---Engineering Mechanics: Statics, 14th edition (SI unit)
Database Concepts (8th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Web Development and Design Foundations with HTML5 (8th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
- The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses: single filers, married filing jointly, married filing separately, and head of household. The tax rates vary every year. Table 4.2 shows the rates for 2009. If you are, say, single with a taxable income of $10,000, the first $8,350 is taxed at 10% and the other $1,650 is taxed at 15%. So, your tax is $1,082.50. TABLE 4.2 2009 U.S. Federal Personal Tax Rates Marginal Tax Rate 10% 15% 25% 28% 33% 35% Single $0-$8,350 $8,351-$33.950 $33,951-$82,250 $82,251 - $171,550 $171,551-$372,950 $372,951+ Married Filing Jointly $0-$16,700 $16,701-$67,900 $67.901-$137,050 $137,051 - $208,850 $208,851-$372,950 $372,951+ Married Filing Separately $0-$8,350 $8,351-$33,950 $33,951 - $68,525 $68,526-$104,425 $104,426-$186,475 $186,476+ Head of Household $0-$11,950 $11,951-$45,500 $45,501-$117,450 $117.451-$190,200 $190,201-$372,950 $372.951+ You are to write a program to…arrow_forwardComputer 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_forwardPython code for this scenario: There is a line of tourist trying to book a room for their vacation. The rates for each room is available below. The guest are allowed to book any room for any duration. Rate per day: A - Junior Suite (1500) B - Deluxe Suite (3600) C - Executive Suite (7800) Input: Number of guests: Name of guests: Letter of their room choice and the number of room: Duration of stay: Customer payment: Process: - The accommodation should be inputted as a string. If the value is not applicable, just ignore that item. - The duration of their stay will be arranged in ascending order to know who will check out soon Output: Guest names in ascending order based on the duration of their stay. Calculate your total sales and the total change. Example: Book now! Rate per day: A - Junior Suite (1500) B - Deluxe Suite (3600) C - Executive Suite (7800) Number of guests: 3 Name of guests: Moon Rose Sky Letter of their room choice and the number of room: A3 B2 C1 Duration of…arrow_forward
- 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 months 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 program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)arrow_forwardThere are two isotopes of an unknown element, X-19 and X-21. The abundance of X-19 is 14.29%. A weighted average uses the percentages of each isotope to scale their contribution to the total mass. Each isotope's contribution is the percentage (in decimal form) multiplied by the mass of the isotope. What is the contribution (in amu) to the weighted average from the X-19 isotope, which has a mass of 19.00 amu?arrow_forwardThe distance d between a point p(x, y), where x and y are the coordinates of p, and the center of a circle (a, b), where a and b are the coordinates of the center, is given by the formula: (a, b). r d = (x – a)² + (y – b)² r The point p(x, y) is considered inside the circle if d r. (x, y)' (x', y') Write a Java class called CirclePointthat: a. Reads from the user 2 integer values x and y represent the coordinates of the point p, b. Reads from the user 2 integer values a and b represent the coordinates of the center of the circle, c. Reads from the user a real value r represents the radius of the circle, d. Calculates and prints the distance d (rounded to 2 decimal places) between the point p and the center of the circle, and e. Checks and prints whether the point is inside, on or outside the circle. NOTE: if the radius value is negative, an error message should be shown. Sample Run 1: ==================== Enter the coordinates of the point: 5 7 Enter the coordinates of the center of…arrow_forward
- comment what each line does in the programarrow_forwardYou need to take a trip by car to another town that you have never visited before. Therefore, you are studying a map to determine the shortest route to your destination. Depending on which route you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on the way. The map shows the mileage along each road that directly connects two towns without any intervening towns. These numbers are summarized in the following table, where a dash indicates that there is no road directly connecting these two towns without going through any other towns. Miles between Adjacent Towns Town A B C DE Destination Origin A 40 60 50 10 70 B 20 55 40 50 10 D 60 E 80 (a) Formulate this problem as a shortest-path problem by drawing a network where nodes represent towns, links represent roads, and numbers indicate the length of each link in miles. (b) Use the Dijkstra's algorithm to solve this shortest path problem.arrow_forwardYou need to take a trip by car to another town that you have never visited before. Therefore, you are studying a map to determine the shortest route to your destination. Depending on which route you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on the way. The map shows the mileage along each road that directly connects two towns without any intervening towns. These numbers are summarized in the following table, where a dash indicates that there is no road directly connecting these two towns without going through any other towns. Town Origin A B C D E A 40 Miles between Adjacent Towns C D E B 60 10 50 20 - 70 55 - 88811 40 50 10 Destination | | || 88 60 80 (a) Formulate this problem as a shortest-path problem by drawing a network where nodes represent towns, links represent roads, and numbers indicate the length of each link in miles. (b) Use the Dijkstra's algorithm to solve this shortest path problem. Illustrate your work by using a table.…arrow_forward
- full answer, pleasearrow_forwardSuppose you are an astrologer and you are predicting the zodiac sign of the customer using month and date of the birth given by the user. Conditions to predict the zodiac sign are given in the following table: Zodiac Sign From - To December 22 - January 19 January 20 - February 17 February 18 - March 19 March 20 - April 19 Capricorn Aquarius Pisces Aries April 20 - May 20 May 21 - June 20 June 21- July 22 July 23 - August 22 August 23 - September 22 September 23 - October 22 October 23 - November 21 Taurus Gemini Cancer Leo Virgo Libra Scorpio Sagittarius November 22 - December 21 Write a C program for the above scenario using if statement.arrow_forwardEngineers use both English and SI (Système International d’Unités) units on a regular basis. Some fields use primarily one or the other, but many combine the two systems. For example, the rate of energy input to a steam power plant from burning fossil fuels is usually measured in Btu/hour. However, the electricity produced by the same plant is usually measured in joules/s (watts). Automobile engines, by contrast, are often rated in horsepower or in ft lbf/s. Here are some conversion factors relating these different power measurements: a) Generate a table of conversions from kW to hp. The table should start at 0 kW and end at 15 kW. Use the input function to let the user define the increment between table entries. Use disp and fprintf to create a table with a title, column headings, and appropriate spacing. The output should look like: kW hP 0.0 0.00 2.5 3.35 5.0. 6.70 7.5 10.06 10.0 13.41 12.5…arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrOperations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT