b762c3a694a3b1f259427815a349b4bbb0378158

jpeg

School

Regent University *

*We aren’t endorsed by this school

Course

ER4

Subject

Computer Science

Date

Nov 24, 2024

Type

jpeg

Pages

1

Uploaded by HighnessRose18586

Report
Task 3 - Trace Table See the first Week 10 lecture slide set, slide numbers 15 and 19 with regards to using a trace table to test loop logic. Create a trace table that tests the nested loops inside of your printReport method based on your student number. Suggestion: Set a break point on the outer-loop of the printReport method. Then run the program with debugging and enter the numbers of your student number, excluding any zeros as these would not be accepted by the program. For example, a fictious student number like 080654311 would be entered into the program as separate numbers: 8 6 54 3 1 1 (one number per input loop). Then print the report from the menu which will enter the break perspective. You can use the variables window, and step-into each line in the loop (step over API calls) and record the changes in the loop counter variables, and record the program output. Each row in the trace table would be for an iteration of each loop, row by row. The table below is an example you can use as an example format; however, you will need to update the trace table bast on your student number. Also include your student number next to your table. The variable names used in the table are index, for the outer loop, and count for the inner loop. The table below uses the fictional student number above. - index | Enter loop? | Action(s) count | Enter loop? | Action(s) Notes 1 0 yes output index + 1 output label as 1 just before inner loop 1 yes output "*" | output *, values[index] has 2 2 yes output "*" | output a, * values[index] has 2 3 no none Loop should exit 0 In loop output output a new-line 1 yes output index + 1 output label as 2 just before inner loop 1 no none values[index] has zero, so do not loop 11 In loop output output a new-line 7. yes output index + 1 output label as 3 just before inner loop 1 yes output "*" | output *, values[index] has 1 2 no none Loop should exit 2 In loop output output a new-line 3 And so on...
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help