report - Project 1Computer Science 31 Ahmad El-Arabi Using...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 1—Computer Science 31 Ahmad El-Arabi Using the program given, there were multiple inputs we gave that produced incorrect, unusual, or nonsensical results. Let’s look at just two of the inputs: We first inputted the same value for the number of people supporting the plan and the number of people against the plan. This resulted in the following, As we see, the result is incorrect, with the program outputting “More people oppose the plan than support it.” The reason being that the program produces an incorrect result is that the if-else statement does not take into consideration the situation in which the number of people who support the plan is the same as the number of people who oppose the plan. The second input that we provided is where the two values inputted for the variables forPlan and againstPlan do not add up to the value inputted for the variable numberSurveyed . We would suspect this would result in an error message, but instead we resulted in the following, As we see, the program does not give an error message or terminate the program, but rather
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/24/2009 for the course BIOENGR 10 taught by Professor Staff during the Spring '08 term at UCLA.

Page1 / 2

report - Project 1Computer Science 31 Ahmad El-Arabi Using...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online