Free Essay

Pt1420 Lab 3

In: Computers and Technology

Submitted By brainsharts
Words 458
Pages 2
LAB 3.1 Variable Name | Problem (Y or N) | If Yes, what’s wrong? | Declare Real creditsTaken | No | | Declare Int creditsLeft | Yes | The variable should be declared as Real so it can indicate decimal values | Declare Real studentName | Yes | The variable should be a String to store text | Constant Real creditsNeeded = 90 | No | |

Step 2: The calculation should be “creditsLeft = creditsNeeded – creditsTaken”
Step 3: “The student’s name is Nolan Owens”
Step 4: “The Network Systems Administration degree is awarded after 90 credits and Nolan Owens has 70 left to take before graduation.”
Step 5:
1. //Provide documentation on line 2 of what this program does
2. //This program calculates how many credits a student still needs to graduate the NSA program 3. //Declare variables on lines 4, 5, 6, and 7
4. Declare Real creditsTaken = 0
5. Declare Real creditsLeft = 0
6. Declare String studentName = “NO VALUE”
7. Declare Constant Real creditsNeeded = 90 8. //Ask for user input of studentName and creditsTaken on line 9 - 12.
9. Display “What is the student’s name?”
10. User input = studentName
11. Display “How many credits does the student have?”
12. User input = creditsTaken 13. //Calculate remaining credits on line 14
14. creditsLeft = creditsNeeded – creditsTaken 15. //Display student name and credits left on line 16 and 17
16. Display “The student’s name is “, studentName
17. Display “They require “, creditsLeft ,” in order to graduate the NSA program.”

LAB 3.3

Module Module1

Sub Main() Const fiberCost As Double = 0.87 Dim companyName As String = "NO VALUE" Dim numFeet As Double = 0 Dim totalCost As Double = 0 Dim anotherEstimate As String = "n"

Do

Console.Write("Enter company name. ") companyName = Console.ReadLine()

Console.Write("Enter number of feet of fiber to be installed. ") numFeet = Console.ReadLine()

totalCost = numFeet * fiberCost

Console.WriteLine("For your company, " & companyName & ", the total price of the required fiber is $" & totalCost & ".")

Do Console.WriteLine("Would you like to get another esitmate? Type 'y' for yes, 'n' for no: ") anotherEstimate = Console.ReadLine()

Loop Until anotherEstimate = "n" Or anotherEstimate = "y"

Loop Until anotherEstimate = "n"

Console.Write("Press enter to continue...") Console.ReadLine() End Sub

End Module

LAB 3.4

Module Module1

Sub Main() Dim creditsNeeded As Double = 0 Dim creditsEarned As Double = 0 Dim studentName As String = "NO VALUE" Const creditsTotal As Double = 90

Console.WriteLine("Welcome to the Network Systems Administration credit requirement calculator!") Console.WriteLine("What is your name?") studentName = Console.ReadLine()

Console.WriteLine("How many credits have you earned already?") creditsEarned = Console.ReadLine()

creditsNeeded = creditsTotal - creditsEarned

Console.WriteLine("" & studentName & " requires " & creditsNeeded & " credit hours in order to graduate the Network Systems Administration degree program at ITT Tech.") Console.WriteLine("Thank you for using this program. Press enter to continue...") Console.ReadLine()

End Sub

End Module…...

Similar Documents

Premium Essay

Lab 3 Pt1420

...Lab 3.1 Step 1: Variable Name | Problem (Yes or No) | If Yes, what’s wrong? | Declare Real creditsTaken | No | | Declare Int creditsLeft | Yes | Int should be real | Declare Real studentName | Yes | Real should be string | Constant Real credits needed = 90 | Yes | Credits needed should be one word | Step 2: There is no Set keyword used prior to the equation Should be Set creditsLeft = creditsNeeded - creditsTaken Step 3: The student’s name is Nolan Owens Step 4: This program requires 90 credits and they have taken 20 credits so far. Step 5: 1. //Provide documentation on line 2 of what this program does 2. //This program calculates the credits the student has left before graduation 3. //Declare variables on lines 4, 5, 6, and 7 4. Declare Real creditsTaken 5. Declare Real creditsNeeded 6. Declare Real creditsLeft 7. Declare String studentName 8. //Ask for user input of studentName and creditsTaken on line 9 - 12. 9. Input studentName 10. Input degreeName 11. Input creditsNeeded 12. Input creditsTaken 13. //Calculate remaining credits on line 14 14. Set creditsLeft = creditsNeeded - creditsTaken 15. //Display student name and credits left on line 16 and 17 16. Display “The student’s name is”, studentName 17. Display “This means there are”, creditsLeft, “left until graduation.” Lab 3.2 Lab 3.3 Module Module1 Sub Main() 'local variables used in this program Const......

Words: 275 - Pages: 2

Premium Essay

Lab 3

...Lab 3 assessment 1) What is the significance of creating Groups and Users to Groups? Explain Creating groups enables access to specific files rather than giving everyone access to specific files. 2) Given the scenario where there are five database administrators that may periodically need access to a given system. Discuss a concept to better manage these administrators' access permissions. Each administrator will need to have their own password to access the system. 3) The new web administrator's account has been set up and a password provided. What is the process to force a password change upon first long? su -c 'chage -d 0 jtemp' 4) What is the purpose of the "su" command? Explain its significance. su is so that the user can enter superuser mode. 5) Restricting the use of the 'su' command can be configured using what mechanism? Vi /etc/pam.d/su 6) What is the purpose of the login.defs files? Explain the contents and configuration options. The login.defs file contains the maximum number and minimum number of data a password may be used, the minimum acceptable password length, and number of days a warning is given before a password expires. 7) What is the PASS_MIN_DAYS setting? Why would it be a good idea to set the PASS_MIN_DAYS setting? This setting is the minimum number of days allowed between password changes. It's a good idea to set this setting so that the user is always able to change their password. 8) What is the PASS_MAX_DAYS setting?......

Words: 390 - Pages: 2

Premium Essay

Pt1420 Lab 8

...Lab 8.1 Step 2: The hour is 1 continue loop till the hour is 24 then stop. Step 3: Constant Integer Max_Minutes = 60 Declare Integer minutes For minutes = 1 to Max_Minutes Display “The minute is “, minutes End For Step 4: Constant Integer Max_Seconds = 60 Declare Integer seconds For seconds = 1 to Max_Seconds Display “The second is “, seconds End For Step 6: The number is 2 The number is 4 The number is 6 The number is 8 The number is 10 Step 7: Constant Integer Max_VALUE = 200 Declare Integer counter For counter = 20 to Max_VALUE step 20 Display “The number is “, counter End For Step 9: Enter the number of students in class Display however many numbered students you enter Step 11: Loop five times, each asking you to enter a number Displaying the total at the end Step 12: Declare Integer counter Declare Integer totalAge = 0 Declare Real averageAge = 0 Declare Integer age Declare Integer number Display “How many ages do you want to enter: “ Input number For counter = 1 to number Display “Enter age “ Input age Set totalAge = totalAge + age End For averageAge = totalAge / number Display “The average age is “, averageAge Lab 8.2 Lab 8.3 Module Module1 Sub Main() Dim anotherDay As String = "yes" While anotherDay = "yes" Dim totalSpeed As Double = 0 Dim averageSpeed As Double = 0 enterSpeeds(totalSpeed) calcAverage(totalSpeed, averageSpeed) ...

Words: 324 - Pages: 2

Free Essay

Pt1420 Unit 3

...Short Answer: 5. The variable’s name and the variable’s data type must be specified in a variable declaration. 6. The value of an uninitialized variable is either 0 or the value that happens to be stored in its memory location. Algorithm Workbench: 3. a. Set b = 2 + a b. Set a = b * 4 c. Set b = a / 3.14 d. Set a = b – 8 4. a. 12 b. 4 c. 2 d. 6 5. Declare Real cost 6. Declare Int total = 0 7. Set count = 27 8. Set total = 10 + 14 9. Set due = downPayment – total 10. Set totalFee = subtotal * .015 Programming Exercise: 6. Declare Real purchaseAmt Constant Real STATE_TAX = 0.04 Constant Real COUNTY_TAX = 0.02 Declare Real totalTax Declare Real totalSale Display “Enter the amount of purchase” Input purchaseAmt Set stateTax = purchaseAmt * stateTax Set countyTax = purchaseAmt * countyTax Set totalTax = stateTax + countyTax Set totalSale = purchaseAmt * totalTax Display “The amount of your purchase is $”, purchaseAmt, Display “The state tax is $”, stateTax Display “The county tax is $”, countyTax Display “total tax is $”, totalTax Display “The total of the sale is $” totalSale 8. Declare Real mealAmt Constant Real TIP = 0.15 Constant Real SALES_TAX = 0.07 Display Real taxTotal Declare Real totalSale Display “Enter the price of the meal” Input mealAmt Set salesTax = mealAmt * salesTax Set tip = mealAmt * tip Set totalTax = salesTax + tip Set totalSale =......

Words: 254 - Pages: 2

Free Essay

Lab 3

...9. 10. 9. 10. 1. 2. 3. 4. 5. 6. 7. 8. 1. 2. 3. 4. 5. 6. 7. 8. Lab 3: Exploring Busses Justin Faile October 6, 2014 NT1110 Lab 3: Exploring Busses Justin Faile October 6, 2014 NT1110 Lab 3: Exploring Busses Justin Faile October 6, 2014 NT1110 Lab 3: Exploring Busses Justin Faile October 6, 2014 NT1110 1. MagSafe is a series of proprietary magnetically attached power connectors. 2. Ethernet 3. FireWire 4. Thunderbolt – it’s a hardware interface that allows connection for external displays such as MDP (Mini Display Port) 5. USB 3.0 6. SDXC Card Slot 7. Audio Line In/Out 8. Battery Light Indicator 9. Kensington Lock Slot - (K-Slot) anti theft reinforced metal hole used for attaching lock apparatus. 10. 8XSuper Drive – (Disk Drive) http://designchair.co.uk/wp-content/uploads/2011/11/macbook.jpg http://hothardware.com/articleimages/Item1538/small_MacBook-Pro-right-side-view.jpg http://en.wikipedia.org/wiki/Thunderbolt_%28interface%29 http://en.wikipedia.org/wiki/Kensington_Security_Slot 11. MagSafe is a series of proprietary magnetically attached power connectors. 12. Ethernet ......

Words: 273 - Pages: 2

Premium Essay

Lab 3

...LAB 3Ex 3.1.1 We would have a harder time making devices that we use every day.so We would to have multiple routers depending on the devices we own and probably would not be able to use internet when anywhere like we do today. Ex 3.1.2 Laptop and Wireless router model is the easiest model to understand because we use them every day. Ex 3.1.3 Hub – physical  Switch – Data Link Router – Network Review 3.1 1. It would be insufficient because it would have to include the other important layers like data which is what is being sent. 2. Much of the work on the design of OSI was done by a group at Honeywell Information Systems. This group was chartered with advanced product planning and with the design and development of prototype systems. The main idea in OSI is that the process of communication between two end points in a telecommunication network can be divided into layers, 3. The TCP/IP protocols were initially developed as part of the research network developed by DARPA. It was designed to use a number of protocols that had been adapted from existing technologies Lab 3.2: The OSI Reference Model  Ex 3.2.1 1. PHYSICAL (Layer 1) – It describes the electrical/optical and functional interfaces to the physical medium, and carries the signals for all of the higher layers. It provides data encoding. 2. Data Link-The data link layer provides transfer of data frames from one node to another, allowing layers above it to assume virtually error-free......

Words: 584 - Pages: 3

Premium Essay

Lab 3

...Lab 3 TCP\IP networking communication protocols 1. Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address to a physical machine address that is recognized in the local network. 2. The DHCP is used to distribute the main IP and create subnets for all additional computer connected to the same network. The DHCP server will be connected to the router and switch; it will distribute specific IP address to each individual computer so they can all be identified. 3. The DNS is the service that converts/translates the alphabetical name of a domain in to a numeric number known as an IP address. It can assign a specific IP address for a domain www.website.com or subsite.website.com. 4. FTP stands for file transfer protocol and it allows people to transfer files from a local destination to a remote location. A lot of web developers use this protocol because it is the main source of uploading and downloading data to their server. POP3 is the main email protocol that email programs use to retrieve emails from an email server. POP3 physically downloads the email to the local location and usually does not leave a copy of the remote server; there is an option to allow a copy to be saved on the mail server. 5. Student IP was 192.168.1.1 and the target IP is 192.68.1.52 6. There was 13,535 packets were delivered back to the IP source. 7. The 3-way handshake is used to establish a strong connection. The handshake allows the server and client to agree......

Words: 348 - Pages: 2

Premium Essay

Lab 3

...Lab #3 – Assessment Worksheet Data Gathering and Footprinting on a Targeted Web Site Student Name: ___Westley Mixon________________________________________________ Lab Due Date: __________January 28, 2015________________________________________ Overview The first phase of hacking is the footprinting phase, which is designed to passively gain information about a target. In this lab, you performed technical research against three Web domains using Internet search tools. You collected public domain information about an organization using the Google search engine to uncover information available on the Internet. Finally, you recorded the information you uncovered in a research paper, describing how this information can make an organization vulnerable to hackers. Lab Assessment Questions & Answers 1 What information can you obtain by using the WHOIS tool contained within Sam Spade? Domain owner, including contact names, numbers, addresses, and the names of associated servers. 2 Besides the WHOIS utility covered in this lab, what other functions did you discover are possible with the Sam Spade utility? That you can Ping, nslookup, Whois, IP Block, Dig, Traceroute, Finger SMTP Verify, Time, Blacklist, and Abuse Lookup. 3 What is the purpose of the tracert command? What useful information does the trace route tool provide? How can this information be used to attack the targeted website? It identify the network path that must be followed to reach......

Words: 521 - Pages: 3

Free Essay

Lab 3

...Objective To implement the Product of Sums (POS) of a Boolean expression. Components ICs: NOT (7404), 2-input AND (7408), 2-input OR (7432) Lab equipment: breadboard, power supply, multimeter. Problem Derive the Product of Sums (POS) expression from the equation provided below. Y = A’B + B’C’D’ + BCD + AB’CD Note that gates with large number of inputs can be constructed from gates with less number of inputs. Introduction The equation Y=A’B+B’C’D’+BCD+AB’CD needs to be rearranged using a Karnaugh map to support the product of sums circuit. The truth table for the previous experiment, Lab 2 SOP Implementation of Boolean Expressions, is used for the Karnaugh map. IC 7408 and 7432 only has 2 inputs for each gate, so an extra pair is needed to be able to manage the amount of OR gates required. Prelab In order to simplify the equation, the truth table needed to be solved for Y = A’B + B’C’D’ + BCD + AB’CD and converted using a Karnaugh map. During simplification, the coordinates at the 0’s that are grouped up horizontally and vertically, in groups of two, and are divided. When searching for the product of sums the 1’s turn to 0’s, and is a commonly missed error. After simplifying the expression, the schematic was drawn to map out the 2 input gate structure of the ICs: 7404, 7408, and 7432. Truth Table for Y = A’B + B’C’D’ + BCD + AB’CD A’ | B’ | C’ | D’ | A | B | C | D | A’B | B’C’D’ | BCD | AB’CD | Y | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |......

Words: 1506 - Pages: 7

Free Essay

Pt1420 Lab 5

...PT1420T LAB 5.1 – 5.5 Lab 5.1 attAverage >= verizonAverage TRUE tmobileAverage == 868 TRUE verizonAverage < sprintAverage FALSE sprintAverage != attAverage TRUE Lab 5.2 Expected Output Both have average download rates over 800 Nothing AT&T Lab 5.3 Main Module() //Declare variables Declare Integer testScore = 0 Declare String category = “NO VALUE ” Declare String interview = “NO VALUE ” //Make Module calls and pass necessary variables Call gettestScore() Call employCat() Call interviewPoss() Call displayInfo() End Main Module gettestScore(Integer Ref testScore) //Allows the user to enter the test score Display “Please input test score:” Input gettestScore Display (“The interviewee’s test score is:” , gettestScore) End Module Module employCat (Integer gettestScore, String Ref category) //Determines the employment category If gettestScore >= 85 Then Category = “Definitely” Else If gettestScore > 70 AND testScore =< 84 Then Category = “Likely” Else If gettestScore > 60 AND testScore =< 69 Then Category = “Maybe” Else If gettestScore =< 59 Then Category = “No” End If End Module Module interviewPoss(Integer gettestScore, String Ref interview) //Determine if they qualify for an interview based on their test score //Similar to if the score is less than 60, then interview is “No” //Otherwise, interview is “Yes” If gettestScore <......

Words: 462 - Pages: 2

Premium Essay

Lab 3

...MBK – Lab Report Name: __Jade Smart___ Section: ___________________ Aseptic Technique and Culturing Microbes Part 3: Generating Microbial Cultures: Observe your organisms after 24 hours to assess the growth patterns of all tubes. If there is no observable growth allow the tubes to incubate an additional 24 hours. Record your observations. Questions: A. What is the difference between a bactericidal and bacteriostatic agent? Between sterilization and disinfecting? The difference between the two is that bactericidal kills bacteria directly. While bacteriostatic stops the bacteria from growing. Bactericidal will injure the plasma membrane and the cell will leak out, killing it. Bacteriostatic stops bacteria from replicating. The main difference between sterilization and disinfection is, that sterilization kills all microorganisms, while disinfection eliminates harmful microorganisms from inanimate objects and surfaces. Sources: http://study.com/academy/lesson/types-of-antibiotics-bacteriocidal-vsbacteriostatic-narrow-spectrum-vs-broad-spectrum.html http://www.diffen.com/difference/Disinfect_vs_Sterilize B. List five sterilization methods, how they work, and what they are used for. The first form is steam. A machine called an autoclave is heated to 121-134 degrees Celsius. You hold the object there for 15 minutes for 121 degree Celsius or 3 minutes at 134 degree Celsius. It is used to inactivate all fungi, bacteria, viruses,...

Words: 774 - Pages: 4

Premium Essay

Pt1420 Lab 5.5

...1.  Sub Main() 2.         Dim testScore As Integer = 0 3.         Dim category As String = " " 4.         Dim interview As String = " " 5.   6.         getScore(testScore) 7.         employCat(testScore, category) 8.         interviewPoss(testScore, interview) 9.         displayInfo(testScore, category, interview) 10.   11.         Console.WriteLine("Please hit enter to exit...") 12.         Console.ReadLine() 13.           'Daniel Merritt (17486170) 14.     End Sub 15.   16.     Private Sub getScore(ByRef testScore As Integer) 17.         Console.WriteLine("Enter the score: ") 18.         testScore = Console.ReadLine() 19.     End Sub 20.   21.     Private Sub employCat(ByVal testScore As Integer, ByRef category As String) 22.         If testScore <= 59 Then 23.             category = "No" 24.         ElseIf testScore <= 69 And testScore >= 60 Then 25.             category = "Maybe" 26.         ElseIf testScore <= 84 And testScore >= 70 Then 27.             category = "Likely" 28.         ElseIf testScore >= 85 Then 29.             category = "Definite" 30.         End If 31.     End Sub 32.     Private Sub interviewPoss(ByVal testScore As Integer, ByRef interview As String) 33.         If testScore <= 59 Then 34.             interview = "No" 35.         ElseIf testScore <= 69 And testScore >= 60 Then 36.      ...

Words: 255 - Pages: 2

Free Essay

Pt1420 Lab 7

...Lab 7.1 Module main () Declare String keepGoing = “y” While keepGoing == “y” Declare String clientName = “ “ Declare Real feetUTP = 0 Declare Real subTotal = 0 Declare Real taxCost = 0 Declare Real totalCost = 0 Call inputData (feetUTP, clientName) Call calcCosts (feetUTP, subTotal, taxCost, totalCost) Call displayBill (clientName, totalCost) End While End Module Lab 7.2 Lab 7.3 Module Main() Declare integer toPower = 2 Declare integer number = 2 Declare integer counter = 0 While Counter < 7 Set toPower = 2^Number Display 2 to the power of, “number,” is,”toPower,” Counter += 1 Number += 1 End While End Module Lab 7.4 Lab 7.5 Module Module1 Sub Main() Dim keepGoing As String = "yes" Do While keepGoing = "yes" pingMe() Console.Write("Enter yes if you want to run program again") keepGoing = Console.ReadLine() Loop Console.WriteLine("Press enter to continue. ..") Console.ReadLine() End Sub Sub pingMe() Dim counter As Integer = 5 Do While counter > 0 Console.WriteLine("Count down . ") counter = counter - 1 Loop Console.WriteLine("Now ping. ..") Shell("Ping.exe 127.0.0.1", , True) Console.Out.WriteLine(" ") End Sub End Module Lab 7.6 Module Module1 Sub Main() Dim keepGoing As String = "y" ...

Words: 262 - Pages: 2

Free Essay

Pt1420 7 1 Lab

...Unit 7 lab Short Answer Module main () // Declare variable Declare String clientName Declare Real feetUTP=0 Declare Real subtotal=0 Declare Real totalCost=0 Declare String keepgoing=“y” Display “Do you want to make a call?” Type y for yes. Input keepgoing While keepgoing == “y” // Module Calls Call Call Call End Module 7.2 7.3 // Declare loop control variable Declare Integer toPower=2 Declare Integer number=2 Declare Integer counter=0 Do ToPower=number^2 Display “2 to the power of”, number, “is” toPower Counter=counter+1 Number=number+1 While counter < 8 Lab7.4 Declare integer counter = 1 Declare integer toPower = 2 Declare integer number = 2 counter < 7 Display “2 to the power of”, number, “is”, toPower counter = counter + 1 False toPower = 2 ^ number True   Lab7.5 Module Module1 Sub Main() Dim keepGoing As Integer = 1 Dim Count As Integer = 5 pingMe() openWebsite() finalOutput() While Count > 0 Console.WriteLine("Count down ..." & Count) Count -= 1 End While 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("Complete and explanation of what this program does.") Console.WriteLine("The Shell function and ping.exe check for a response from the web......

Words: 298 - Pages: 2

Free Essay

Pt1420 Lab 10

...Lab 10: File Access This lab accompanies Chapter 10 of Starting Out with Programming Logic & Design. Lab 10.1 – File Access and Visual Basic This lab examines how to work with a file by writing Visual Basic code. Read the following programming problem prior to completing the lab. Write and design a simple program that will take 3 pieces of data and write it to a file. Create variables and set them equal to the appropriate values: Declare string firstName = “xxx” Declare string lastName = “xxx” Declare integer age = your age Write this information to a file called myRecords.txt. Next, read this information from the file and print it to the screen. Step 1: Create a new Visual Basic workspace and add the following code: Module Module1 Sub Main() Dim firstName As String = "XXXX" Dim lastName As String = "XXX" Dim age As Integer = #### Dim writer As System.IO.StreamWriter = System.IO.File.CreateText("myRecords.txt") writer.WriteLine(firstName & " " & lastName & " " & age) writer.Close() Dim reader As System.IO.StreamReader = System.IO.File.OpenText("myRecords.txt") Dim myInfo As String = reader.ReadLine() Console.WriteLine(myInfo) reader.Close() 'this causes a pause so you can see your program Console.Write("Press enter to continue...") Console.ReadLine() End Sub End Module Step 2: Change......

Words: 347 - Pages: 2