remo123's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
5 (0.01 per day)
Joined:
13-October 11
Profile Views:
129
Last Active:
User is offline Oct 13 2011 07:34 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   remo123 has not set their status

Posts I've Made

  1. In Topic: how to use equals method in the Die class

    Posted 13 Oct 2011

    how can i insert equal method in my code
  2. 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;
    }
    }
  3. 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

Comments

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