remo123's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 5 (0.01 per day)
- Joined:
- 13-October 11
- Profile Views:
- 129
- Last Active:
Oct 13 2011 07:34 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: how to use equals method in the Die class
Posted 13 Oct 2011
how can i insert equal method in my code -
In Topic: how to use equals method in the Die class
Posted 13 Oct 2011
public class Die
{
private int facevalue;
private final int Max=6;
private Random dieGen; // generator
public Die()
{
facevalue = 1;
dieGen = new Random();
}
//Math.random creates random integers from 1 - 6
public void roll()
{
facevalue = dieGen.nextInt(Max) + 1;
}
public void setFaceValue(int value)
{
facevalue=value;
}
public void getFaceValue()
{
return facevalue;
}
public String toString()
{
String result="you rolled " +facevalue;
return result;
}
} -
In Topic: how to use equals method in the Die class
Posted 13 Oct 2011
i need to use equals method in dice game i.e in Die class ,,pls suggest me some methods
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Click here to e-mail me
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
remo123 has no profile comments yet. Why not say hello?