tyler naughton

Greenhorn
+ Follow
since Mar 15, 2011
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 tyler naughton

Hi, I'm having trouble with my current program here. We are supposed to find a path out of a maze using a coordinate class. We have to create coordinates and then push them onto a stack. At the end we have to pop the stack to get the path coordinates. I am having problems backtracking in my while loop. I can get all the way to that but when it hits a dead end I can't figure out how to pop the stack and take the coordinates from the previous space and apply them to the loop. If anybody could help me out that would be great. I have included the coordinate class as well as some sample mazes. Thanks.

I think the problem is in this while loop (line 152)

Program Maze....

Coordinate class...


DynamicStack class
13 years ago
Sorry about that, I won't do it again. I took your suggestion and tried running my code with
that line implemented and it worked. Thank you for the help!
13 years ago
This code should create an array of Student objects where each Student object contains fields consisting of the first name, last name and average score for the 3 exams. It will then iterate through that array and print out the values of those fields. I can't change anything in the "main" method because it's part of an assignment. I'm getting a NullPointerException on line 59. I can't figure out what why I'm getting this error.

Exception in thread "main" java.lang.NullPointerException
at ProgramIII.populateStudentArray(ProgramIII.java:59)
at ProgramIII.main(ProgramIII.java:33)




Here is the Student class...


This is the format of the file I'm supposed to read from. It will not change.

2

Joe
Student
80
90
100

Jill
Student
85
95
100

If anybody could help me out that would be great. Thank you!
13 years ago