• 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

Help with these errors

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the code I'm trying to compile.

That's the constructor method, and here's the main:

With that I keep getting the errors:


[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ October 28, 2003: Message edited by: Dirk Schreckmann ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The first error would seem to indicate that your addDimes method is defined more than once in your class. And a quick inspection of your code indicates that that is indeed the case. If you actually read the error messages, they usually tell you what the problem is.
bear
 
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
John,
There are some minor problems inside your code
1. extra ";" around method declaration causing it become abstract

2. the addXXX method should has a int parameter count

3. addDimes() was defined twice which one should be addQuarters(int count)
<problem from copy/paste ? >
try to fix these in Purse you should be OK.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, John Walker!
Note that you can copy the text from a windows console. To do so, right mouse click on the title bar, go to Edit -> Mark. Highlight the section of text you'd like to copy. Then right mouse click on the title bar again, go to Edit -> Copy and the text contents will be copied to the clipboard.
Now, about that name. Is that your real name? We don't require real names 'round these parts, but we don't let suspiciously fictitious ones slide without comment. Your display name reminds me of a girl and a party in a cornfield outside Frankfurt, Germany. I won't bore you with the details of my story. I'll just ask that you change your display name if it ain't real.
Hope to see you 'round the Ranch!
 
John Walker
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all of the help, I got it to work. And yes this my real name thanks.
reply
    Bookmark Topic Watch Topic
  • New Topic