Professional Documents
Culture Documents
Unit 4: Labs LAB - 4.1
Unit 4: Labs LAB - 4.1
Unit 4: Labs LAB - 4.1
Tuesday Night
7/8/2014
Unit 4
LABS
LAB--4.1
Module Main()
//Declare local variables
1.
2.
3.
4.
5.
Declare
Declare
Declare
Declare
Declare
String clientName
Real feetUtp
Real subTotal
Real taxCost
Real totalCost
//Module Calls
6. call inputData (feetUTP, clientName)
7. call calcCost()
8. call displayBill()
//this module takes in the required user input. There will be a display and input for
each variable
Module inputData(Real Ref feetUTP, String Ref clientName
9. display enter client name
10.input clientName
11.display enter your number of UTP
12.input feetUTP
End Module
//this module calculates subTotal, taxCost, and totalCost
//you also need feetUTP passed in to calculate subTotal
Module calcCosts(13.Real feetUTP, real ref subTotal, Real Ref taxCost, Real Ref
totalCost)
13.subTotal = feetUTP * .21
14.taxCost = subTotal * .06
15.totalCost = subTotal + taxCost
End Module
LAB--4.2
LAB--4.3
Module Module1
Dim clientName As String = "NO VALUE"
Dim feetUTP As Double = 0
Dim
Dim
Dim
Sub
LAB-4.4
Module Module1
Sub Main()
PingMe()
OpenWebsite()
FinalOutput()
Console.WriteLine()
Console.WriteLine("Press Enter To Close")
Console.ReadLine()
End Sub
Sub PingMe()
Shell("Ping.exe 127.0.0.1", , True)
End Sub
Sub OpenWebsite()
Dim myTargetURL As String = "http://www.microsoft.com"
System.Diagnostics.Process.Start(myTargetURL)
End Sub
Sub FinalOutput()
Console.WriteLine("PingMe pings server to get a reply.")
Console.WriteLine("OpenWebsite it opens Internet Explorer with the
Website in it")
End Sub
End Module