Lecture 9. MAE 5, Tues. 6 Feb. 2001

From the course outline we see the reading assignment this week is Chapter 6 on Finding and Correcting Errors. Laboratory Quiz 1 will be given in sections, and will involve solving programming problems similar to those you have been doing as Practice Programs for homework. The quiz is open book and open notes, but you can't discuss what you are doing with your fellow students...only your TA. Ira Hindrawinata and Pak-Tao Leung will participate in the lectures this week, so you can ask them about what sort of programming questions you might be given to solve in your section for LQ1. Project 1 is assigned this week, so it is due by Friday afternoon of next week (Feb. 16, the same due date for all Sections). The minimum number of commands for the first project is 15, but you are free to use more if they will improve your project. Give it a title. See guidelines.

You need to turn in modified versions of all the example programs in this chapter, and do Practice Programs 6.1 and 6.2. The "do trace" debugging routine for True Basic is discussed, along with other techniques for finding errors. For PP6.1, test using "do trace, step (noerror$,x1,x2,a,b,c,extype,extext$)" in the command window (type control J to open, and paste in the copied command).

Some of the methods presented include:

Quiz 5a Solution

Self Test Question Answers Chapter 6. Study these in preparation for Quiz8, Winter 2001 (next week....see version given last year)

 

Advanced techniques: Have a look at the use of arrays and modules in these programs. Copy and try deal, which deals a bridge hand, using module cards. You can cut and paste to produce card game projects (sort the hand, count honor points, etc.).

 

Feedback Corner: Students returned 62 anonymous MAE/CAPE forms. Results of the Course And Professor Evaluation are given here. The Scantron machine was keyed "no" (B,False) for all 20 questions returning "% wrong answers" on the Item Analysis to give percent non-negative as %"yes" (%nn). Hours/week reported were 90% 0-7, for example. Student comments given on back of Scantron forms.

Lecture 10. MAE 5, Tues. 8 Feb. 2001

 

In solving Practice Program 6.2 it is necessary to break the program down into smaller pieces to trap the various possible date entry problems. Dates entered with more than thirty days in September, April, June and November should be detected, and the user asked to enter a correct date. Dates entered with more than 29 days in February should also not be accepted. Months larger than 12 (eg.: 13.25.98) are obviously in error, and should be trapped. More than 31 days in Jan., Mar., July, Aug. and Oct. is incorrect. Since it was requested that the date should not have leading zeros in the month and day (eg.: 01-06-98), this should also be detected in your program.

A variety of programs were presented illustrating graphical methods that might be useful in your projects.

Quiz 5b Solution

Self Test Question Answers Chapter 6. Study these in preparation for Quiz 9, Winter 2001 (next week....see version given last year)

Help