nathan gibson

Ranch Hand
+ Follow
since Sep 16, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nathan gibson

im working on finishing this project up. im getting the right output and everything, i really dont understand how though.

my last leg to complete is to finish the two methods i have been having trouble with all along. at this point im begging for some insight. i have been looking at examples, but i cant fins any that fit my specific situation. im going to keep looking. if anyone can help me out with this, thanks.
14 years ago
im making progress with my methods in my tester class:

my only problem is the last line in my insert student method. "list[location] = new student(addN, addS);" where student is giving the error cannot find symbol consructor student. so far that is my only error in this class, but i cannot find the problem.

14 years ago
just an update, im changing the arraylist to an array, like so:

sorry, just noticed i have to do two versions, one with array && the other with list.
14 years ago
thanks campbell for the good reply, also after my class im thinking about picking that book up. i thought my program through and made some very necessary changes. im hoping that you guys will have mercy on me. i have fixed my code up to here.

from here i have fixed my array and my instance variables. now precisely what im trying to accomplish is:

The setQuiz method needs to accept a quiz number and the score for that quiz.

getQuiz accepts a quiz number and returns the score for that applicable quiz.

the reason im having trouble with this is that i have 5 quizzes for 5 different students. im not sure how to write the method that it returns the way im trying to get it to. thanks if anyone can help me get this sorted out.

14 years ago
i have been trying to think my way through the parts i dont understand. i changed my array, and i think it is for the better:

im still really struggling. some tips as of what direction to go in would be a life saver. i have been waiting diligently for replies. appreciation goes out to anyone who can help.
14 years ago
i have tried to use all the suggestions listed. the main thing that is confusing me is how i am going to get my methods to work with receiving my data from my arrays. i have used cases to try to get my methods to be able to select the needed data to return... its really a shot in the dark, so if that wont work im open to any suggestions. also i have set up a multi- dimensional to hold my students and their grades, same shot in the dark. im trying my best, but there is alot about this that i dont really understand. im more confused about the way to go about how to solve this, than the actual java part of it. anyways, here is my current code:

14 years ago
im working on a program that makes something like a grade book. i have to use several algorithms. i have attached a copy of the instructions to save myself some typing. my basic questions are: is the way im doing this a way that will work? i have been following the instructions, along with examples from other sources to try to put this together. my efforts are sometimes lacking at best, but i dont really have a way of knowing what is wrong or what is right. so here is the code.

i know this isnt really alot of code, but i wanted to make sure i was getting off on the right foot before i got too deep and wasted alot of time. if anyone has feedback, tips, or advice i would love to hear them. thanks to anyone who can help.


----------------------- Page 1-----------------------

16.05 Assignment Instructions

Instructions: For this assignment, you are going to use all your standard algorithm methods.

1. Create a folder called 16.05 Assignment in your module 16 assignments folder.

2. Create an abstract class called Student.

a. Student will need instance variables name , qz1, qz2, qz3, qz4, and

qz5 (of types String and int, respectively).

b. Student will need appropriate methods and constructors. To make things

interesting, create a getQuiz() method that takes in a quiz number as input and

then returns the appropriate quiz value. Likewise, setQuiz() will take as input

a quiz number and quiz score, and then put the value into the right variable. Make

sure to have a toString() method that prints the name of the student along

with the quiz scores.

c. Save the class as

3. You are to create a class called TestStudent and save it as

a. Make sure that you create an array called myClass. Add the following students

with their quiz scores.

Candidate Q1 Q2 Q3 Q4 Q5

Mark Kennedy 70 80 90 100 90

Max Gerard 80 85 90 85 80

Jean Smith 50 79 89 99 100

Betty Farm 85 80 85 88 89

Dilbert Gamma 70 70 90 70 80

b. Create a method called printBook() that traverses through the array and prints

out each element.

c. Create a method called replaceName() that replaces a student’s name with a

new one.

d. Create a method called replaceQuiz() that replaces a student’s quiz grade

with a new one. It should replace only one quiz grade, as indicated, when it is

called. It will have the array, quiz number, and quiz value as input.

e. Create a method called replaceStudent() that replaces a student with

another one. It will have the array, name to replace, new student name, and quiz

scores as input.

f. Create a method called insertStudent() that inserts a new student before

another student in the array. It will have the array, name to find, new student

name, and quiz scores as input.

g. Create a method called deleteStudent() that finds a student by name and

then deletes that student.

h. Remember to make sure your methods handle there being null elements in the


i. Test your methods. The output should be similar to that shown below:

----------------------- Page 2-----------------------

----------------------- Page 3-----------------------

4. Now create a class TestStudent2 and save it as

a. Create the same items as for TestStudent; however, use an ArrayList instead.

b. Output will look similar to that shown below.

----------------------- Page 4-----------------------

----------------------- Page 5-----------------------

14 years ago
im kind of on that track. im working with a nested loop.

i dont know if it helps, but with this full code:

my output is attached. its like not making since to me at this point. i know that the for loop inside has a weird counter, but i wasnt exactly sure what i would use. if anyone has advice it would be very much appreciated

14 years ago
i tried something of that order on my second post with code. i got very strange results with that. i have tried most of the obvious. the output with that code was something like the bug would make like a half circle and stop...

14 years ago
i have tried placing the move method in lots of places, but i always get strange output. sometimes the bug just jumping across the screen.
14 years ago
well, i have gotten this far. i can make it take the number and turn. what i am trying to achieve though is for the bug to turn the number of times that it needs, move and repeat. i have the turn method in the right place, but im having trouble figuring out where the move method fits in.
14 years ago
alright, sorry for not giving 100% detail. sometimes it is difficult to format a question to make sense.


im writing a class that makes the bug "dance." i have to make a constructor that has an integer array as a parameter. the integer entries represent how many times the bug turns before it moves. when a dancing bug acts it should turn the number of times given by the current array entry. each move should carry out the next number in the array. after carrying out the last number in the array the bug should start over again, so that it continually repeats the same "dance" over and over.

overall the main thing is that, the dancingbugrunner should create an array and pass it as a parameter to the dancingbug constructor.

control statements arent really my problem. my problem now is that i am trying to get my bug to dance. i have gotten it to turn, but i cant get it to turn the amount of times that it is supposed to, move, and then turn the next number etc.

if anyone knows anything that would help it would be appreciated.

14 years ago

im trying to make an array list with some numbers, i want to use the numbers in the arraylist to tell a method how many times to run. with code it will make sense.

i know the thing i did with turn() * length is incorrect, obviously. what i am trying to figure out is how to do something similar to this. if anyone has any ideas they are greatly appreciated.
14 years ago