• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Code compiling, but nothing printing out

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2236
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic