Results 1 to 2 of 2
Thread: Calling on other class methods?
- 10-06-2012, 11:27 PM #1Member
- Join Date
- Oct 2012
- Washington State
- Rep Power
Calling on other class methods?
Hey I'm new to java, and haven't quite figured out some of the class workings...
I'm being asked to create a class called PairOfDice that will create two objects by rolling a pair of dice. Then I need a driver class called BoxCars to operate PairOfDice 1000 times. I don't really know how to call upon the PairOfDice class within the BoxCars class in order to get the two objects. Any help would be greatly appreciated!
Re: Calling on other class methods?
BoxCars will hold a PairOfDice variable which will reference a PairOfDice object. You will call the method on the PairOfDice variable.
- By Aaron5466 in forum New To JavaReplies: 4Last Post: 04-16-2012, 12:36 PM
- By JGBowers in forum New To JavaReplies: 16Last Post: 11-25-2011, 02:18 PM
- By new2java2009 in forum New To JavaReplies: 1Last Post: 11-15-2011, 11:47 PM
- By javanator in forum New To JavaReplies: 1Last Post: 03-20-2010, 07:19 PM
- By mikeiz404 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:10 AM