Question: Question 2 Given the following steps of the problem-solving phase of a computer program's life cycle: 1 - Translate the general solution into code. 2
Question 2
| Given the following steps of the problem-solving phase of a computer program's life cycle: 1 - Translate the general solution into code. 2 - Write a general solution for the problem. 3 - Test the general solution. 4 - Analyze the problem. 5 - Test the solution on a computer. The proper sequence is: | |
| a) | 1 2 3 4 5 |
| b) | 2 3 1 4 5 |
| c) | 4 2 3 1 5 |
| d) | 4 2 1 3 5 |
| e) | 2 1 3 5 1 |
Question 3
| I asked the user to enter the percentage by which a price has gone up and they enter 10 to mean 10%. I was assuming the user would enter 0.1 to mean 10%. In my program I calculate the bonus amount as salary * percentage/100 as I expected the user to enter 10 and not 0.1 . This will result in what type of error? | |
| a) | syntax error |
| b) | run-time error |
| c) | compiler error |
| d) | logic error |
| e) | b and c above |
Question 4
| While typing a program, a student misspelled a C++ command. This will result in what type of error? | |
| a) | syntax error |
| b) | run-time error |
| c) | compiler error |
| d) | logic error |
| e) | b and c above |
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
