Some simple Visual Projects

1. In this project, you are working with real numbers in accurate ways. Construct a screen as follows (in a NEW FOLDER):

being careful to NAME the buttons, 3 answer captions and edit box as shownand use the builtin constant (named, funnily enuff pi) as it is a little more accurate that the old 22/7 estimate.

Your mission - using the supplied formulas, in the btnCalculate click work out the area, volume and circumference, displaying them correct to 4 decimal places.

Extra for experts - idiot proof the edit box so it clears itself and nothing happens should the user (idiot) type in a non-number.

2. Simple Interest is something that people who borrow have to deal with - The amount borrowed (principle) has am interest rate charged on it over the length of the borrow (term) according to the following formula:

Construct a screen as follows (IN A NEW FOLDER):

then program it so that when the btnCalculate button is pressed, the principle and term are echoed into the corresponding displays and then the interest owing is calculated and displayed in the appropriate display caption.

Extra for experts: idiot proof the interface.

3. High-Low is a simple game where the computer randomly thinks of a number (between 0 and 100) and the user tries to guess it in 10 guesses or less.

Firstly construct a screen like this (IN A NEW FOLDER):

The current number of guesses are in labGuesses (starts at 10, goes to 0), the labFeedback is used to either congratulate or commiserate at the end of the game (when either they guess it or run out of guesses) or to help them by saying "too high" if their guess is higher than the mystery number, or "too low" in they guess below that number.

Your mission: build it so you can play the game. btnNew starts a new game, btnGuess lets you have a guess in that current game. The game ends when they either guess the mystery number or run out of guesses. Idiot proof it if you can - if they are an idiot, take a guess off them or not (you decide). Make sensible use of variables, carefully generate a random number (I suggest you display it initially so you know your code is working properly, then hide it so the user cannot cheat).

wonko@wonko.info