Lecture 9. AMES 5, Tues. 8 Feb. 2000

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. Ira Hindrawinata will take the lectures this week along with Pak-Tao Leung, 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. 18, the same due date for all Sections).

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 2000 (next week)

 

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 54 anonymous MAE/CAPE forms by Section numbers A01-A08. 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 81% 8+, for example. Student comments given on back of Scantron forms.

Lecture 10. AMES 5, Tues. 10 Feb. 2000

 

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 2000 (next week)

Help