- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
10 Posted Topics
I'm not sure of the best way to do this exactly, but I doubt you would actually have to create 30 separate classes. Think of ways you could simplify things. You probably don't need a "name" class, since you could just make the name a string. Since it's an insurance …
What doesn't work? Does it give you an error? Or does it just not function properly? what does it do?
It doesn't like the way you reference the inventory array because in your method signature you don't properly state what the parameter is. Your code: [CODE] private void printArray(inventory[]){ for (int i = 0; i < inventory.length; i++){ System.out.println(inventory[i]); } } [/CODE] What it should be: [CODE] private void printArray(Video[] …
I'll give you a few pointers to get started, but you'll learn a lot more if you actually write the code yourself. I'd started by summing up the total of the first list and storing it in a variable. Then you would probably want to loop through the first list …
Running great for me as well, have yet to encounter any problems. -Michael
If you know that there will always be a newline there, you could just splice the string that is returned. text[0].split('=')[1][:-1] that should work. This takes everything but the last char which is the newline. -Michael
That code looks like you are on the right track, however, I'm not so sure about the "Miles++ and Gallons++" part. Instead of incrementing them, don't you want to add the values input to those variables? Also, you might want to create some separate variables to keep track of the …
Ok, I'll throw out a couple of tips to try and straighten things out. First, I think his method declarations are fine, he's not declaring the method as an array, he's declaring the return type as an array, which is perfectly fine. However, you need to be careful about the …
Isn't Vector a generic class? You would have to define the generic type when you create the new vector. Judging by your code you would want something like: [CODE] Vector<DoctorData> dataList = new Vector<DoctorData(); [/CODE] Does that fix the problem? ...I'm pretty sure vector is generic...
Which line is causing the error?
The End.
Mikeyp926