All things are lawful, but not all things are profitable.
Junilu Lacar wrote:On lines 14 and 15 of your "driver" program, you're already using the Die class.
Did you not write this driver program? If you did, you really should format and indent it properly. Your program looks worse than a crooked fence: https://www.flickr.com/photos/raisinsawdust/2236667428
Improper formatting and indentation is very bad form. It makes your code less or unreadable and it creates a greater likelihood for bugs to be present in the code.
Junilu Lacar wrote:One problem that you'll want to fix is your Die class declaration. On line 3, you declare a Die1 class. On line 10 you try to declare a constructor using a different name, Die. The class name and the constructor names must match. In your driver program, you are using the name Die. So, decide which name you want to use, Die1 or just Die, then use it consistently.
Ed Palazo wrote:
I KEEP GETTING THESE COMPILE ERRORS
Junilu Lacar wrote:
Ed Palazo wrote:
I KEEP GETTING THESE COMPILE ERRORS
Please don't use all capital letters; it's equivalent to shouting and it's considered rude. Ease up and chill out. Otherwise, you'll be put on probation.
Ed Palazo wrote:
now I'm getting just one error when I try to compile driver.
Junilu Lacar wrote:
Ed Palazo wrote:
now I'm getting just one error when I try to compile driver.
Look at the method name that you're trying to invoke. Is that the actual name of the method (it can't be because method names can't start with a number)? What's the actual method name then?
All things are lawful, but not all things are profitable.
Junilu Lacar wrote:Your implementation does not match the requirements. If the requirements say you're supposed to "send the method a pair of dice" then why are you declaring methods that take a pair of int instead?
All things are lawful, but not all things are profitable.
Knute Snortum wrote:I suspect you don't have the Die class in the same folder as program4. That is probably the easiest solution. Otherwise you'll need to use package names.
All things are lawful, but not all things are profitable.
Ed Palazo wrote:
Junilu Lacar wrote:Your implementation does not match the requirements. If the requirements say you're supposed to "send the method a pair of dice" then why are you declaring methods that take a pair of int instead?
I kinda understand what you are talking about. so what is the correct way of fixing this and can you be a little more descriptive of the problem?
| Don't get me started about those stupid light bulbs. |