Results 1 to 14 of 14
  1. #1
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default hey guys, i need help

    ok, so i have this assignment dealng with creating classes, but with the instructions i was given i dont even know how to determine what my objects are. if you guys could help me out that'd be great, thanks. here are the instructions:

    "The Toys of the Future company has decided to issue a new line of toy robots. While they are not sure exactly what their robots will look like, they do know the functionality that they will all have. All robots will be able to go forward, turn right, turn left, spin and detect an object in front of it via a sensor. The robot will use a touch sensor to determine whether it has hit an object in front of it, such as a wall. The robot will have two, three, or four wheels, but it will only be driven by two of them: a right wheel and a left wheel. Each wheel will be attached to a motor that controls it."

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

  3. #3
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

  4. #4
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default

    ok, so here's what i've come up with:

    MOVEMENT
    -forward
    -left
    -right
    -spin

    SENSOR
    -object detection

    TOUCH SENSOR
    -wall detection

    WHEELS
    -left wheel
    -right wheel

    so how does this look?

  5. #5
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    You got alot alot of actions there... not a class description ( none that I can see anyway)

  6. #6
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default

    what do you mean?

  7. #7
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    I mean you got a few functions/methods

  8. #8
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default

    no, like, what do you mean by class descriptions?

  9. #9
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    code that accurately implements a noun i.e. all that the functionality it would expose to a user.

  10. #10
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default

    MOVEMENT
    it would probably ask whether it turns right, left, moves forward, or spins around.

    SENSOR
    it would ask whether it would detect an object in front of it.

    TOUCH SENSOR
    it would check to see whether it has bumped into a wall or not.


    also, here's the second part:

    Now, using the objects and classes that you have written, write a program for your robot that allows it to move in a large square. Allow your robot to run in a big two dimensional array and every time the robot encounters a square in your array, turn that square black.

  11. #11
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    Stop theorizing, get to implementing something.. then come back with questions.

  12. #12
    beta4 is offline Member
    Join Date
    Feb 2011
    Posts
    17
    Rep Power
    0

    Default

    thats kinda the whole reason i posted in this forum, because i ddnt know

  13. #13
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default nons

    I just meant try something see ho
    w far or close u are.u can theorize 2death.

  14. #14
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Hey guys!
    By Rewl in forum Introductions
    Replies: 0
    Last Post: 01-06-2011, 03:33 AM
  2. hi guys
    By pvsnmurthy in forum Introductions
    Replies: 0
    Last Post: 04-16-2009, 09:37 AM
  3. Hi guys,
    By pereira.lawrence.java in forum Introductions
    Replies: 0
    Last Post: 03-17-2009, 04:55 AM
  4. What's up guys
    By zuriick in forum New To Java
    Replies: 8
    Last Post: 02-06-2009, 05:39 AM
  5. Hello Guys...
    By balaram.bocha in forum Introductions
    Replies: 0
    Last Post: 02-03-2009, 07:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •