Free Essay

Unit 4 Labs

In: Computers and Technology

Submitted By flj9392
Words 491
Pages 2
Unit 4 Labs
Introduction to Programming
Mr. Nguyen

Lab 4.1 – Pseudocode and Modules
Module main ( ) //Declare local variables 1. Declare String clientName 2. Declare Real feetUTP 3. Declare Real subtotal 4. Declare Real taxCost 5. Declare Real totalCost

//Module calls 6. Module inputData ( ) 7. Module calcCosts ( ) 8. Module displayBill ( )

End Module

//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 “What is your name? “ 10. Input clientName 11. Display “How many feet of UTP do you need? “ 12. Input feetUTP

End Module

//this module calculates subTotal, taxCost, and totalCost
//you also need feetUTP passed in to calculate subTotal
Module calcCosts (13. subTotal, taxCost, and totalCost)

14. subTotal = feetUTP * 0.21 15. taxCost = 0.06 * subTotal 16. totalCost = taxCost + subTotal

End Module

//this module displays clientName and totalCost
Module displayBill (17. clientName, and totalCost) ` 18. Display “clientName” 19. Display “totalCost”

Lab 4.2 - Flowcharts and Modules

Lab 4.3 – Visual Basic and Modules
Module Module1

Sub Main() 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

inputData(clientName, feetUTP) calcCosts(feetUTP, subTotal, taxCost, totalCost) finalBill(clientName, totalCost)

Console.Write("Press enter to continue...") Console.ReadLine() Console.Write("The client is: " & clientName) Console.WriteLine(" Total: $" & totalCost) Console.ReadLine()

End Sub Sub inputData(ByRef clientName As String, ByRef feetUTP As Double) Console.Write("Enter the clients name: ") clientName = Console.ReadLine() Console.Write("Enter the number of feet of UTP installed: ") feetUTP = Console.ReadLine()

End Sub Sub calcCosts(ByVal feetUTP As Double, ByRef subTotal As Double, ByRef taxCost As Double, ByRef totalCost As Double) subTotal = feetUTP * 0.21 taxCost = subTotal * 0.06 totalCost = subTotal + taxCost

End Sub Sub finalBill(ByVal clientName As String, ByVal totalCost As Double) Console.Write(clientName) Console.WriteLine() Console.Write(totalCost) Console.ReadLine()

End Sub
End Module

Lab 4.4 – Challenge: Ping and Website Launches

Module module1

Sub Main() Console.WriteLine() Console.WriteLine(" Lab 4.4 - Challenge: Ping and Website Launches") Console.WriteLine() Console.WriteLine() pingMe() openWebsite() Console.ReadLine() finalOutput()

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) Console.WriteLine() Console.Write("Press Enter to continue....") Console.Read() Console.WriteLine()

End Sub Sub finalOutput() Console.WriteLine("Shell - Provides a handy way of quickly invoking external processes") Console.WriteLine("Ping.exe - Is a simple network utility to test whether or not a device such as a router, server or switch is contactable.") Console.WriteLine(" Data packets are sent out to the device to see if the device recieves them or not.") Console.WriteLine("Declaring Variables - You declare variables by typing Dim <variable> As <Datatype>") Console.WriteLine() Console.Write("Press Enter to continue....") Console.Read()

End Sub

End Module

Similar Documents

Premium Essay

Unit 4 Lab

...web server will need to access PDF documents are for customers to view their personal account information only. What mounting option would be: temp/ - Temporary storage directories to provide storage space for malicious executables. ext4 - An advanced level of the ext3 filesystem incorporating scalability and reliability enhancements for supporting large filesystems in keeping with increasing disk capacities and state-of-the-art feature requirements. ro - Mounts the file system for reading only. 0 0? - 3. Describe the process to create a quota hard limit of 2Gigs for a user To configure the quota for a user, execute the command: edquota username. Using the vi editor to change the hard column from 0 200000. Save and quit vi. 4. How do you install quota in Fedora 14? yum install quota 5. Why do you get error about 'cannot remount filesystem mounted'? Because you are already mounted on that file system and need to mount another filesystem. 6. What is the /etc/fstab file for? Editing disk quota 7. What is the mount command? Explain. Fedora 14 mount command is (mount -o remount <DIR>) 8. What is the name of the SW package management utility? Package management system, also called package manager 9. What is the code name for Fedora 14, and when was it released? Fedora 14, codename Laughlin Nov 2 2010 10. What is the repquota command in Linux used for? Explain. The repquota command prints a summary of quotas and disk usage for a file system...

Words: 347 - Pages: 2

Free Essay

Nt1210 Unit 4 Labs

...Unit 4 Labs SJR Exercise 4.1.1 So that each piece of equipment work together on a network work to together properly. Exercise 4.1.2 Because the voltage uses to transmit data only needs to be high enough for the receiver to detect it. Exercise 4.1.3 Shielded copper cables would be used where there is a possibility of more electric interference. To help prevent this interference with the cables. Exercise 4.1.4 Category | Maximum Speed | Application | 1 | - | Telephone cabling (POTS) | 2 | 4Mbps | Token Ring | 3 | 4Mbps | Can be used for telephones | 4 | 16Mbps | Fast Token Ring | 5 | 1Gbps | Desktop cabling | 5e | 1Gbps | Gigabit Ethernet | 6 | 10Gbps | Multi gigabit Ethernet | 6a | 10Gbps | Multi gigabit Ethernet | Exercise 4.1.5 Exercise 4.1.6 Coaxial cable has a copper core with an inner dielectric insulator, a woven copper shield, and an outer plastic sheath for protection. Exercise 4.1.7 Not to go over the length of 85-90 meters between any given connection. Exercise 4.1.8 Straight through cabling. Exercise 4.1.9 No, S1-S2 and S2-G. Fiber Optics should be used in these cases. Exercise 4.1.10 Multimeter – Measures voltage, current, and resistance. Tone Generator - A signal generator used to generate an audio-frequency signal suitable for signaling purposes or for testing audio-frequency equipment. Pair Scanner – An Ethernet cable tester Time Domain Reflectometer - An electronic instrument that uses time-domain reflectometry...

Words: 636 - Pages: 3

Free Essay

Nt1210 Unit 4 Labs

...Unit 4 Labs SJR Exercise 4.1.1 So that each piece of equipment work together on a network work to together properly. Exercise 4.1.2 Because the voltage uses to transmit data only needs to be high enough for the receiver to detect it. Exercise 4.1.3 Shielded copper cables would be used where there is a possibility of more electric interference. To help prevent this interference with the cables. Exercise 4.1.4 Category | Maximum Speed | Application | 1 | - | Telephone cabling (POTS) | 2 | 4Mbps | Token Ring | 3 | 4Mbps | Can be used for telephones | 4 | 16Mbps | Fast Token Ring | 5 | 1Gbps | Desktop cabling | 5e | 1Gbps | Gigabit Ethernet | 6 | 10Gbps | Multi gigabit Ethernet | 6a | 10Gbps | Multi gigabit Ethernet | Exercise 4.1.5 Exercise 4.1.6 Coaxial cable has a copper core with an inner dielectric insulator, a woven copper shield, and an outer plastic sheath for protection. Exercise 4.1.7 Not to go over the length of 85-90 meters between any given connection. Exercise 4.1.8 Straight through cabling. Exercise 4.1.9 No, S1-S2 and S2-G. Fiber Optics should be used in these cases. Exercise 4.1.10 Multimeter – Measures voltage, current, and resistance. Tone Generator - A signal generator used to generate an audio-frequency signal suitable for signaling purposes or for testing audio-frequency equipment. Pair Scanner – An Ethernet cable tester Time Domain Reflectometer - An electronic instrument that uses time-domain reflectometry...

Words: 636 - Pages: 3

Premium Essay

Nt1310 Unit 4 Lab 4

...TO: Dr. Jeffery Vipperman FROM: Jared Domhoff DATE: October 29, 2015 SUBJECT: Dynamic Controls Lab 4 On October 29, my lab partners, and I conducted an experiment on the fundamentals of feedback control. This was done by following the rhetoric laid out in the DC-4 manual, which included using speed controller of an electric motor as well as a proportional controls and PI controls, based on the steady state error. By definition a feedback control system includes a number of components that has their output signal modified by a controller who supplies the input signal. Gain is a very important property of a feedback control system if not the most important. Gain by definition is the measurement of the ability to increase the amplitude or power of a signal from input to output on a two port circuit which can simply be stated as the correction for an amount of error. The error corrected is increased as gain is increased as can be seen in Equation 1 listed below. For the variables the ess term is error in steady state, Yr is the reference speed, kp is the control gain, and G is calibration gain....

Words: 692 - Pages: 3

Premium Essay

Unit 4 Lab 2

...Security and Web Applications Unit 4 Vlab 2 Assessment 1. Injection, Broken Authentication and Session Management, XSS, Insecure Direct Object References, Security Misconfiguration, Sensitive Data Exposure, Missing Function Level Access Control, Cross-Site Request Forgery, Using Components with Known Vulnerabilities, Unvalidated Redirects and Forwards. 2. A Brute force attack in an attack that uses force instead of vulnerabilities to make its way into a site. Usually trying to crack username and password combinations. The risks of these attacks can be mitigated by strengthening password requirements, introducing lockouts when let’s say 3 attempts are made. That would unmotivated and attacker. 3. A user has established a level of privilege with Amazon. AN attacker uses CSRF to exploit the trust of that user. The attacker is posing as the user and is performing actions to get the latest porn film sent to his house. Boom, free porn. 4. SQL Injection, Brute Force, CSRF. 5. Hackers will use web applications with uploading options to upload files that are malicious. 6. A successful SQL injection exploit can read sensitive data from the database, modify database data execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system. (https://www.owasp.org/index.php/SQL_Injection) 7. That user information pertaining to...

Words: 285 - Pages: 2

Free Essay

Unit 4 Lab Nt1110

...Task 1) Task 1: Procedure 1a) Examine the following motherboard. One interesting thing you will see is the use of two BIOS chips. The M-BIOS chip is the Main BIOS chip and the B-BIOS chip is the Backup BIOS chip, which is used to rewrite the M-BIOS chip if it becomes corrupted. 2a) The LGA 1156 connector known as H socket is a land grid array socket used by first generation workstation. The LGA 1156 connector is used with two processors; Lynnfield and Clarkdale. The Lynnfield has different series of processors the Core i5 700 series, the Core i7 800 series and the X3400 series and L3400 series Xeon. The Clarkdale uses the Core i3 500 series, the Core i5 600 series, the Pentium G6000 series and the Celeron G1000 series. The LGA 1156 connector connects the motherboard to the CPU. Without this connector the system will not operate. 3a) The H55 Chipset is used to provide the interface for the graphics and HD media technology that goes though the CPU and the motherboard. The H55 connects to the MCH (Northbridge). IT is compatible with core i7, core i5, and core i3 processors. 4a) The Gigabyte GA-H55M-UD2H is an Intel motherboard chipset that is compatible with Intel core i7, core™ i5 and core™ i3 processors. Includes an on/off technology that allows you to charge your iphone, ipad, ECT regardless the PC is on, in standby mode or even turned off. This feature draws current from the Gigabyte motherboard USB ports. Uses a 3x USB power boost that delivers extra power to USB devises...

Words: 639 - Pages: 3

Premium Essay

Nt1310 Unit 4 Lab

...1. Using the data sheet, report your result of VJH test. If you don’t have your own measurement, you can report someone’s data. ANSWER and DATA in the LAST PAGE (all the way in the bottom, Lab 4 Worksheet) 2. If two athletes have the same vertical jump height, but differ in body mass, which jumper is more powerful? Explain. So if we assume that both their heights are the same the person that is heavier will be exhibiting much more strength as it takes more force to lift more weight to the same height. Also if we assume that both people generate force at the same rate, as in if it takes them half a second from the beginning of their jump for their feet to leave the ground then the heavier person will do more work in the same amount of time, generating more power and thus making his jump more powerful than the other person. 3. The power generated...

Words: 774 - Pages: 4

Premium Essay

Nt1310 Unit 4 Lab

...impact of the melting point on tablet production and quality. The moisture content of a pharmaceutical product is a highly significant factor in ensuring that the product is safe and effective, as too high of a moisture content within the product can alter its physical and chemical properties. Some of the factors that will affect the moisture content of a tablet will include considerations such as water holding capacity of the excipients, any hygroscopic behaviour of the active pharmaceutical ingredient (API) or any of the excipients and the reaction characteristics of the ingredients used in the tablets5. These considerations need to be taken into account to help ensure that the final formulation will contain an optimal moisture content, < 2%4. If these factors aren’t taken into consideration, a tablet’s flow ability, strength and texture can all be inversely affected. A tablet’s flow ability will be impacted by the moisture content of the tablet as moisture can cause an increase in granule size, producing an increase in friction and cohesion. This increase in size can cause blockage or clogging in the hopper and form a liquid bridge in the die cavity, which is a common cause of caking, hence producing undesirable formulation properties6. Compaction will also be affected by the moisture content of the ingredients as too low of a moisture content will produce a brittle tablets, which can chip and alter the disintegration in the body, potentially changing the intended pharmaceutical...

Words: 1862 - Pages: 8

Premium Essay

Biology Lab Unit 4 Ip

...Name: Date: November 10, 2013 Instructor’s Name: Assignment: SCIE207 Phase 4 Lab Report Title: Exploring Endocrine, Circulatory, and Respiratory Systems Instructions: Your lab report will consist of the completed tables. Label each component of the endocrine, cardiovascular (circulatory), and respiratory systems and their functions in the following tables. When your lab report is complete, post it in Submitted Assignment files. 1. Endocrine System: Observe the diagram showing the major organs of the endocrine system. Using the textbook and Virtual Library resources, fill in the following table: Endocrine System Note: Some organs support the system, but may not produce or secrete hormones. |Number |Name of the Organ or Part |Hormone(s) Produced or Secreted | |1 |Parathyroid glands  |Parathyroid hormone  | |2 |Thyroid gland  |Thyroxine, calcitonin  | |3 |Trachea  |No hormone secreted  | |4 |Pineal gland  |Melatonin  | |5 |Hypothalamus  |Produces ADH and oxytocin, regulatory hormones for...

Words: 676 - Pages: 3

Premium Essay

Pt1420 Unit 4 Lab Report

...Q3. How does increased loading change L, W, and t? When F doubles from 4.0 N to 8.0 N for the small rubber band, does the deformation, L-L0, also double? When F doubles from 4 N to 8 N for the large rubber band, does the deformation also double? As the load increases, L increases and W and t decrease. From 4 N to 8 N, the deformation does not double; it doubles from 1N to 4N, and from 2N to 15N. The deformation rate slows as more force is applied. From 4N to 8N on the larger rubber band, the deformation does not double either. Both the small and large rubber bands deformed at approximately the same rate. Q4. What is the reason for the “2” in the cross-sectional area computation in Tables 2 and 3? Since values for width and thickness were only obtained for one side of the rubber band, they must be multiplied by 2 to account for the other side. However, the rubber band used in our experiment was cut, so we did not perform this calculation. In this lab, rubber bands were used to represent tendons to show...

Words: 522 - Pages: 3

Premium Essay

Nt1310 Unit 4 Lab Report

...3a) Refer to Appendix C of block diagram showing how AM DSB FC demodulation can be performed using a receiving USRP. 3b) Using GNURadio Companion and a transmitting USRP, AM DSB FC modulation can be performed on a message signal with frequency 1 kHz and amplitude of one unit. The following code in Fig. 6 has been used to perform such a modulation with a transmitting USRP. Fig. 6 GNURadio Companion code to perform AM DSB FC modulation on a cosinusoidal message signal using a transmitting USRP. The modulated signal from the transmitting USRP is then received by a second USRP, which demodulates the signal, to obtain a signal whose waveform is comparable to that of the original message signal. Fig. 7 shows the code used on a receiving USRP to...

Words: 758 - Pages: 4

Premium Essay

Nt1310 Unit 4 Lab Report

...Step 1: Select secret image S and target image T. If the size of the target image T is different from that of the secret image S, change the size of T to be identical to that of S Step 2: Convert target image into HSV image by using the equation (1) to form new target image T Step 3: For performing color conversion, first means and of S and T are find out and then find standard deviation quotient from equation (3.5) for each color channel Step 4: Limit mean value by eight bits and standard deviation quotient to seven bits Step 5: Based on this value, for each pixel p in each secret image S with color value c where c = r, g, or b, transform c into a new value by (3) Step 6: if is not smaller than 255 or if it is not larger than 0, then...

Words: 1254 - Pages: 6

Premium Essay

Nt1310 Unit 4 Lab Report

...Biology REN Stage 1 DeArne Holmes SACE: 976199G Assessment task 4 Issues Investigation: Reproduction: Contraceptive Methods The Pill and Implanon (REFERENCES) Knowing how contraceptive methods work is essential to using them properly and increasing the reliability so pregnancy doesn’t occur. The pill is an orally taken pill which is a combination of the hormones estrogen and progesterone to prevent ovulation (2). You can not get pregnant if you don’t ovulate because there in no egg to be fertilized. The pill also works by thickening the mucus around the cervix, which makes it difficult for the sperm to enter the uterus (2). If you use the pill you need to take it everyday at a certain time to receive optimum reliability because it could leave you unprotected and possibly become...

Words: 680 - Pages: 3

Premium Essay

Nt1310 Unit 4 Lab Report

...University of North Carolina at Charlotte Department of Electrical and Computer Engineering Laboratory Experimentation Report Name: Langston Tucker Date: September 28, 2014 Course Number: ECGR 2155 Section: L05 Experiment Titles: Experiment Number: 2, 3, & 4 Lab 2: Basic Circuit Elements Lab 3: DC Voltage and Current Sources Lab 4: Series Circuit Characteristics Lab Partners: James Henderson and Joshua Sayles Equipment List: Objective: Experiment 2 The purpose of this lab was to familiarize ourselves with basic circuit elements. Those being, resistors, capacitors, inductors. Furthermore using basic calculations we determined the dissipated power in our elements. Experiment 3 The purpose of this...

Words: 2987 - Pages: 12

Premium Essay

Nt1310 Unit 4 Lab Report

...Discussion: The method by which the mass of a single object was calculated in part 1, is similar in many ways to the method by which the elementary charge was calculated in part 2. Once the relevant data set was either collected or calculated it was first ordered from greatest to least. Next, the first differences between consecutively ordered masses/charges were determined. Thirdly, first differences that were significantly closer to zero than the rest were removed from the data set. Fourthly, first differences that were the multiples of other first differences were removed from the data set. Finally the remaining first differences were averaged in order to determine a mean value for the mass/elementary charge. In order for this method for determining elementary charges to be valid, several traits of elementary charges must be true. Firstly, to determine the elementary charge, it must be true that charge is quantized. This means that the values of charge are discrete, not continuous. If this were not the case, ten this method would not be able to determine the elementary charge because an elementary charge would not exist. Secondly, to determine the elementary charge using this method, the mass and charge of the elementary charge must be constant, and it must maintain this consistency regardless of the temperature, the material that the elementary charges are present in, or any other factor. Finally, all charges, and their composite elementary charges must behave...

Words: 923 - Pages: 4