ENGG1811 Lab 5: Using The OO Basic Editor

During the first hour of the lab class you will complete the MidTerm exam (details provided separately). 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 Online Assessment question. 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.

You should get used to formatting the program well, using meaningful names, indentation, avoiding literal numbers like 1000 or 3.14159 inside procedures.

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.