Cody Moss

Greenhorn
+ Follow
since Nov 20, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Cody Moss

Paul Clapham wrote:

That looks a bit odd to me. Did you really mean to use "toString(i)" there instead of "toString()"?



We are supposed to use a separate toString method to incorporate printf into the mix, I forgot to include it! Haven't written the printf yet, but the placeholder is below:



10 years ago

Carey Brown wrote:
All 50 slots of studentAry are probably not filled in, therefore, null;
Line 1: should be: i < count



Thank you so much! Worked like a charm

EDIT: but now nothing will print! Should I make a separate thread to figure out what's going on there?
10 years ago
Howdy all!

Working on a program that creates an array from a file, organizes it in various ways, and then prints the results. Right now I'm specifically having trouble with the printAry() method - when I try to run it, I receive a NullPointerException for the active line in printAry() (EDIT: line 102). Not sure which sections are important to this, so I will include the client class and most of the service. I'd really appreciate and help that could be provided I realize that the amount of documentation I included is not necessary, but it is required for the class.






10 years ago
Like I said, all the code I have is posted. That's why I'm confused that it says it is defined as having three variables - I can't find anywhere in the code where I stated that.
10 years ago
Thanks for all the welcomes and help everyone!

I do not have a constructor - everything I have posted so far is what I've got, at this point. Do I need one? What should go in it? I have used them before, but this is my first time using arrayList.

I have tried added 'throws IOException' and removing try...catch. Now my code looks like this:



and I am receiving an error message stating that

required: String,double,double
found: String,String,double,double
reason: actual and formal argument lists differ in length

when trying to create an object.
10 years ago
Hello! I am currently working on a program that will read from a .txt file to create an arraylist. I will be working with the objects in the list to perform computations and display the data. The .txt file is in the following format:

lastName firstName hoursWorked hourlyRate

With no delimiters. I've messed with this thing way too much in the last 12 hours (only day off for the week ) so variable names etc have changed often. If there are errors in the program due to that I profusely apologize! Any help would be greatly appreciated.

At present the error I am receiving is "error: constructor GrossPayService in class GrossPayService cannot be applied to given types". I understand what the error means, but not how to fix it. There may be other errors as well, but at present that is all my compiler is giving me.



10 years ago