ENGG1811 Lab 5: Using The OO Basic Editor

During the first hour of the lab class you will complete the MidTerm exam (see Notices). This document covers the practical work for the second hour.


After completing this lab, students should be able to


As with most labs, one mark is awarded to successful attempts at an on-line exercise. The exercise will require you to enter a series of assignment statements, which you will need to embed in a subprogram, similar to the main exercise.

For the other two marks your tutor will ask you to demonstrate your program. As with all labs in this course, you may be asked to explain your solution and how you devised it. Your tutor will record whether you have successfully completed the work, provided he or she is confident you fully understand the solution and it is reasonably well presented.

To help you adopt good habits you submit your completed or in-development lab and assignment work to our Style Assessor. It will carefully scrutinise things like indenting, indentifier naming, author/date comments and for this lab especially, using suitably-named constants instead of literal numbers (apart from obvious ones like 0, 1 or 2).

If the report indicates deficiencies in any category, look at the brief suggestion in the last column, and ask your tutor to explain if you don't follow what it says.

You should aim for the maximum 4/4 style mark for labs. Your tutor will take this into account when awarding the overall mark.

The Equatorial Rope Paradox

The example in last week's lectures read a value, did a small calculation and displayed the result on a window using MsgBox. This exercise uses a similar kind of subprogram to calculate the result of the following problem, which has a non-intuitive answer:

Imagine a rope circling the Earth at the equator, tight against the surface (assume the earth is a spheroid and the equator is circular). If you were to cut the rope, insert a one metre long section, and move the rope uniformly away from the surface, how far away would the rope be from the Earth now? (Most people guess a fraction of a millimetre.)

You can solve this with simple geometry, since circumference and radius of a circle are related by the obvious formula C = 2πR where R is the radius and C is the circumference. And yes, there is an obvious analytical solution to the problem, but we're just using it as an example of a sequential (step-by-step) algorithm.