11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTOR NOTES 32 USER FRIENDLY PROGRAMS WThis lesson shows how to write clear programs which interact with the user in a ^"friendly" way. .They should also be clearly structured from the programmer's point of view. The ^j"spaghetti" program should be discouraged. A format for writing programs is presentedin this lesson. While methods of imposing order on the task are largely a matter of taste, ^Jthe methods used in this lesson can serve to introduce the ideas."User friendly" means that the screen displays are easy to read, keyboard input is ,,"RETURN key free" as much as possible and errors are "trapped." Ask if entries areOK. If not, give an opportunity to fix things. \^jInstructions and "HELP" should be available. Prompts need to be given. Beginners need ^Jcomplete prompts, but experienced users would rather have curt prompts.It is hard to teach the writing of user friendly programs. Success depends mostly on the ..attitude of the programmer. The best advice is to "turn up your annoyance detectors tohigh" as you write and debug the program.\^jMost young students will not progress very far toward fully friendly programming. To be ^Jacquainted with the desirability of friendly programming and to use some simpletechniques toward accomplishing it are satisfactory achievements. ^QUESTIONS:w1. Should your program give instructions whether the user wants them or not? ^2. What is a "prompt"? Give two examples.3. What is "scrolling"? How can you write to the screen without scrolling?4. If you want the user to enter a single letter from the keyboard, what command isbest? (Avoids using the RETURN key.) ^5. What is an "error trap"? How would you trap errors if you asked your user to enter anumber from 1 to 5? \^j6. In what part of the program are most of the GOSUB commands found? ^J7. Why put the "STARTING STUFF" section of the program at the end of the program(at high line numbers)? ,184

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!