Data Structures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lanfordc
    New Member
    • Oct 2008
    • 4

    Data Structures

    I have ask this questions before. but I still need some help. Can someone help me to see if I on track.

    1. Write a pseudocode algorithm for dialing a phone number.

    here are my pseudocode statements:

    Statement 1: enter number to dial
    Statement 2: 510637890
    Statement 3: phone answer

    IF enter ten number is true THEN
    dial phone number
    ELSE
    do not dial phone number
    ENDIF
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    What is your question?

    Comment

    • boxfish
      Recognized Expert Contributor
      • Mar 2008
      • 469

      #3
      Originally posted by donbock
      What is your question?
      Ditto. I don't see how your program is going to dial a phone number. It's not actually going to call anyone, right?
      Edit:
      Sorry, I see you're not actually supposed to write a program that does this. Are there any more specifications? Do you have to look at the piece of paper you wrote the number down on and dial each number individually? Do you have to pick up the phone and say hello? Is it a rotary telephone? Is there anything more to it than
      1 dial phone number
      2 put phone to ear
      Last edited by boxfish; Oct 9 '08, 02:56 AM. Reason: Oops, this is not a programming assignment.

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Is this meant to be pseudocode for how you place a phone call manually? If so, think through how you do it every day ...
        What actions do you perform?
        What are your decision points (things you wait for, places where you select different actions)?
        What are the failure modes (what can go wrong, and how do you react)?
        What is the criteria for success?

        Comment

        • weaknessforcats
          Recognized Expert Expert
          • Mar 2007
          • 9214

          #5
          There are more thane 3 steps to dialing a phione number:

          1) pick up handset (or flip open the cell phone)
          2) Is there a dial tone?
          If NO do step x etc...
          If YES do step y etc...

          Other things to think about:
          1) do you get a ring tone
          2) was there an error reply, like number not in service
          3) was the line busy
          What do you do now?
          4) there a voice mail answer
          What do you do now?

          etc...

          Comment

          • lanfordc
            New Member
            • Oct 2008
            • 4

            #6
            Okay, I will try this again.

            1) pick up handset (or flip open the cell phone)
            2) Is there a dial tone?
            If NO do step 4.
            If YES do step 3
            3) Enter 10 digit phone number (5101001234)
            4) hang handset up (or close cell phone) repeat step 1.

            Originally posted by weaknessforcats
            There are more thane 3 steps to dialing a phione number:

            1) pick up handset (or flip open the cell phone)
            2) Is there a dial tone?
            If NO do step 4.
            If YES do step 3
            3) enter 10 ditig phone
            4) hang handset up(or close celll phone ) repete step 1.

            Other things to think about:
            1) do you get a ring tone
            2) was there an error reply, like number not in service
            3) was the line busy
            What do you do now?
            4) there a voice mail answer
            What do you do now?

            etc...

            Comment

            • lanfordc
              New Member
              • Oct 2008
              • 4

              #7
              Originally posted by donbock
              What is your question?
              How write a pseudocode algorithm for dialing a phone number?

              Can you give a name of a good book that can help with this data structures class. The book I hve is Data Structures (a Pseudocode Approach with C)
              authors are Richard F. Gilberg and Behrouz A Forouzan.

              Comment

              Working...