Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: State UML Diagram

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default State UML Diagram

    I have no idea how to solve this problem and having seen this forum outstanding performances in resolving problems presented by other users in the past, I considered it an avenue to get help and also learn. I believe you'll help me and put me through how to go about this and solve similar problems in the near future. My question is as follows:
    Consider a walking robot that has two legs and two arms. The robot walks towards a screen that has three buttons (red, yellow, and green). On the path towards the screen, there is a chair that blocks the robot. The robot observes the chair and make a left turn of 80 degree, walk 20 cm and make right turn of 100 degree walk forward (to the screen). To reach the correct position, after 40 cm, additional adjustment of 100 degree to the right is needed. After 15 cm, robot makes left turn of 160 degree towards the screen and finally reaches it. The robot lifts left arm and uses color sensor to detect the color on the screen, put down the left arm and lift right arm to press button based on the detected color of the button. Now, I'll like to prepare a state diagram of the above scenario using correct UML notations.
    Please kindly assist me and put me through.
    Thanks.


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 139 Times in 134 Posts

    Default Re: State UML Diagram

    You will want to decompose the problem into its smaller parts. What classes (nouns) will Robot possibly have? Think of the physical attributes that make up this Robot. What behaviors (verbs) will these attributes (or nouns) need? These will be the methods of the classes. This should be the starting basis of your class descriptions and eventually UML diagram.

  3. #3
    Member
    Join Date
    Jul 2012
    Posts
    71
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Default Re: State UML Diagram

    what do u think your main class of moving a robot would be called? what instructions should be given to that class (these would be helper the classes on the diagram).... should the degree rotation and movement instructions be in the same class or should they be separate? how would you instruct the robot to detect if an object is blocking its path or not? all of this should be considered when mapping out your diagram

  4. The Following User Says Thank You to C++kingKnowledge For This Useful Post:

    curmudgeon (November 18th, 2012)

Similar Threads

  1. UML Diagram
    By calebite207 in forum Member Introductions
    Replies: 0
    Last Post: September 21st, 2012, 06:42 PM
  2. UML diagram
    By EonsNearby in forum Java Theory & Questions
    Replies: 1
    Last Post: August 26th, 2012, 09:00 PM
  3. Java UML diagram question
    By colerelm in forum Java Theory & Questions
    Replies: 1
    Last Post: November 29th, 2011, 08:50 PM
  4. UML Class Diagram
    By LDM91 in forum Java Theory & Questions
    Replies: 4
    Last Post: December 27th, 2010, 12:04 PM
  5. UML Diagram Help
    By chizzle in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 15th, 2010, 05:12 AM