This is my first post, so hopefully I will get the code inserted/formatted where it is readable. I'm working on a class assignment; one that I didn't think I would have any problems with but I'm seeing some results that I can't figure out. I'm probably doing something dumb but I have not been able to spot it. I have two classes shown below. A Student class and a Main class (with a main method). I've got some debugging System.out.println statements inserted into the main method and into the setProjectScore() method in the Student class. I'm making a call to setProjectScore() which is setting the first element in an array to a value. However, when I return from the method call and print it out there, the value has changed (from 100 to -1).
Can anyone please tell me why the projects is set to a -1??
When I run it as it exists below I get the following output: