Class Notes 6/5/2006:
Quiz Next Monday. (T/F questions)
Today's Menu:
1. How to save your assignment and Documents
under a web host.
www.geocities.com/your_yahoo_address
*Look for the button file manager and
upload files
2. Write the invoice program starting from pg
43 and program is in pg 44-45
Hint: Payroll program is figure 2.17a
a) Compute subtotal
b) Compute total
input/output
Please Enter
the Item Id: 3445
Please Enter the Quantity: 30
Please Enter the Unit Price: 50
The Item’s Id is: 3445
The Quantity is 30
The Unit
Price is 50
The SubTotal is 1500
The Tax Amount is 127.5
The Total Price is 1627.5
2.a will be computational
of subtotal
Hint for class work:
|
Balance = 100 Withdraw =10 |
Story of Mystery of Programming (Blacksmith Story)
Answer the value of every
variable at any moment
(= sign means “becomes”)
Being on Same Side of
Novice Programmers (Feel how they feel, understanding why programmers do not
learn)
One thing about programming is the transfer of the learning of the subject
material which is called programming magic.
If you know how to write program for invoice you can write program for payroll.
Mystery of programming.
“ means literal, displays as it is. Assign it to a variable
InputBx will assign a value
to the variable
You must declare the variable name (itemid and quantity)
Hint 1 : Every variable name must have a datatype (integer, single, double, char, string, etc)
dim itemid, quantity As
Integer
dim unitprice, subtotal As Double
itemid = InputBox(“ENTER
ITEM ID: ”)
quantity = InputBox(“ENTER THE QUANTITY: ”)
unitprice = InputBox(“ENTER UNIT PRICE: ”)
subtotal = quantity * unitprice
MsgBox(“The Item Id Is : ”
& itemid)
MsgBox(“The Quantity Is : ” & quantity)
MsgBox(“The Unit Price Is : ” & unitprice)
MsgBox(“Sub Total Is : ” & subtotal)
After you test your program
and it is running, make sure you use compiler to debug the program.
* Remember the VB chapters are in syllabus.