It is very important to know how long it would take you to safely stop your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
It is very important to know how long it would take you to safely stop your car in the event of an emergency (like a car pulling out in front of you in traffic). In this assignment, you will use loops to create a (very simplified) visualization of this process. You will prompt the user to enter three key pieces of information 1. How fast their car is currently moving (in miles per hour) 2. How quickly can you decelerate (in miles)? o As this is not a physics class, we will assume you can directly subtract this value from your speed every second. 3. The time interval you want to see speed updates on (in seconds) You will then use a loop to calculate how far you have traveled each second as you decelerate. You will display the current speed and distance at the time internal the user specified using a looping structure. When you reach 0, stop the loop and print the final results. Call the file Assignment4A (.java, .cs, .cpp) and the class name Assignment4A. User input is indicated in bold. Sample Output #1: [Stopping Time] How fast are you going (miles/hour)? 5 How quickly can you decelerate (miles)? 1 How often do you want to see updates (in seconds)? 1 You are going 5 MPH when you slam on the brakes! At 1 second, you have traveled 7.3335 feet and are now moving at 4 MPH. At 2 seconds, you have traveled 13.2003 feet and are now moving at 3 MPH. At 3 seconds, you have traveled 17.6004 feet and are now moving at 2 MPH. At 4 seconds, you have traveled 20.5338 feet and are now moving at 1 MPII. At 5 seconds, you have traveled 22.0005 feet and are now moving at 0 MPH. You took 5 seconds to stop and traveled 22.005 feet during that time! It is very important to know how long it would take you to safely stop your car in the event of an emergency (like a car pulling out in front of you in traffic). In this assignment, you will use loops to create a (very simplified) visualization of this process. You will prompt the user to enter three key pieces of information 1. How fast their car is currently moving (in miles per hour) 2. How quickly can you decelerate (in miles)? o As this is not a physics class, we will assume you can directly subtract this value from your speed every second. 3. The time interval you want to see speed updates on (in seconds) You will then use a loop to calculate how far you have traveled each second as you decelerate. You will display the current speed and distance at the time internal the user specified using a looping structure. When you reach 0, stop the loop and print the final results. Call the file Assignment4A (.java, .cs, .cpp) and the class name Assignment4A. User input is indicated in bold. Sample Output #1: [Stopping Time] How fast are you going (miles/hour)? 5 How quickly can you decelerate (miles)? 1 How often do you want to see updates (in seconds)? 1 You are going 5 MPH when you slam on the brakes! At 1 second, you have traveled 7.3335 feet and are now moving at 4 MPH. At 2 seconds, you have traveled 13.2003 feet and are now moving at 3 MPH. At 3 seconds, you have traveled 17.6004 feet and are now moving at 2 MPH. At 4 seconds, you have traveled 20.5338 feet and are now moving at 1 MPII. At 5 seconds, you have traveled 22.0005 feet and are now moving at 0 MPH. You took 5 seconds to stop and traveled 22.005 feet during that time! It is very important to know how long it would take you to safely stop your car in the event of an emergency (like a car pulling out in front of you in traffic). In this assignment, you will use loops to create a (very simplified) visualization of this process. You will prompt the user to enter three key pieces of information 1. How fast their car is currently moving (in miles per hour) 2. How quickly can you decelerate (in miles)? o As this is not a physics class, we will assume you can directly subtract this value from your speed every second. 3. The time interval you want to see speed updates on (in seconds) You will then use a loop to calculate how far you have traveled each second as you decelerate. You will display the current speed and distance at the time internal the user specified using a looping structure. When you reach 0, stop the loop and print the final results. Call the file Assignment4A (.java, .cs, .cpp) and the class name Assignment4A. User input is indicated in bold. Sample Output #1: [Stopping Time] How fast are you going (miles/hour)? 5 How quickly can you decelerate (miles)? 1 How often do you want to see updates (in seconds)? 1 You are going 5 MPH when you slam on the brakes! At 1 second, you have traveled 7.3335 feet and are now moving at 4 MPH. At 2 seconds, you have traveled 13.2003 feet and are now moving at 3 MPH. At 3 seconds, you have traveled 17.6004 feet and are now moving at 2 MPH. At 4 seconds, you have traveled 20.5338 feet and are now moving at 1 MPII. At 5 seconds, you have traveled 22.0005 feet and are now moving at 0 MPH. You took 5 seconds to stop and traveled 22.005 feet during that time! It is very important to know how long it would take you to safely stop your car in the event of an emergency (like a car pulling out in front of you in traffic). In this assignment, you will use loops to create a (very simplified) visualization of this process. You will prompt the user to enter three key pieces of information 1. How fast their car is currently moving (in miles per hour) 2. How quickly can you decelerate (in miles)? o As this is not a physics class, we will assume you can directly subtract this value from your speed every second. 3. The time interval you want to see speed updates on (in seconds) You will then use a loop to calculate how far you have traveled each second as you decelerate. You will display the current speed and distance at the time internal the user specified using a looping structure. When you reach 0, stop the loop and print the final results. Call the file Assignment4A (.java, .cs, .cpp) and the class name Assignment4A. User input is indicated in bold. Sample Output #1: [Stopping Time] How fast are you going (miles/hour)? 5 How quickly can you decelerate (miles)? 1 How often do you want to see updates (in seconds)? 1 You are going 5 MPH when you slam on the brakes! At 1 second, you have traveled 7.3335 feet and are now moving at 4 MPH. At 2 seconds, you have traveled 13.2003 feet and are now moving at 3 MPH. At 3 seconds, you have traveled 17.6004 feet and are now moving at 2 MPH. At 4 seconds, you have traveled 20.5338 feet and are now moving at 1 MPII. At 5 seconds, you have traveled 22.0005 feet and are now moving at 0 MPH. You took 5 seconds to stop and traveled 22.005 feet during that time!
Expert Answer:
Answer rating: 100% (QA)
It seems like you need a program that calculates and displays the deceleration of a car when the use... View the full answer
Related Book For
Fundamentals of Case Management Practice Skills for the Human Services
ISBN: 978-1305094765
5th edition
Authors: Nancy Summers
Posted Date:
Students also viewed these accounting questions
-
At the beginning of Year 2, the Redd Company had the following balances in its accounts. Cash Inventory Land Common stock Retained earnings $14,800 5,000 2,200 11,000 11,000 During Year 2, the...
-
A dog training business began on December 1. The following transactions occurred during its first month. December 1 Receives $25,000 cash as an owner investment in exchange for common stock. December...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Finally, Reza mentions that he was hired into the CFO role on an interim basis with the possibility of being made permanent based on performance. Although he wants to succeed in this role, he does...
-
Use mathematical induction to show that if f(x) = xex, then f (n) (x) = (x + n) ex.
-
Give an example of how you have used the technique of questioning children and their families to build connection and engage a child in learning. (Approximately 100 words)
-
The Arrow-Pratt relative risk aversion coefficient is \[\mu(x)=\frac{x U^{\prime \prime}(x)}{U^{\prime}(x)} .\] Show that the utility functions $U(x)=\ln x$ and $U(x)=\gamma x^{\gamma}$ have constant...
-
Airborne Travel uses the contribution margin income statement internally. Airbornes first quarter results follow. Airbornes relevant range is between sales of $201,000 and $463,000. Airborne Travel...
-
Image transcription text Back Time left 2:57:06 Question 10 A student performs an experiment to investigate the time required to stop a toy van. In each of four trials, the student Not yet varies the...
-
Delaplane Computers gets most of its component parts from suppliers in Pacific Rim countries, who ship to the companys main distribution center near Long Beach, California, where computers are built...
-
1 . Mickley Companys plantwide predetermined overhead rate is $23.00 per direct labor-hour and its direct labor wage rate is $11.00 per hour. The following information pertains to Job A-500: Direct...
-
A company expects to have FCF of $600 at Year 10, which is expected to grow at a constant rate of 4% thereafter. If the WACC is 8%, what is the value of operations at Year 10, HV10? ($15,600)
-
Use Beckers model to explain why sponsors who discriminate will likely experience lower profits for doing so.
-
Does the athletic department at your college make a profit? Does it profit even when transferssuch as student feesare deducted? If it lost money, whatif anything should be done?
-
Use human capital theory to explain why graduation rates for women's basketball players are so much higher than those for men's basketball players
-
Use supply and demand analysis to show and describe the dramatic increase in "basketball academy" prep schools in response to higher academic standards.
-
Let (X, T) be any topological space and A any subset of X. The largest open set contained in A is called the interior of A and is denoted by Int(A). [It is the union of all open sets in X which lie...
-
31. What is the income that can be received over 15 years from $500,000 earning 6% annually? 32. What is the semiannual payment required to retire $50,000 in debt over 5 years at 8% compounded...
-
Persis has been clean for 9 months and comes in to see her case manager about how she is really tempted to use again. Persis asks if there is something more she can do. The worker says, Oh, come on....
-
Jerry was a client who improved and was discharged 2 years ago. You receive a call from the National Can Company. The caller explains that Jerry has applied for a job and that the company would like...
-
Mary Smith is a depressed elderly woman who was admitted to Polyclinic Hospital due to severe back pain. She was advised she might need surgery to correct the problem. You are her case manager at the...
-
In this chapter, we had only expressed eigenstates of the harmonic oscillator Hamiltonian through repeated action of the raising operator, \(\hat{a}^{\dagger}\). This gives us a concrete algorithm...
-
In this chapter, we noted that the Hilbert space of the harmonic oscillator corresponds to all those states that can be accessed from the ground state through action by an anatic function of...
-
Supersymmetry is a proposed extension of the symmetries of space-time beyond that of just familiar Lorentz transformations and translations. A supersymmetry transformation interchanges fermions and...
Study smarter with the SolutionInn App