Reminds me following: my son attended a Delphi course at school and asked to help. I had absolutly no clue about neither Windows nor Delphi. I only had the online Help of Delphi and a PDF of a manual. In addition I have my way to dig fast into a new subject:
neglect all you do not understand at once and go ahead until you are stopped by your ignorance. Then you have plenty of time to go about it.
Within one week I gave my son the result, a 4-banger. He refused to present it at school, it was too obviously not his own work. So imagine, you get a solution from this formum, sophisticated and perfectly satisfying the stipulated objectives and assignment, and your tutor asks you to explain -- you are ... let's say: in trouble.
My suggestion: take this 4-banger www.stehlin.net/hpclub/Aristo/4-banger.zip
or Free42 --
http://thomasokken.com/free42/
Both are simulations but may help to calculate this and that, even caffeine in your body.
But to meet this
Objectives
to compile and run a program contating repetition structures |
it would be
the absolute solution: Take the C++ source of V41 and compile it (must the source be completely yours?). As result you have an "emulator", a system on the PC that runs the original firmware of an HP-41C, CV, or CX. So it is
a program contating repetition structures |
-- its main loop is the simulation of CPU cycles.
What would be more convenient to calculate values than a valuable pocket calculator? Find the source here:
http://www.hp41.org/LibView.cfm?Command=Author&AuthorID=3201