Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Flowchart HElp

  1. Feb 10, 2005 #1
    hey.. taking a Intro-to-programming course and have to do 2 flocharts for homework. ( i need to include a decision in each flowchart ) . i'd apprecate it if someone could tell me if what i have done is correct or not..

    !) Draw a flowchart to get a haircut

    Get in Car
    drive to hairdresser
    Tell barber to cut hair in a style of your choice
    Sit on a chair and let barber cut your hair.


    Is barber is done cutting hair


    Kepe sitting ... Link to the flowline between "sit on a chair and let barber cut your hair" and decision box.

    yes :

    pay the barber

    get in car and drive home


    2) Writing a letter:

    Take pen and sheet of paper
    Write a rough draft of the letter


    Is the rough draft framed well ?


    review rough draft and make appropriate changes ( and then link this to the flowline between "write a rough draft of the letter" and the decision" )


    Make the final copy from the rough draft



  2. jcsd
  3. Feb 11, 2005 #2
  4. Feb 11, 2005 #3
    The description is OK. In the first case say that the customer can wait for a short interval of time while his hair is being cut, till we go to the decision diamond again. Otherwise it seems like an event driven algorithm.

    Do you have your activity diagrams to show us?
  5. Feb 11, 2005 #4
    doesnt "Sit on a chair and let barber cut your hair." technically mean the same as "wait for a short interval of time ..." ... or are you saying that i should replace the former with the latter?

    wht do u mean by activity diagrams? I dont have a scanner to scan the flowcharts that i have prepared..

    thanks much!
  6. Feb 12, 2005 #5
    Well, because flowcharts show a sequence of well defined steps in an algorithm, 'stay sit on the chair and wait' is not a definite action. You could just mention an interval of time such as 5 seconds.
    By activity diagrams I just mean the flowcharts (UML term for flowcharts).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook