Question: Using provided information please answer questions 1-13. Programming language is java. 4. Provide the condition that corresponds to when you want to continue the program:

Using provided information please answer questions 1-13. Programming language is java.

Using provided information please answer questions 1-13. Programming language is java. 4.

Provide the condition that corresponds to when you want to continue the

4. Provide the condition that corresponds to when you want to continue the program: a. In English: Model I. (30 min) Building While-Loops from Pseudocode start time: b. As a Java boolean expression: Program #1 Specification: 5. If the while-loop Boolean matched the condition identified in Question 3, how would it evaluate for each of the following input values: a. positive number: You need to write a Java program that reads in a series of positive numbers and counts the number of inputs. After a non-positive number is entered, your program should report the number of positive numbers that were entered. b. Zero: C. negative number: Before writing the Java program, you should develop pseudocode for the algorithm. Pseudocode can be written in stages: your first draft might only provide general details about the algorithm. More specific details about the algorithm can be added with each consecutive draft. 6. If the while-loop Boolean matched the condition identified in Question 4, how would It evaluate for each of the following input values: a. positive number: First draft of pseudocode: b. Zero: Prompt the user with instructions Read in a series of numbers Count the numbers Report the number of positive numbers that are entered c. negative number: 7. Does the program specification in Model I (the first box) explicitly state when the program should stop or when it should continue? Critical Thinking Questions 1. Examine the first draft of pseudocode given in Model 1. a. What general details about the program have been captured by this first draft? 8. Should the while loop condition correspond to stopping the program (Question 3) or continuing the program (Question 4)? Provide your group's justification and give the Java code for the while-loop boolean condition (not the loop body). b. Give one example of a specific detail that is missing in this first draft. TIP: emphasize that while most students find it easier to think about when to stop a loop, the loop condition is actually when to continue the loop. 2. What type of control flow is needed for this program: sequential code only, conditional branching code (an if-statement) or looping code (a while-loop)? 9. Now consider the first time the loop condition executes. How and where will the loop condition get its value? a. In English (how and where): 3. Provide the condition that corresponds to when you want to stop the program: a. In English: b. In Java (just the line(s) of code): b. As a Java boolean expression: 10. Consider the second time the loop condition executes, how and where will the loop condition get its value? a. In English (how and where): b. In Java (just the line(s) of code): 11. Recall that the program must count the number of scores entered. In English, how will you add this functionality to the program? 12. Revise the pseudocode for the program by adding more details. Be sure to include the Java code you developed in Questions 8, 9 and 10. 13. In your own words, describe what parts of the loop are being addressed in your answers to Questions 8, 9, and 10. 4. Provide the condition that corresponds to when you want to continue the program: a. In English: Model I. (30 min) Building While-Loops from Pseudocode start time: b. As a Java boolean expression: Program #1 Specification: 5. If the while-loop Boolean matched the condition identified in Question 3, how would it evaluate for each of the following input values: a. positive number: You need to write a Java program that reads in a series of positive numbers and counts the number of inputs. After a non-positive number is entered, your program should report the number of positive numbers that were entered. b. Zero: C. negative number: Before writing the Java program, you should develop pseudocode for the algorithm. Pseudocode can be written in stages: your first draft might only provide general details about the algorithm. More specific details about the algorithm can be added with each consecutive draft. 6. If the while-loop Boolean matched the condition identified in Question 4, how would It evaluate for each of the following input values: a. positive number: First draft of pseudocode: b. Zero: Prompt the user with instructions Read in a series of numbers Count the numbers Report the number of positive numbers that are entered c. negative number: 7. Does the program specification in Model I (the first box) explicitly state when the program should stop or when it should continue? Critical Thinking Questions 1. Examine the first draft of pseudocode given in Model 1. a. What general details about the program have been captured by this first draft? 8. Should the while loop condition correspond to stopping the program (Question 3) or continuing the program (Question 4)? Provide your group's justification and give the Java code for the while-loop boolean condition (not the loop body). b. Give one example of a specific detail that is missing in this first draft. TIP: emphasize that while most students find it easier to think about when to stop a loop, the loop condition is actually when to continue the loop. 2. What type of control flow is needed for this program: sequential code only, conditional branching code (an if-statement) or looping code (a while-loop)? 9. Now consider the first time the loop condition executes. How and where will the loop condition get its value? a. In English (how and where): 3. Provide the condition that corresponds to when you want to stop the program: a. In English: b. In Java (just the line(s) of code): b. As a Java boolean expression: 10. Consider the second time the loop condition executes, how and where will the loop condition get its value? a. In English (how and where): b. In Java (just the line(s) of code): 11. Recall that the program must count the number of scores entered. In English, how will you add this functionality to the program? 12. Revise the pseudocode for the program by adding more details. Be sure to include the Java code you developed in Questions 8, 9 and 10. 13. In your own words, describe what parts of the loop are being addressed in your answers to Questions 8, 9, and 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!