Search:

Type: Posts; User: Swen

Search: Search took 0.30 seconds.

  1. Replies
    1
    Views
    389

    Changing al instance variables at once?

    Can it be done? Change an instance variable for al the object from a class at once? Without making it non static?
  2. Replies
    24
    Views
    768

    Re: Looping method problem.

    But won't that only work when I put it in the IDier interface?
  3. Replies
    24
    Views
    768

    Re: Looping method problem.

    It does... that's to bad. Thank you!

    So what's a solution to keep track wich IDier[x][y] has already gone trough the move method?
  4. Replies
    24
    Views
    768

    Re: Looping method problem.

    But I cannot change the interface. I put the boolean in dier wich implements IDier. so on a ecosysteem[x][y] there should be a Dier class found.
  5. Replies
    24
    Views
    768

    Re: Looping method problem.

    ecosysteem's type is an IDier[][].
  6. Replies
    24
    Views
    768

    Re: Looping method problem.

    but the content of the IDier[][] ecosysteem are object of those classes?
  7. Replies
    24
    Views
    768

    Re: Looping method problem.

    Ecosysteem.java is a class that has a constructor for the IDier[][] ecosysteem. These methods are only in Konijn and Vos.
  8. Replies
    24
    Views
    768

    Re: Looping method problem.

    ecosysteem is an Idier[][] created in Ecosysteem.java.
    It doenst have a getVerplaatst method. I put that in Vos.java and Konijn.java.
    These are the methods:
    public boolean getVerplaatst(){return...
  9. Replies
    24
    Views
    768

    Re: Looping method problem.

    I've put the methods in Konijn and Vos. When compilating I get this error:
    estrun.java:16: cannot find symbol
    symbol : method getVerplaatst()
    location: interface IDier
    ...
  10. Replies
    24
    Views
    768

    Re: Looping method problem.

    Maybe make a method getBoolean and setBoolean within ecosysteem.java?
  11. Replies
    24
    Views
    768

    Re: Looping method problem.

    Alright I'll sum, it up.

    Two interfaces,
    Idier.java - This is the interface for the animals
    Dier.java - implements the IDier interface
    Konijn.java - extends Dier.java
    Vos.java - extends...
  12. Replies
    24
    Views
    768

    Re: Looping method problem.

    I have an other question however:
    I got an interface, IDier(Ianimal), wich is implemented by Dier(animal), wich is extended by Vos(fox) and Konijn(rabbit). I need to keep track of the Foxes and...
  13. Replies
    24
    Views
    768

    Re: Looping method problem.

    I have figured it out. The problem is that it doesnt generate new random numbers so it won't be true. Solved! Haha thanks anyways!
  14. Replies
    24
    Views
    768

    Looping method problem.

    Hello everybody! I'm new to this forum and also not very experienced in Java. I follow it as a course in my study!

    I'm currently working on a assignment wich is to create an ecosystem.
    I need a...
Results 1 to 14 of 14