Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard network printer problem ram registry router security slow software sound toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Software Development >
need help with java program

Reply  
Thread Tools
girlygirl78's Avatar
Junior Member with 1 posts.
 
Join Date: Nov 2008
Experience: Computer Illiterate
25-Nov-2008, 10:41 AM #1
need help with java program
I'm trying to make a roll dice game where the user can pick how many dice and how many rolls they want to do. I'm trying to print out a histogram type thing that will show the number of dice and rolls the user picked. If anyone can help it would be appreciated.
This is the part I'm having problems with.
/**
The showArray method accepts an array as an argument and displays
its contents. @param array A reference to the array.
*/
// The method for printing out the histomgram.
public static void histogram(int[] numdice)
{
final int ARRAY_SIZE = 7; //Size of the array
for (i=numdice; numdice; i < numdice * 6; i++)
{
System.out.print(i);
if [] == i;

// Create a Random class object.
Random randomNumbers = new Random();

// Calculate the answer
sum =numdice * 6 + numdice + 1;
r(6)+ 1;
(numdice -1) * 6;

// Create an array.
int [] numbers = new int[numdice * 6];

// Pass the array to the showArray method.
showArray(numbers);

// Display the array elements.
for (int index = 0; index <array.length; index++)
System.out.print(numdice * 6 + 1+ " " );
}
}
}
jdean's Avatar
Member with 427 posts.
 
Join Date: Jan 2002
Location: California
Experience: Software Developer
25-Nov-2008, 05:34 PM #2
If you have some specific questions you like to ask, then go ahead and post them, but we're not going to do your entire homework assignment for you.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 10:48 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.