Question: Please help with all and show steps COS 125 Assignment #4 Due: Friday 9/29/17 Late: Friday 10/6/17 Name Lll Cacte Assignments should be submitted to

Please help with all and show steps  Please help with all and show steps COS 125 Assignment #4
Due: Friday 9/29/17 Late: Friday 10/6/17 Name Lll Cacte Assignments should be
submitted to Blackboard by the due date. Submissions after Friday 9/29 will
be marked late with a 15 point penalty. Submissions after Friday 10%

COS 125 Assignment #4 Due: Friday 9/29/17 Late: Friday 10/6/17 Name Lll Cacte Assignments should be submitted to Blackboard by the due date. Submissions after Friday 9/29 will be marked late with a 15 point penalty. Submissions after Friday 10% are not accepted. ) with answers to PartI questions and the sereen shot of program output. Part I. (20 pts.) The user enters an upper case letter and the code displays that letter and all others through letter Z. public statie void main) { Scanner scan = new Scanner(System.in); char letter; do System.out.print ("Enter a letter A-Z:"" letter scan.nextLine).charAt(0); while Di for G letterZ'; letter++) System.out.printin (letter); scan.closeO; 1. Write the do loop test so the code repeats on bad data. The user is requested to enter a capital letter 2. The user enters three letters: m zS with one letter for each pass of the loop. The do loop makes passes. b. 1 C. d. 3 e. infinite 3. The output section uses a for loop. Which statement is not true about this decision? a. If the user enters letter A, the for loop will iterate 26 times. b. If the user enters letter Z, the for loop will iterate zero times. c. Since the loop iterates for a specific number of times, the for loop is most appropriate. d. By using the printin method in the loop body, each letter displays on a separate line. 4. Why does the for loop use null statement; as its first piece? a. The initialization is the statement: letterz b. This for loop has no loop test so this piece is left blank. c. A for loop only requires two pieces, the loop test and the increment. d. There is no explicit initialization value since letter received its value earlier in the code

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!