subject

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ideal car speed for city streets to be over 1500 MPH (nearly twice the speed of sound), when it should be approximately 30 MPH. Which of the following strategies would be most efficient to employ in debugging your program?

a. At the very end of the speed calculations, add an additional line of code that divides the calculated speed by 50 so that the program never produces such high speeds
b. After each calculation within your program, insert a temporary statement that displays the most recently calculated value. When running your program, compare the displayed values with the expected values to identify where in the program the error is being introduced.
c. Starting at the end of your program and working backwards, systematically delete each line of code that relates to calculating and re-run the program after each deletion to identify where in the program the error is being introduced
d. Delete all of the code relating to speed calculations and rewrite it again

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:40
You are working with a professional edition organization. they wish to install the expense tracker which requires the use of 4 custom tabs, 3 custom objects, and one custom app. if the company is already using 4 applications, 36 custom objects, and 7 custom tabs, what will happen when they try to install expense tracker?
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
You know the right answer?
While writing a program to regulate the speed of a self-driving car, you find that your software som...
Questions
question
Chemistry, 16.11.2020 14:00
question
Mathematics, 16.11.2020 14:00
question
Mathematics, 16.11.2020 14:00
Questions on the website: 13722359