Search:

Type: Posts; User: Junky

Search: Search took 0.08 seconds.

  1. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    Yeah the only times it "does work" is when you try setting the same value. Because you code does nothing it seems like it works. Post 17 gave you a BIG HINT.
  2. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    No it doesn't!

    --- Update ---



    public class TestStudent
    {

    public static void main(String[] args)
  3. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    Try calling setQuiz before getQuiz and then tell us if it works.

    By that i mean use this line instead of your commented out one:
    k.setQuiz(1, 50);
  4. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    Then look at your code and see what variable is being assigned to what. BIG HINT:
    grade = qz1 is wrong. What is the only other possibility?
  5. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    No it's not. Test your code, print out variables to see what values they have before and after something happens.
  6. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    Take a close look at your setQuiz method. If you pass in 5 as the grade parameter, what happens to that value?

    The getQuiz method is simply the reverse of setQuiz (providing you get the logic...
  7. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    What happened when you tried?
  8. Replies
    27
    Views
    2,298

    Re: StudentQuizzesObject

    If you cannot use any sort of data structure then your only option would be a long if statement.
Results 1 to 8 of 8