Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Not all tests passed. 1 : Compare output Program generated too much output. Output restricted to 5 0 0 0 characters. Check program for any

Not all tests passed.
1: Compare output
Program generated too much output.
Output restricted to 5000 characters.
Check program for any unterminated loops generating output.
Output differs. See highlights below.
Input
3
Your output
Exception in thread "main" java.lang.StackOverflowError
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
Expected output
+-----+-----------+
| i | i * i * i |
+-----+-----------+
|1|1|
|2|8|
|3|27|
+-----+-----------+
2: Compare output
Program generated too much output.
Output restricted to 5000 characters.
Check program for any unterminated loops generating output.
Output differs. See highlights below.
Input
5
Your output
Exception in thread "main" java.lang.StackOverflowError
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
Expected output
+-----+-----------+
| i | i * i * i |
+-----+-----------+
|1|1|
|2|8|
|3|27|
|4|64|
|5|125|
+-----+-----------+
3: Compare output
Program generated too much output.
Output restricted to 5000 characters.
Check program for any unterminated loops generating output.
Output differs. See highlights below.
Input
2
Your output
Exception in thread "main" java.lang.StackOverflowError
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
at PrintTableDemo.printBody(PrintTableDemo.java:17)
at PrintTableDemo.printRow(PrintTableDemo.java:24)
Expected output
+-----+-----------+
| i | i * i * i |
+-----+-----------+
|1|1|
|2|8|
+-----+-----------+

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

Under what circumstances are composite primary keys appropriate?

Answered: 1 week ago

Question

9. Describe the characteristics of power.

Answered: 1 week ago