SlideShare a Scribd company logo
1 of 13
PT1420: Modules in Flowchart and Visual Basic
Page 1
This lab requires you to think about the steps that take place in
a program by designing a
flowchart. Use an application such as Raptor or Visio. Read the
following program prior to
completing the lab.
Data Communications Corp wants a small program that will
calculate the cost of UTP it
installs for their clients. Write a program that will ask the user
to input the name of the
client and the number of feet of cable installed. The program
should then calculate and
display a final bill. Cost per foot of UTP is .21 cents. Be sure to
add on a tax of 6%. Final
bill should include the total cost and client name. Be sure to add
modules to your
program.
Step 1: In main, create a module called declareVariables() that
will set your variables to 0 or “ “.
Click the Call Symbol on the Left and Drag and Drop to the
flow lines between Start and Stop.
Double click on the Call Symbol and type the name of your first
module. For example, type
declareVariables in the Enter Call box. Do not put the ( ) when
using Raptor. Click the Done
button. A new box will pop up that will ask you to create a new
tab. Click Yes. A new tab will be
created for your new method. Notice the new Tab called
declareVariables.
Watch the Help Video 4-2 to see how to add modules and
initialize variables in Raptor and
Visio.
PT1420: Modules in Flowchart and Visual Basic
Page 2
Step 2: Continue this process to add your additional methods,
which are inputData(),
calcCosts(), and displayBill(). Main should look like this:
In Raptor
In Visio
Start
End
declareVariables()
inputData()
calcCosts()
displayBill()
Step 3: Click on the inputData module and add the necessary
code to input clientName and
feetUTP. Watch the Help Video 4-2 to see how to input
variables in Raptor and Visio.
Step 4: Click the calcCosts module and add the necessary code
to compute calculations. Watch
the Help Video 4-2 to see how to add calculations in Raptor and
Visio.
Step 5: Click the displayBill module and add the necessary code
to display the clientName and
totalCost to the screen. Watch the Help Video 4-2 to see how to
display variables in Raptor and
Visio.
PT1420: Modules in Flowchart and Visual Basic
Page 3
Step 6: If you are using Raptor, you can run your program.
Click Run, then Execute to Finish. For
your input, enter a client name such as Bumpco Inc and 3758
feet of cable installed. If your
program is coded correctly, the output should be as follows:
The clients name is Bumpco Inc
The final cost is $836.5308
----Run complete.
Step 7: The final step is to insert your finished flowchart into a
Word document. Inside Raptor,
select File and the Print to Clipboard from the menu. Inside
your Word document, select Edit
and Paste. You will have to do this for each module you
created. In Visio, select Edit and then
Copy Drawing. Inside your Word document, select Edit and
Paste.
Use the flowchart you just created to write the program in
Visual Basic, console application
using modules.
Step 8: Setup environment
Visual Studio 2010
Professional
b. Create a new project by going to
c. Choose Visual Basic and a Console Application
d. In the Name box type “Lab3.2_studentFname_studentLname”
(use your name)
e. Click Ok
f. In module1.vb note you are given the shell of the main
module for this program as
shown below. This module will execute when the program is
executed and make calls to
other modules you will create.
Module Module1
Sub Main()
End Sub
PT1420: Modules in Flowchart and Visual Basic
Page 4
End Module
Your module looks like this:
Step 9: Inside Sub Main(), declare your variables for this
program. This should include the
following declarations:
Dim clientName As String = "NO VALUE"
Dim feetUTP As Double = 0
Dim subTotal As Double = 0
Dim taxCost As Double = 0
Dim totalCost As Double = 0
Your module looks like this:
PT1420: Modules in Flowchart and Visual Basic
Page 5
Step 10: After the End Sub command in main, add a new module
for inputData(). This should
look like:
Sub inputData(ByRef clientName As String, ByRef feetUTP As
Double)
The End Sub command will automatically be added. clientName
and feetUTP are passed
using the ByRef command because you need to retain the value
of the variable. Your
module looks like this:
Inside the module, add the following:
Console.Write("Enter the clients name: ")
clientName = Console.ReadLine()
Console.Write("Enter the number of feet of UTP installed: ")
feetUTP = Console.ReadLine()
PT1420: Modules in Flowchart and Visual Basic
Page 6
This allows the use to enter the necessary data. Your module
looks like this:
Step 11: Below that module, add a new module for calcCosts().
Pass feetUTP as ByVal, and
subTotal, taxCost, and totalCost as ByRef. Inside this module,
process your calculations for
subTotal, taxCost, and totalCost.
subtotal = 0.21 * feetUtp
taxcost = subtotal * 0.06
totalcost = taxcost + subtotal
PT1420: Modules in Flowchart and Visual Basic
Page 7
Your module looks like this:
PT1420: Modules in Flowchart and Visual Basic
Page 8
Step12: Below that module, add a new module for finalBill().
Pass clientName and totalCost as
ByVal. Remember, ByRef is only needed if you are changing
the value of a variable in a module.
Because we are simply using the value of the variable in this
case, ByVal works more efficiently.
Inside the module, use Console.WriteLine() to display the
values of the variables. Your module
looks like this:
Step 13: In Main () under the variable declarations, add your
module calls, passing the
appropriate variables such as:
inputData(clientName, feetUTP)
calcCosts(feetUTP, subTotal, taxCost, totalCost)
finalBill(clientName, totalCost)
PT1420: Modules in Flowchart and Visual Basic
Page 9
You might also include a pause by adding the following:
Console.Write("Press enter to continue...")
Console.ReadLine()
Your module looks like this:
PT1420: Modules in Flowchart and Visual Basic
Page 10
Step 14: Execute your program so that it works and paste the
final code below. Sample output
might look like:
PT1420: Modules in Flowchart and Visual Basic
Page 11
Step 15: Submit the Visual Basic code as a compressed (zipped)
folder using the following steps:
a. Open Windows Explorer --> Start --> All Programs -->
Accessories --> Windows Explorer.
Your Windows Explorer might look as follows:
b. In Windows Explorer, navigate to the folder that contains
your project files. Your
Windows Explorer might look as follows:
PT1420: Modules in Flowchart and Visual Basic
Page 12
(If you don't recall you can check in Visual Studio by opening
your project, right click
module1.vb file and view the properties. Look at the full path
ex.
C:UsersinstructorDocumentsVisual Studio
2010ProjectsmyFirstProgrammyFirstProgramModule1.vb; in
this case navigate to
C:UsersinstructorDocumentsVisual Studio 2010Projects).
Your module properties
might look as follows:
c. Right click on your project folder and choose send to -->
compressed folder. This creates
a zip file of all your code. Your Windows Explorer might look
as follows:
PT1420: Modules in Flowchart and Visual Basic
Page 13
d. Attach the compressed folder you created to your submission.
Your Windows Explorer
might look as follows:

More Related Content

Similar to PT1420 Modules in Flowchart and Visual Basic .docx

POS/408 ENTIRE CLASS UOP TUTORIALS
POS/408 ENTIRE CLASS UOP TUTORIALSPOS/408 ENTIRE CLASS UOP TUTORIALS
POS/408 ENTIRE CLASS UOP TUTORIALSSharon Reynolds
 
B2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound ediB2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound ediRoberto Cantero Segovia
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comBartholomew19
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxemelyvalg9
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.combellflower82
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationnitin2517
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.comjonhson110
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsOregon FIRST Robotics
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCIS321
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startednoahjamessss
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedgovendaagoovenda
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5Akhil Mittal
 
Dynamic Function Call in PI Sheet (XStep)
Dynamic Function Call in PI Sheet (XStep)Dynamic Function Call in PI Sheet (XStep)
Dynamic Function Call in PI Sheet (XStep)Ankit Sharma
 
Dolibarr - what's new in 10.0 - devcamp lyon 2019
Dolibarr - what's new in 10.0 - devcamp lyon 2019Dolibarr - what's new in 10.0 - devcamp lyon 2019
Dolibarr - what's new in 10.0 - devcamp lyon 2019Laurent Destailleur
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxketurahhazelhurst
 
SuiteCRM Customer Portal
SuiteCRM Customer PortalSuiteCRM Customer Portal
SuiteCRM Customer PortalAppJetty
 

Similar to PT1420 Modules in Flowchart and Visual Basic .docx (20)

Lab (1) installation of python
Lab (1) installation of pythonLab (1) installation of python
Lab (1) installation of python
 
POS/408 ENTIRE CLASS UOP TUTORIALS
POS/408 ENTIRE CLASS UOP TUTORIALSPOS/408 ENTIRE CLASS UOP TUTORIALS
POS/408 ENTIRE CLASS UOP TUTORIALS
 
B2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound ediB2B add on implementation scenarios po. part I inbound edi
B2B add on implementation scenarios po. part I inbound edi
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docxStudent Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
Student Lab Activity A. Lab # CIS CIS170A-A1B. Lab.docx
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
How to develop a gateway service using code based implementation
How to develop a gateway service using code based implementationHow to develop a gateway service using code based implementation
How to develop a gateway service using code based implementation
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboards
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
 
Dynamic Function Call in PI Sheet (XStep)
Dynamic Function Call in PI Sheet (XStep)Dynamic Function Call in PI Sheet (XStep)
Dynamic Function Call in PI Sheet (XStep)
 
Dolibarr - what's new in 10.0 - devcamp lyon 2019
Dolibarr - what's new in 10.0 - devcamp lyon 2019Dolibarr - what's new in 10.0 - devcamp lyon 2019
Dolibarr - what's new in 10.0 - devcamp lyon 2019
 
Sap pm-master-data
Sap pm-master-dataSap pm-master-data
Sap pm-master-data
 
Using general sub procedures
Using general sub proceduresUsing general sub procedures
Using general sub procedures
 
Ecad final
Ecad finalEcad final
Ecad final
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
 
SuiteCRM Customer Portal
SuiteCRM Customer PortalSuiteCRM Customer Portal
SuiteCRM Customer Portal
 

More from amrit47

APA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxAPA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxamrit47
 
APA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxAPA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxamrit47
 
Apa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxApa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxamrit47
 
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxAPA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxamrit47
 
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
APA format     httpsapastyle.apa.orghttpsowl.purd.docxAPA format     httpsapastyle.apa.orghttpsowl.purd.docx
APA format  httpsapastyle.apa.orghttpsowl.purd.docxamrit47
 
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxAPA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxamrit47
 
APA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxAPA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxamrit47
 
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxAPA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxamrit47
 
APA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxAPA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxamrit47
 
APA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxAPA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxamrit47
 
Appearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxAppearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxamrit47
 
apa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxapa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxamrit47
 
APA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxAPA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxamrit47
 
APA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxAPA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxamrit47
 
APA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxAPA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxamrit47
 
APA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxAPA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxamrit47
 
APA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxAPA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxamrit47
 
APA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxAPA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxamrit47
 
APA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxAPA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxamrit47
 
APA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxAPA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxamrit47
 

More from amrit47 (20)

APA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxAPA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docx
 
APA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxAPA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docx
 
Apa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxApa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docx
 
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxAPA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
 
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
APA format     httpsapastyle.apa.orghttpsowl.purd.docxAPA format     httpsapastyle.apa.orghttpsowl.purd.docx
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
 
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxAPA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
 
APA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxAPA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docx
 
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxAPA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
 
APA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxAPA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docx
 
APA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxAPA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docx
 
Appearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxAppearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docx
 
apa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxapa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docx
 
APA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxAPA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docx
 
APA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxAPA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docx
 
APA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxAPA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docx
 
APA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxAPA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docx
 
APA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxAPA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docx
 
APA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxAPA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docx
 
APA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxAPA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docx
 
APA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxAPA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docx
 

Recently uploaded

Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

PT1420 Modules in Flowchart and Visual Basic .docx

  • 1. PT1420: Modules in Flowchart and Visual Basic Page 1 This lab requires you to think about the steps that take place in a program by designing a flowchart. Use an application such as Raptor or Visio. Read the following program prior to completing the lab. Data Communications Corp wants a small program that will calculate the cost of UTP it installs for their clients. Write a program that will ask the user to input the name of the client and the number of feet of cable installed. The program should then calculate and display a final bill. Cost per foot of UTP is .21 cents. Be sure to add on a tax of 6%. Final bill should include the total cost and client name. Be sure to add modules to your program. Step 1: In main, create a module called declareVariables() that will set your variables to 0 or “ “.
  • 2. Click the Call Symbol on the Left and Drag and Drop to the flow lines between Start and Stop. Double click on the Call Symbol and type the name of your first module. For example, type declareVariables in the Enter Call box. Do not put the ( ) when using Raptor. Click the Done button. A new box will pop up that will ask you to create a new tab. Click Yes. A new tab will be created for your new method. Notice the new Tab called declareVariables. Watch the Help Video 4-2 to see how to add modules and initialize variables in Raptor and Visio. PT1420: Modules in Flowchart and Visual Basic Page 2 Step 2: Continue this process to add your additional methods, which are inputData(), calcCosts(), and displayBill(). Main should look like this:
  • 3. In Raptor In Visio Start End declareVariables() inputData() calcCosts() displayBill() Step 3: Click on the inputData module and add the necessary code to input clientName and feetUTP. Watch the Help Video 4-2 to see how to input variables in Raptor and Visio. Step 4: Click the calcCosts module and add the necessary code to compute calculations. Watch the Help Video 4-2 to see how to add calculations in Raptor and Visio. Step 5: Click the displayBill module and add the necessary code to display the clientName and totalCost to the screen. Watch the Help Video 4-2 to see how to display variables in Raptor and
  • 4. Visio. PT1420: Modules in Flowchart and Visual Basic Page 3 Step 6: If you are using Raptor, you can run your program. Click Run, then Execute to Finish. For your input, enter a client name such as Bumpco Inc and 3758 feet of cable installed. If your program is coded correctly, the output should be as follows: The clients name is Bumpco Inc The final cost is $836.5308 ----Run complete. Step 7: The final step is to insert your finished flowchart into a Word document. Inside Raptor, select File and the Print to Clipboard from the menu. Inside your Word document, select Edit and Paste. You will have to do this for each module you created. In Visio, select Edit and then Copy Drawing. Inside your Word document, select Edit and Paste. Use the flowchart you just created to write the program in
  • 5. Visual Basic, console application using modules. Step 8: Setup environment Visual Studio 2010 Professional b. Create a new project by going to c. Choose Visual Basic and a Console Application d. In the Name box type “Lab3.2_studentFname_studentLname” (use your name) e. Click Ok f. In module1.vb note you are given the shell of the main module for this program as shown below. This module will execute when the program is executed and make calls to other modules you will create. Module Module1 Sub Main() End Sub
  • 6. PT1420: Modules in Flowchart and Visual Basic Page 4 End Module Your module looks like this: Step 9: Inside Sub Main(), declare your variables for this program. This should include the following declarations: Dim clientName As String = "NO VALUE" Dim feetUTP As Double = 0 Dim subTotal As Double = 0 Dim taxCost As Double = 0 Dim totalCost As Double = 0 Your module looks like this: PT1420: Modules in Flowchart and Visual Basic Page 5
  • 7. Step 10: After the End Sub command in main, add a new module for inputData(). This should look like: Sub inputData(ByRef clientName As String, ByRef feetUTP As Double) The End Sub command will automatically be added. clientName and feetUTP are passed using the ByRef command because you need to retain the value of the variable. Your module looks like this: Inside the module, add the following: Console.Write("Enter the clients name: ") clientName = Console.ReadLine() Console.Write("Enter the number of feet of UTP installed: ") feetUTP = Console.ReadLine() PT1420: Modules in Flowchart and Visual Basic
  • 8. Page 6 This allows the use to enter the necessary data. Your module looks like this: Step 11: Below that module, add a new module for calcCosts(). Pass feetUTP as ByVal, and subTotal, taxCost, and totalCost as ByRef. Inside this module, process your calculations for subTotal, taxCost, and totalCost. subtotal = 0.21 * feetUtp taxcost = subtotal * 0.06 totalcost = taxcost + subtotal PT1420: Modules in Flowchart and Visual Basic
  • 9. Page 7 Your module looks like this: PT1420: Modules in Flowchart and Visual Basic Page 8 Step12: Below that module, add a new module for finalBill(). Pass clientName and totalCost as ByVal. Remember, ByRef is only needed if you are changing the value of a variable in a module. Because we are simply using the value of the variable in this case, ByVal works more efficiently. Inside the module, use Console.WriteLine() to display the values of the variables. Your module
  • 10. looks like this: Step 13: In Main () under the variable declarations, add your module calls, passing the appropriate variables such as: inputData(clientName, feetUTP) calcCosts(feetUTP, subTotal, taxCost, totalCost) finalBill(clientName, totalCost) PT1420: Modules in Flowchart and Visual Basic Page 9 You might also include a pause by adding the following: Console.Write("Press enter to continue...") Console.ReadLine() Your module looks like this:
  • 11. PT1420: Modules in Flowchart and Visual Basic Page 10 Step 14: Execute your program so that it works and paste the final code below. Sample output might look like: PT1420: Modules in Flowchart and Visual Basic Page 11 Step 15: Submit the Visual Basic code as a compressed (zipped) folder using the following steps: a. Open Windows Explorer --> Start --> All Programs --> Accessories --> Windows Explorer. Your Windows Explorer might look as follows: b. In Windows Explorer, navigate to the folder that contains
  • 12. your project files. Your Windows Explorer might look as follows: PT1420: Modules in Flowchart and Visual Basic Page 12 (If you don't recall you can check in Visual Studio by opening your project, right click module1.vb file and view the properties. Look at the full path ex. C:UsersinstructorDocumentsVisual Studio 2010ProjectsmyFirstProgrammyFirstProgramModule1.vb; in this case navigate to C:UsersinstructorDocumentsVisual Studio 2010Projects). Your module properties might look as follows: c. Right click on your project folder and choose send to --> compressed folder. This creates a zip file of all your code. Your Windows Explorer might look as follows:
  • 13. PT1420: Modules in Flowchart and Visual Basic Page 13 d. Attach the compressed folder you created to your submission. Your Windows Explorer might look as follows: