CS 101 Introduction to Computing Fig. 1: Two Number Adder

Autumn 2005-06
CS 101
Introduction to Computing
Lab 4 Slot 5 (8.30-10.10)
27th September, 2005
Objective:
The objective of this Lab is to access your ability in working with Command Button.
The main tasks carry 80% of the score and the additional task carries 20%.
Tasks:
1. In this Lab you are required to create a Visual Basic project that behaves as a simple two
number adder. Design a Form by placing command buttons on it as shown in Fig. 1.
Fig. 1: Two Number Adder
2. On clicking the Command Buttons “First No.” the first number should appear on the 3 top
command buttons, one digit (0-9) per command button in the first row. Similarly on
clicking the command button “Second No.”, the second number should appear one digit (09) per command button in the second row as shown in Fig. 2.
3. On clicking the Large Command Button at the bottom of your screen should result in the
sum of the two numbers appearing on this Command Button as a caption as shown in Fig.
3.
Autumn 2005-06
CS 101
Introduction to Computing
Lab 4 Slot 5 (8.30-10.10)
27th September, 2005
Fig. 2: Two Number Adder
Fig. 3: Two Number Adder
Additional Task:
Modify the code so that clicking either of the command buttons “First No.” or “Second No.” results
in an automatic update of the sum.
Note: Please ensure that you save this project with your roll number to the submission folder.