Skip to main content
Antonio Ricardo Diegues Silva's user avatar
Antonio Ricardo Diegues Silva's user avatar
Antonio Ricardo Diegues Silva's user avatar
Antonio Ricardo Diegues Silva
  • Member for 11 years, 8 months
  • Last seen more than 11 years ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
accepted
accepted
comment
Playing Card Class - is this right?
@Nate Thank you for you help in understanding the exercise. I see now that it was int all along that they wanted, so I'll atribute those to my Switch Cases (like switch (numNaipe) { case COPAS: return "Copas";) and will work from there. Your Portuguese is really admirable... yes I had that comment in Portuguese wrong - it was late and I was getting very sleepy :) - I will also correct it ofc! Thank you very much for your input, I learned something new today!
comment
Playing Card Class - is this right?
@RobertSnyder The Book where I did this exercise still hasn't made any mention of Enums so I'm pretty sure they aren't meant to be used in this case.
revised
Playing Card Class - is this right?
added 18 characters in body
Loading…
awarded
revised
Loading…
asked
Loading…
comment
Simulating the radioactive decay of atoms using a random number generator
As for creating a class just for the logic that seems an interesting idea but I'm just learning to build java classes. Ill keep that idea in mind as I'll progress in my studies! Thanks to both of you for your input!
comment
Simulating the radioactive decay of atoms using a random number generator
"You've violated Command-Query Seperation. atomicRed changes the state of the object, and so it really shouldn't return information about the object. It certainly shouldn't appear in the middle of a print a call." - Why is this bad? Does it make the code harder to understand or is prone to bugs?
Loading…
comment
Coin flipping code
Uau! I wasn't aware you could insert boolean results with a ? : conditional statement inside the println itself! That was a eye opener! Indeed that code like this is simpler and more clear! Ty, I learned something nice today! ps. - I still didn't learn how to format Strings - i'm doing the Stanford University Course, that's why I only use Concatenation yet. Im sure to use it once I learn more :)