IPT - A Virtual Approach IPT A Virtual Approach by Peter Whitehouse
Quick Links:
 
 
Information and Intelligent Systems Social and Ethical Implications Human Computer Interaction Software and Systems Engineering eXercise Files Course Outline and Assessment A-Z of Geeky Acronyms Terrace Work Program 2004 Sillybus FAQ = Frequently Asked Questions Help
 
 

eXercise #21¾

Miscellaneous Visual Projects
for revision

  1. Frogs are known to climb windows in search of food. In this simulation, have your frog climb the window (randomly advancing or slipping backwards) to get to the spider. Make it more likely to go forward than backwards using a random number that can either be positive or negative.

    In this project, you should construct a form as follows:
    Frog on the window
    run | Frog.wmf | Spider.wmf

    The spin edit box should record the number of hops.
    The reset button should place the frog back down the window, reset the hops, turn off the timer and make the spider visible (hiding the label)

    The project comprises:
    • 1 spin edit box named hops
    • 3 buttons called reset, startstop and done
    • 2 images called spider and frog
    • a label called yum and a timer called frogtimer

    Each press of the startstop button should either start or stop the timer, Done naturally closes the application.

  2. Currency Conversion is a nuisance. This simple project uses the .position property of a scroll bar as the numeric input to convert Aussie dollars into US, UK and Italian currency.
    Currency Converter

    if the currency rates are as follows:

    1.8 Aussie dollars to each US$;

    2 Aussie Dollars to every Pound;

    0.002 Aussie Dollars to every Lire

    run

    This project contains a scroll bar (set to be vertical, with a minimum of 0, maximum of 500), 8 labels (4 of which are changed by the program, namely AustralianDollars, USDollars, Pounds and Lire) and a done button. Using the formatted floattostrF command, ensure the correct number of decimal places are displayed.

  3. Prime Pump (Extra for Experts):

    Write a small program that prompts for a number and then outputs all PRIME numbers up to that number. To clarify, Prime numbers are positive WHOLE numbers that no other number (except 1 and itself) divides evenly into. You should use showmessage to show each prime, and an input box to ask for the finishing number.

wonko@wonko.info
©Copyright t 1992..2017+. Edition 25.150117
wonkosite
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.1 Australia License
.