Creating Flowcharts for Homework

  • Thread starter Thread starter jai6638
  • Start date Start date
  • Tags Tags
    Homework
AI Thread Summary
The discussion revolves around creating flowcharts for an Intro-to-Programming course, specifically focusing on incorporating decision points. The first flowchart outlines the process of getting a haircut, including a decision on whether the barber is done, while the second details writing a letter with a decision on the quality of the rough draft. Participants suggest that the action "sit on a chair and let barber cut your hair" could be more precise by specifying a time interval. The term "activity diagrams" is clarified as a UML reference to flowcharts, emphasizing the need for well-defined steps in algorithms. Overall, the conversation highlights the importance of clarity and precision in flowchart design for homework assignments.
jai6638
Messages
263
Reaction score
0
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

Start
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.

Decision:

Is barber is done cutting hair

No:

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

Stop
_____________________________________________________

2) Writing a letter:

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

Decision:

Is the rough draft framed well ?

No:

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" )

Yes:

Make the final copy from the rough draft

Stop

________________________________________________________





thanks
 
Physics news on Phys.org
anyone...?
 
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?
 
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 don't have a scanner to scan the flowcharts that i have prepared..

thanks much!
 
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).
 
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top