Well now that the assignment is turned and finish, I can work on cleaning up the code and fixing some things you pointed out that wasn't related directly to the assignment. I am going to start the...
Type: Posts; User: Harrald
Well now that the assignment is turned and finish, I can work on cleaning up the code and fixing some things you pointed out that wasn't related directly to the assignment. I am going to start the...
Here is the final code:
public class PayrollClass
{
private String name;
private int numberEmployees;
private float avgSalary;
FIXED IT!!!! WOOT!!!!
I'm stumped...
Nevermind... That didn't work. It is still returning the initial values...
HA!
A simple of swapping the variables looks like it worked. instead of className = name; name = className;
The initial values get returned...
Oh and nevermind. I get a value of 0.00USD for the total... I'm missing something in the variable dance...
The P was supposed to be for PayrollClass, as in the variable of name that is in the PayrollClass, PName. Guess it only made sense to me lol.
I thought the PName was set in the constructor? PName...
Completely revamped code.
Here is the class:
public class PayrollClass
{
private String name;
Modified the constructor yet again by removing the variable types in the parameters. That took care of that.
However I have 3 new errors.
error: Constructor PayrollClass in class PayrollClass...
Modified the constructor to include commas since there are multiple parameters...
but now I get 6 errors. The three from before including three saying illegal start of expression.
Here is the other part, the class with the main method.
// Thomas Harrald IT215
// Checkpoint Payroll Program Three
//Use a Class to Store and Retrieve Dept Name, Number of Employee, avg...
Fixed the Class that will be used in the main method.
public class PayrollClass
{
private float totalDept;
private String name;
private int numberEmployees;
private float avgSalary;
Ok, If I'm not mistaken this is a 2 part assignment. 2 separate files.
Here is one of them, the class that will be used to create an object.
public class PayrollClass
{
private float...
Yep thanks for the tips.
I actually think the assignment is a lot easier than I was making it.
I am working on it currently.
It's horribly wrong. I'm in the process of trying to figure it out. I think I'm nuking it...
I can't tell you specifically what's wrong because I don't really know what is wrong with it lol, if...
I have been racking my brain trying to understand this fundamental concept and It is tearing me apart. Here is what I am supposed to do for my assignment:
Modify the Payroll Program so that it...