Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Design Process1 Design Concepts We have discussed the design of programs by using the design of the.frm file of the program. This would be called User.

Similar presentations


Presentation on theme: "The Design Process1 Design Concepts We have discussed the design of programs by using the design of the.frm file of the program. This would be called User."— Presentation transcript:

1 The Design Process1 Design Concepts We have discussed the design of programs by using the design of the.frm file of the program. This would be called User Interface Design, and for many programs the design of the user interface serves well as the design of the program. Other programs have needs that are less dependent on the appearance of the output. For these programs we often use a procedure called Top Down Design, or Stepwise Refinement.

2 The Design Process2 Top-Down Design 1.Outline the project in the boldest steps possible, do not worry about how to achieve each step. It is to be expected that some steps are beyond your immediate understanding. 2.Consider each step, refine it as much as possible, go to another step if you run into trouble. 3.(If you are dealing with a computer program, continue to refine until the steps are program language commands.)

3 The Design Process3 Example 1: Opening a Restaurant Choose a Theme Pick a neighborhood Find a Site Compute the Costs Acquire the Funds Build it Get the Staff Prepare the Ads Compute the Costs - Hire an architect, get the building costs - Determine costs of utilities, trash removal, etc. - Evaluate Labor Costs - Evaluate Publicity Costs

4 The Design Process4 Example 2: Merging Files (1) Consider a large file of names and phone numbers. (a telephone directory for a large city.) Consider a smaller file of new names and phone number which must be added to the original list. (new phone numbers added today.) Problem: Design a procedure (a program?) that will merge these two files into a new phone directory.

5 The Design Process5 Example 2: Merging Files (2) 1.Alphabetize OLDLIST 2.Alphabetize ADDLIST 3.Create a blank file, call it NEWLIST 4.Merge OLDLIST and ADDLIST into NEWLIST 5.Delete OLDLIST 6.Delete ADDLIST 7.Rename NEWLIST, calling it OLDLIST

6 The Design Process6 Example 2: Merging Files (3) 1.Alphabetize OLDLIST (already done, it was yesterday’s output.) 2.Alphabetize ADDLIST (learn how to sort stuff, too much trouble to describe here.) 3.Create a blank file NEWLIST (easy to do…)

7 The Design Process7 Example 2: Merging Files (4) 4.Merge OLDLIST and ADDLIST into NEWLIST (A. read the first item of OLDLIST, call it OLD, read the first item of ADDLIST, call it ADD.) (B. compare OLD with ADD, write the smaller of them to NEWLIST, read the next item to replace it.) (C. if you have not run out of file OLDLIST or ADDLIST, return to B again, otherwise go to D.)

8 The Design Process8 Example 2: Merging Files (5) (D. If you have drained ADDLIST, read the rest of OLDLIST into NEWLIST, if you have drained OLDLIST, read the rest of ADDLIST into NEWLIST.) 5.Delete OLDLIST 6.Delete ADDLIST 7.Rename NEWLIST, calling it OLDLIST


Download ppt "The Design Process1 Design Concepts We have discussed the design of programs by using the design of the.frm file of the program. This would be called User."

Similar presentations


Ads by Google