Search:

Type: Posts; User: jack55655

Search: Search took 0.24 seconds.

  1. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    ok the new output is shown, as you see it fails to filter by only showing 1,1,2:2,2,2:RoomC::





    Checking rooms with getStoreyRooms()...[1,1,1:3,4,2:RoomA::, 1,2,1:5,4,3:RoomB::,...
  2. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    public Room[] getStoreyRooms(int storey) {


    storey = r.getZ();
    Room[] a = new Room[Storey.rooms.size()];


    System.out.println(Storey.rooms);
  3. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    I have tried the above no sucess, it still gives me a null exception.
  4. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    so to a different class?

    I have notice it reads the local constructor but i dont know how i would implement it to read the contractor with the data it needs, i believe the method is corrected...
  5. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    r is for RoomReference it reads the methond on the class that has getZ();


    public engine(String name,int budget)
    {
    s = new Storey();
    o = new Owner(name, budget, budget);
    h = new...
  6. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    I have created a new array on the method , as shown. String representation is needed to connect to other classes like roomReference by using the toString method.



    Below is code I done. r is...
  7. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    it runs though the RoomReference class.



    so RoomReference ----> Abstractroom <---- rectangleroom

    Room implements Abstractroom


    I have posted the UML,...
  8. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    yes, i have a room class and yes it is a representation of Room ,


    This is the AbstractRoom class it implements Room.

    Under AbstractRoom are the classes that contain the values of each element...
  9. Replies
    21
    Views
    2,706

    Re: Java help, passing/filtering a array

    I want to get any array to match with the data z > 1, So it will return from the method.

    Lets just say we have data populated in the arraylist.
    1,1,1:3,4,2:RoomA
    1,2,1:5,4,3:RoomB ...
  10. Replies
    21
    Views
    2,706

    Java help, passing/filtering a array

    Hello,
    I wont post the whole program because it is a lot of classes, interfaces and abstract classes.


    I am trying to filter a array by simply getting a value which is Z. The String...
Results 1 to 10 of 10