
Variables:
- When the value of something in a program changes all the time you use a variable.
- For example: a program may ask a user for their name, then the user types in their name.
- A variable called "username" may be used to store the person's name.
- In one case it may be John...after John is finished using the program and someone else uses it the variable "username" may store a different value like Amy.
Variable row_num:
- In your assignment you will create a variable called row_num.
- This will store the "row number" that you want information to be copied into.
For example:
- In the example below information is copied into row 3 (1 cd stock code 1234, $9.99 etc.) the next CD is copied onto row 4. In your program the variable "row_num" will change from 3 to 4 so that the program knows which line to copy onto.
figure 5.2.1
- In this portion of the assignment you will be modifying your code so that each time you press the Next_Item button the information is copied on to a different line, thus creating a reciept like that shown above which can be printed out for the customer.

This website is copyright protected see contact page for details. .
|
|