Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Code compiling, but nothing printing out  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried debugging on my own, but it's been 3 hours so I'm hoping a fresh pair of eyes can shed light on my (probably obvious) mistake. Any suggestions?

DRIVER:


ABSTRACT CLASS:

BASIC INTERFACE:

ARROW INTERFACE:


ARROW:


 
Bartender
Posts: 2155
46
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your method drawShapeOn is printing spaces and newlines.
What else did you expect? What is your desired output?
ItDoesntWorkIsUseless <- click this
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which method do you think should be printing something? From a cursory glance it would seem that BasicShape.drawShapeOn and BasicShape.drawShape should be printing a bunch of line breaks and spaces. I don't see the methods in RightArrow (which would print non-blank characters) being called anywhere.

Did you mean for RightArrow to override the drawShape and/or drawShapeOn methods?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!