David Maddox

Greenhorn
+ Follow
since Feb 25, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Maddox

I am trying to write a program that demonstrates a linked list (yes it is homework). In the specs, the requirement is that the user is supposed to type the end of file character to signify when they are done entering names. I can get it to run perfectly if I have the user type in a signifying phrase ("DONE"), but I cant figure out the end of file part.


Here is the whole program:




Specifically, here is the part where I am reading in their input:




Any suggestions to point me in the right direction would be massively helpful.
13 years ago
I have never used command line arguments before, so I am having a little difficulty.

Essentially what I am trying to do is have this program when there are no arguments, the program runs in a certain mode, and when it has certain arguments to run in different modes:

No arguments: Human v Human
-c: Computer v Computer
-c 1 Computer is player 1
-c 2 Computer is player 2


When I try and run the program in its current state, I am getting an array index out of bounds exception. Here is the main function:



Thank you for your help!
13 years ago
Im trying to write a program so that it runs in commnad prompt. I would liek to have it change text colors in it how would you do that if possible
19 years ago
I am writing a program about the stock market. I was wondering if there was a way to change the output of your program in command prompt(i.e. stock goes down turns red) if so how
20 years ago
I am writing a stock sim for a class project and i was wondering if there was a way to change colors of the text when you run it in command prompt(i.e. when a stock goes down turn red)
20 years ago
does n e one here kno where to go to get the slime athlete code or even just how to write
20 years ago
I am trying to create a Midi program and i was wondering if their was a good place to get a list of the instruments available and their numbers. Someone help
20 years ago
what the error means is that it cannot find the class file. Make sure that your path is correct
20 years ago
yeah i hit the wrong button
20 years ago
ok here is an example
public class Dog{
public void bark(){
}
}

public class dogTest{
Dog dog= new Dog(); /*you create a dog object and it has all of its methods/*
dog.bark();
}
[ February 26, 2004: Message edited by: David Maddox ]
[ February 26, 2004: Message edited by: David Maddox ]
20 years ago
i read the page, but it does not explain how to run a jar file from outside of the command line. If i want to give a program to afriend but he doesnt have the compiler(so he doesnt have the jar flag) how would i do it?
20 years ago
Ok. I have just written a program but every time i want to run one i have to do it through command prompt by typing all the like " java whatever" Is there some way i can make a java file where all i have to do is double click it and it runs? I mean like turn a Java file into an exe file. I tried jars but they dont double click
[ February 26, 2004: Message edited by: David Maddox ]
20 years ago