Originally posted by Michael Hubele:
Like bits and peices make sense but most of it does not.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
-----------------------
I don't understand
------------------------
What is the constructor and what are methods
--------------------------
public int roll()
{
faceValue = (int) (Math.random() * MAX) + 1;
return faceValue;
}
Like first I don't see how someone would know to cast this as a int. Then I don't know what is going on. To me it looks like instead of importing the random libary at the top they threw it all in the same line then for some reason they times it by MAX(6) then plus 1
then they return the faceValue;
-----------------------------
-----------------------------
public void setFaceValue (int value)
{
}
I don't understand why this is empty like I know in the other file something gets set to 4 by using this method but I would have though something would still have to go in here and I am not sure why there is (int value) in brackets there.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
if you see ********************** that means I got a question to ask at that part
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Can be shorthened to :
As far as your equals method first look at the method signiture that your requirements specify:
public boolean equals(Name otherName)
Don't change that. Your'e on the right track just think about what you are trying to compare:
As for the initials, read the API documentation, or your textbook's notes on the substring() method of String class and see if you can figure this one out.
Finally for the length think about what you want to do in real words, and then turn that into java syntax. i.e. (again in pseudocode):
I say you're on the right track, just needs a few more tweaks
[ January 29, 2006: Message edited by: Garrett Rowe ][/qb]<hr></blockquote>
Don't understand can u explain in more detail.
with the equals I still am not sure I been playing around with it but still nothing
this is what I have at this time.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter