COMP 230 Full Course - DevryOnlineHelp
6.9K views | +0 today
Follow
Your new post is loading...
Your new post is loading...
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Week 4 Lab VBScript IP Array Lab

http://www.devryonlinehelp.com/product/comp-230-week-4-lab-vbscript-ip-array-lab/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-week-4-lab-vbscript-ip-array-lab/

 

VBScript IP Array Lab

Objective

In this lab, students will complete the following objectives.

·  Create a VBScript Program using NotePad++.

·  Access a two-dimensional array.

·  Use a Nested For Loop to display array contents.

·  Use Do/While loops for error-handling.

·  Use CStr( ), CInt( ), and chr( ) functions.

Element K Network Connections

For this lab, we will only need to connect to vlab-PC1. The computer vlab-PC1 is the computer on the left side while vlab-PC2 is on the right. If you leave the cursor on the PC icon for a few seconds, a tool-tip message will appear indicating the hostname of the PC. Open vlab-PC1 and log in as Administrator with the password password.

Note: All captures must be text only—DO NOT capture the NotePad++ application window or the command prompt window. Use copy and paste of text only.

Task 1: Open IP_Array_start.vbs

·  Open NotePad++ and use File/Open to open  IP_Array_start.vbs in the C:\Scripts directory. Modify theProgrammer Header as needed. and Save As the file with the new name of IP_Array.vbs.

·  The line dim ipAddress(5,3) declares a 6×42-dimensional array. The 5 and 3 give the maximum index value. Since the index starts at 0, this is a 6×4 array.

·  The lines that follow initialize the array locations with IP addresses. The first index (0..5) represents the rooms 100 through 105. The second index (0..3) represent the four computers in each room.

·  The IP address of the third computer in room 104 can be found in the array element or component Address(4,2). This value is “192.168.10.45”. Look at the array carefully to determine the meaning of the index values.

·  Now that you have an initialized two-dimensional array, it will be your job to query the array for the IP address for any computer (1–4) in any room (100–105)

Task 2: Define Program Variables and Query Array for IP Addresses

·  Let’s start by defining our program variables. We need two sets of variables: string variables: roomStr and compStr; and number variables: room and computer. String variables are needed for input and the number variables are used as indices for the ipAddress array.

·  Prompt the user for the room number (100–105). We need to make sure that the user doesn’t enter a value less than 100 or greater than 105. We will use a Do/Loop/While loop to error-handle this value. Look at the pseudocode shown below and write the required VBScript statement that implement the pseudocode task.Real code that is correct as written will be in bold.

Do
Display Prompt “Please Enter the Room Number (100-105) …… “
Get StdIn Console Input and assign string value to roomStr
(roomStr)

If room < 100 OR room > 105Then
Use StdOut to Beep Speaker twice with chr(7) and
Display ErrMsg “Error, 100 to 105 Only!!!”

  Skip 1 Line

  End If
Loop While room < 100 OR room > 105

·  Now we prompt the user for the computer number (1–4). We need to make sure that the user doesn’t enter a value less than 1 or greater than 4. We will again use a Do/Loop/While loop to error-handle this value. Look at the Pseudocode shown below and write the required VBScript statement that implement this pseudocode task. Real code that is correct as written will be in bold.

Do
Display Prompt “Please Enter the Computer Number (1-4) …… “
Get StdIn Console Input and assign string value to compStr
(compStr)

If computer < 1 OR computer > 4Then
Use StdOut to Beep Speaker twice with chr(7) and
Display ErrMsg “Error, 1 to 4 Only!!!”

Skip 1 line
End If
Loop Whilecomputer < 1 OR computer > 4

Now that we have a valid room number 100–105 and a valid computer number 1–4, let’s display the IP address for the specified room and computer as follows

Display message ” The IP Address in Room ” & room &  ” for computer ” & computer  & ” is ”  & ipAddress(room-100,computer-1)

 

Note: For room 102, Computer 2, the IP Address is found at ipAddress(2,1). How do you convert room 102 to index 2 and Computer 2 to index 1?

 

Task 3: Prompt User to Display All IP Addresses in Array

·  Now write the code that follows the pseudocode shown below to prompt the user if they would like to display the entire table of IP addresses. Real code that is correct as written will be in bold.

‘ Display All IP Address Y/N?

Do

Display Message

“Do you wish to Display all of the IP Addresses (Y/N) ….. ”

Get User Response and assign it to variable ans

If ans <> “Y” & ans <> “y” & ans <> “N” & ans <> “n” Then

Beep Speaker Twice and

Display Msg “Error, Y,y,N,n response Only!!!” & skip line

End If

Loop While ans <> “Y” & ans <> “y” & ans <> “N” & ans <> “n”

If OR Then

skip line

  For to 5

  For to 3

Display “The IP Address in Room ” room+100 “ for Computer ”

computer+1 ” is ” ipAddress(room,computer)

Next

Next

 End If

Note: Nested For/Next loops are required to access all the elements of a two-dimensional array.

Task 4: Finish Program and Run it Showing Error-Handling

·  Finishing writing your program. Include comments as needed and use proper rules for indentation. Run your program using <F6> in NotePad++ using cscript IP_Array.vbs. so that error-handling for Room, Computer, and ans input is tested. Make sure your submitted run displayed the IP Address of a selected room and computer and displays the entire array of IP addresses. A sample run is shown on the next page.

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Week 3 Lab VBScript Network Shares Lab | DeVry Online Help

http://www.devryonlinehelp.com/product/comp-230-week-3-lab-vbscript-network-shares-lab/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-week-3-lab-vbscript-network-shares-lab/

 

VBScript Network Shares Lab

Objectives

In this lab, students will complete the following objectives.

·  Create a VBScript Program using NotePad++.

·  Use WScript.Shell object and its methods.

·  Use Scripting.FileSystemObject and its methods.

·  Use LanmanServer,FileService objects and its methods.

·  Use WScript.Network object and its methods.

Element K Network Connections

For this lab, we will need to connect to vlab-PC1 and vlab-PC2. The computer vlab-PC1 is the computer on the left side while vlab-PC2 is on the right. If you leave the cursor on the PC icon for a few seconds, a tool-tip message will appear indicating the  hostname of the PC. Open  vlab-PC1 and login as Administrator with the password password. Return to the network and open vlab-PC2 and login as Administrator with the password password.

Note: All captures must be text only—DO NOT capture the NotePad++ application window or the command prompt window. Use copy and paste of text only.

Task 1: NetShareServer.vbs Program on vlab-PC1

·  On vlab-PC1, open NotePad++ and from the File menu, select New.

·  Create a Programmer Header that includes the name of your VBScript file, your name, the date, the class, and the name of your professor. Each of these VBScript comment lines begin with a (‘) character

·  From the File menu, select Save. Save your program as NetShareServer.vbs in the C:\Scripts folder as shown below.

·  Define the Scripting.FileSystemObjectfso that provides control of local folders and files. The“WinNT://hostname/LanmanServer,FileService object fileServ allows us to create and manage network shares similar to the NET SHARE commands we discussed last week.

Note: When you create the fileServ object, the hostname value vlab-PC1 must match the hostname of the computer acting as the server. If you don’t know your Windows hostname, open a Windows CLI and execute the hostname command. 

Task 2: Create a Folder and Copy Files to the New Folder

·  Use the fso.CreateFolder( ) to create the folder C:\Public. The path and name of the folder to be created is place inside the parentheses and delimited with double quotes

·  Use the fso.CopyFile method to copy all files in the C:\Windows\Cursors\  folder that start with the letterw to the C:\Public folder. There are no parentheses used for this method. The syntax for this method is

Note: The first argument is the file/s to be copied and second argument (after the ,) is the destination folder.

Skip several lines and enter the following statements. The WScript.Echo statement simply outputs a new line and announces the end of the program

Save your program (<Ctrl>S). Press the <F6> function key and enter: cscript NetShareServer.vbs. ClickOK to execute your program.

Below is the run of the program. It should run without errors although it does not produce any output. Check to see if the program successfully created the C:\Public directory and copied the files from the C:\Windows directory by clicking in the NotePad++ console window and entering the command: dir C:\Public as shown below. You could also open the Windows CLI and execute the same command to test your script.

Go to the command line or Windows Explorer to verify that C:\Public folder has been created and populated with some files. If you have any problems with the RUN, delete the C:\Public folder if it exists in Windows Explorer and re-run the script from the Windows CLI using cscript. Check your VBScript program for errors, make the needed changes, delete the C:\Public folder if it exists, and run the program again.

Task 3: Display Current Network Shares and Create New Share

Skip a line after the fso.CopyFile line and enter the following program lines.

WScript.Echo displays a message to the console windows or desktop. The For Each Next loop is used to display all of the current network shares on the local computer. From the Windows CLI, the NET SHAREcommand would display the same information.

Note: The For Each Next loop is a special For loop used to access the elements or components in an array. The fileServ object contains an array name( ) that contains all the current network shares fileServ.name(0) .. fileServ.name(n) where n is the last index in the array.

Within a VBScript program, you need to use the “LanmanServer,FileService” object to create a new network share. Enter the following lines to share the “C:\Public” folder with the share name PublicData. Note where the share name and folder path go in the following commands. MaxUserCount sets the maximum simultaneous connections allowed for this share.

After we have created the new share, we want see if the new PublicData share has been added. Type the following code to view the current shares again. The WScript.Echo vbCrLf command displays a blank lin

Save your program (<Ctrl>S). Press the <F6> function key and enter: cscript NetShareServer.vbs. ClickOK to execute your program.You should get an error message as shown below because the folder you are trying to create now already exists.

Add a new line just above the fso.CreateFolder( ) line with this statement: On Error Resume Next. This statement will ignore noncritical errors and allow the program to continue.

Save your program (<Ctrl>S) and press the <F6> function key and enter: cscript NetShareServer.vbs. Click OK to execute your program.You should get a run in the console windows similar to the one below. Verify that the new network share “PublicData” has been created.

Note: If you have errors and need to re-run the program at this point in the development, you may see thePublicData share in both the Current and New Shares because the share may still be valid from your earlier run.

Task 4: Add Time Delay, Delete PublicData Share, and Delete C:\Public

·  Just above the End of Program message, add the following code. The WScript.Sleep(60000) will pause the script for 60 seconds (or 60,000 milliseconds). The fileServ.Delete and fso.DeleteFolder methods will delete the Network Share and delete the C:\Public folder and the files it contains.

·  Save your program (<Ctrl>S) and press the <F6> function key and enter: cscript NetShareServer.vbs. Click OK to execute your program.You should get a run in the NotePad++ console window similar to the one shown on the next page. Wait until you see the End of Program after the 60-second delay.

Copy and paste your NetworkShareServer program sourcecode from NotePad++ and your Run from the NotePad++ Console or the Windows CLI RUN into the spaces provided in your lab-reportdocument.

Task 5: NetShareClient.vbs Program on vlab-PC

Leave vlab-PC1 open and return to the Network diagram and select vlab-PC2. If it isn’t labeled, it will be the computer on the right.

Once the vlab-PC2 computer opens, log in as Administrator with a password of password. Cascade the two computer windows, so you can go easier from one computer to the other as shown below.

Open NotePad++ on vlab_PC2 and create a Programmer Header that includes the name of your VBScript file, your name, the date, the class, and the name of your professor. Each of these VBScript comment lines begin with a (‘) character. Save your program as  NetShareClient.vbs.

Task 6: Map the Shared Folder to X: and Display Files

You will need to create Scripting, FileSystemObject called fso to display the files in the mapped drive. The WScript.Network object networkObj actually does the mapping and unmapping of the network share to drive X:.

The UNC notation network share we want to access is \\vlab-PC1\PublicData. Keep in mind that the network share PublicData can be anywhere on the network and is not typically a local share. ThenetworkObj.MapNetworkDrive method is used to map the network share on vlab-PC1 to X: drive on vlab-PC2. The Set (“X:\”) creates a folder object for the mapped X: drive.

The line Set creates files collection object that contains all of the files in the X:\ folder. The For Each loop sequences through the items in the files collection object and displays those files. Type in the code shown on the next page.

Save your program (<Ctrl>S) and complete the remaining VBScript code that will display the contents of the mapped drive X:, unmap the mapped drive X: and end the program with the message: End of Program.

Check your NetShareClient.vbs program for errors and save it using <Ctrl>S

Task 7: Final Run of NetShareServer and NetShareClient

Return to vlab-PC1 and start the NetShareServer.vbs program running with <F6>. As soon as the vlab-PC1 NetShareServer.vbs program is running, quickly return to vlab-PC2 and start the NetShareClient.vbsprogram with <F6>. Remember, you only have 60 seconds after you have started the NetShareServer program to successfully run the NetShareClient program.

If you do not get the output shown above, for the NetShareClient.vbs program. Correct any errors and re-save your program. Run the NetShareServer program again on vlab-PC1 and run the corrected NetShareClient program on vlab-PC2.

Copy and paste your NetShareClient program sourcecode from NotePad++ and your NotePad++ console run (or Windows CLI run) into the spaces provided in your lab-reportdocument. Submit your completed lab-reportdocument to the iLab Dropbox for this week.

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Week 2 Lab VBScript Input/Process/Output Lab | DeVry Online Help

COMP 230 Week 2 Lab VBScript Input/Process/Output Lab | DeVry Online Help | COMP 230 Full Course - DevryOnlineHelp | Scoop.it

http://www.devryonlinehelp.com/product/comp-230-week-2-lab-vbscript-inputprocessoutput-lab/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-week-2-lab-vbscript-inputprocessoutput-lab/

 

VBScript Input/Process/Output Lab

Objectives

In this lab, students will complete the following objectives.

• Create a VBScript Program using NotePad++.

• Learn various objects and methods used for data input.

• Learn various objects and methods used for the display of data.

Element K Network Connections

For this lab, we only need to connect to vlab-PC1. This is the computer on the left side. If you leave the cursor on the PC icon for a few seconds, a tool-tip message will appear indicating the  hostname of the PC.

Note: All captures of Script code must be text only, DO NOT capture the NotePad++ application window. Script run to the Command Prompt or NotePad++ Console window must also Text only capture. Runs of programs that display a Desktop window required <Alt><PrtSc> to capture the output window.

 

Task 1: Practice using NotePad++

Before starting VBScript Input/Output lab, you should practice using NotePad++ to run and debug VBScript programs.

1.  Open the NotePad++ program by double-clicking on the NotePad++ desktop icon or single-clicking on the Quick Launch bar NotePad++ icon.

2.  Click on the File/Open toolbar icon (or use the File/Open menu option). Navigate to theC:\Scripts\Demos directory and select the EchoDemo.vbs program. Click the Open  button.

3.  The EchoDemo.vbs program should appear in NotePad++  as shown below

·  To run the program, press the <F6> function key and type cscript EchoDemo.vbs and click OK as shown below. CScript is the WSH Interpreter for running VBScript programs in a console window.

4.  The program output is shown in the Built-in Console window in NotePad++. The Console window may be docked on the top, bottom, left or right side of the screen. For longer program runs, docking the console window on the right-hand side is recommended.

5.  Run the program again by pressing the <F6> function key, but this time type wscript EchoDemo.vbsand click OK as shown below. WScript is the WSH Interpreter for running VBScript programs in a desktop window.

6.  The run is now displayed in a desktop window instead a the NotePad++ console window. Click OK to close the window.

7.  Now let’s look at the the NotePad++ debugging procedure for a VBScript console program.

8.  Change  line 6 as shown below misspelling the word Echo. Save the program by pressing <Ctrl>S.

9.  Run the program using <F6>, cscript EchoDemo.vbs¸ OK. This time, the program doesn’t run, but an error message is displayed with the line numbere where the error was detected.

10.  Correct the error and save the changes with <Ctrl>S.12. Other suggested demos programs you should run that relate to this week’s lab include:
CmdArgs.vbs, InputBoxDemo.vbs, PopUpDemo.vbs, StdInDemo.vbs and
StdOutDemo.vbs.

Task 2: NameAge.vbs Script using Console Input and Output Stream

·  From the File menu, select New.

 

·  In the Source Code editor, create a Programmer Header that includes the name of your VBScript file, your name, the date, the class, and the name of your professor. Each of these VBScript comment lines begin with a(’) character.

·  From the File Menu, select Save. Save your program as NameAge.vbs in the C:\Scripts folder as shown below. Subsequent saves can be accomplished using the hotkey <Ctrl>S.
·  After your Programmer header, add the comment line shown below and define the variable name andageStr. By assigning the “” value to name and ageStr, we are declaring them to be string variables that can store alpha numeric character

·  WScript.StdOut is the Standard Output stream object that sends text to the console window. It has three methods of interest to us. Write( ), WriteLine( ) and WriteBlankLines( ). We will use Write to prompt the user for an input value. Note that the value inside the parentheses must be a string value. Here we are using a string constant in double quotes. Note that I have added a line of periods terminated by a space to make the prompts and input values line up. The Write method does not output a <Cr><Lf> but keeps the cursor on the same line. This is what we need to keep the prompt and the input values on the same line. The WriteLine  between the two prompts is used to skip one line. WScript.StdIn is the Standard Input stream object that receives input from the keyboard. Here we are using the ReadLine method to accept lines of text from the keyboard terminated by a carriage return (<Enter> key).

·  Now that we have the user’s age, we will create a new string variable called ageStr10 and give it a calculated value that is a string equivalent of the user’s age plus 10 years. The following steps are required.

1. Convert the ageStr value into an number (integer) value using the CInt( ) function.
2. Add 10 to the CInt( ) converted ageStr value.
3. Convert the sum of the CInt( ) converted ageStr + 10 into a string equivalent value using the
CStr( ) function.
4. Assign the CStr( ) converted sum of age + 10 to the variable ageStr10.

CInt(strval) and CStr(numval) are VBScript conversion functions. All user input and output are string values. Given a ageStr has a value of “56”: CInt(ageStr)+10 gives the integer (whole number) value 66. Therefore ( CInt(ageStr)+10)  ) assigns the value “66” to ageStr10. Do you see how all four steps are accomplished in a single code line?

·  Let’s skip two lines and display the user’s name and age, The WriteBlankLines( ) method is used to skip two lines and the WriteLine( ) method displays our text output to the console window and sends a <newline> at the end to move the cursor to the beginning of the next line. The & symbol is used to add multiple strings together. The vbTab is a tab character that moves the cursor to the next horizontal tab position to help line up data.

·  Now we need to display the value for the user’s age in 10 years. Below are the remaining lines of our program. At the end of the first line, notice the & _. The _ is the line continuation character. The rest of the WriteLine statement is continued on the next line. This continued line contains ageStr10 variable & vbCrLf.

·  Save your program (<Ctrl>S). Press the <F6> function key and enter: cscript NameAge.vbs. Click OK to run your program.  Your program will run in the NotePad++ console window.
Note: You need to click within the NotePad++ console window so you can enter the name and age values. A sample RUN of the completed program is shown below.

The user is prompted for their full name and age.

After receiving this data input from the keyboard, two blank lines are displayed and the user’s full nameand age values are displayed.

After skipping one more line, the user’s age in 10 years will be calculated and displayed.

After one more skipped line, the End of Program message is displayed.

·  If you prefer, you can open the Windows CLI and run the program directly from the command prompt  as shown below.

·  Before we exit this program and begin the next one, let’s explore the limitations of using the StdIn and StdOut streams. Press <F5> and edit the “The Program to Run” to read wscript C:\Scripts\StdinStdout.vbs. Wscript is supposed to send output to a pop-up window on the desktop. Click Run and let’s see what happens.  You should have received the error message shown below. Bottom line, StdIn and StdOut streams only work for console programs only.
Note: When using <F5> (Run), the entire path to the script must be included. The complete path is not required when using <F6> (Execute). The reason we didn’t use <F6> for this test is because all standard input (StdIn) and standard output (StdOut) uses the built-in NotePad++ console window instead of unsuccessfully trying to send it to a desktop window.

Running the NameAge.vbs program from the Windows CLI with wscript will generate the same  error as shown below.

 

Task 3: PopUpWindow.vbs Script using WScript.Echo for output

 

·  We are going to use the NameAge.vbs as a starting point for our next program. Save As your NameAge.vbs program with the name PopUpWindow.vbs.

·  Change the variable definition lines for name and AgeStr to

·  Delete all the lines shown below that we used for User prompts and keyboard input.

·  Also delete the line: WScript.StdOut.WriteBlankLines(2)

·  Change the remaining four Writeline statements as follows.
Replace the WScript.StdOut.WriteLine( portion of the remaining lines with WScript.Echo . Also remove the closing parentheses from each of these lines.

For example the statement: WScript.StdOut.Writeline(“Your name is “ & vbTab & vbTab & name)would be replaced with WScript.Echo “Your name is “ & vbTab & vbTab & name. Make the same changes for the remaining lines.

·  Save the program (<Ctrl>S) and press <F6>. Change the command to cscript PopUpWindow.vbs. ClickOK. You should get the console output shown below.

As you can see the WScript.Echo output of this program looks very much like the WScript.StdOut.Write( ) output of the NameAge.vbs program.

·  Now press <F6> change cscript to wscript and click OK.

·  Let review what we’ve learned about WScript.StdOut.Write( ) and WScript.Echo?

1. You cannot use the wscript interpreterto run any VBScript program that contains
WScript.StdOut or WScript.StdIn methods.
2. A VBScript program containing only WScript.echo for output can be run as a Console app
using cscript or a Windows app using wscript.
3. wscript creates a new PopUpWindow for every time WScript.Echo command encountered.

 

·  If we want all of our output to appear in one pop-up window, we will have to put all of our output into a single WScript.Echo statement. The approach we will use in this program is to concatenate (add) all of the output into a single string and then output that string with WScript.Echo.

·  Remove the WScript.Echo in front of all of the individual message lines that produce output. Define a variable msgStr and assign all of the output as a continuous string to this variable. Use a WScript.Echo to output msgStr. Your revised script code for output should be as follows.

·  Save your revised program <Ctrl>S and run it again by pressing <Ctrl><F6> key. <Ctrl><F6> automatically executes the last <F6> command (wscript PopUpWindow.vbs).

This time the output should appear in a single pop-up window as follows.

Copy your revised PopUpWindow.vbs program from NotePad++ and paste it into the space specified for thePopUpWindow.vbs programin your lab-reportdocument. Run your program again and when the pop-up window appears, press <Alt><PrtSc> to capture the desktop output window. Paste this window into the space provided for the PopUpWindows.vbs Run in your lab-reportdocument.

Note: Some laptops require <Fn><Alt><PrtSc> to capture the active window.

 

Task 4: CmdArgs.vbs Script Demonstrating Command Line Arguments 

·  Return to NotePad++. We are going to use the PopUpWindow.vbs program as a starting point for our last program. In the File menu, select SaveAs. Save your PopUpWindows.vbs script as CmdArgs.vbs. Change the programmer header of your new program as needed.

·  Many scripts or programs use command-line arguments to receive user data. Command-line arguments are data entered at the end of the same command line that runs the script. Here’s an example of our script using command-line arguments.

cscript CmdArgs.vbs ”Jane Doe” 35.

The values “Jane Doe” and 35 will be passed to the script and assigned to the variables name and ageStr. Note that “Jane Doe” is in double quotes. Without the double quotes, Jane and Doe would be considered two separate command-line arguments.

·  Make the following changes to your program.

 

·  Lines 7 through 16 have been added or (in the case of lines 15 and 16) modified. Lines 17 through 25 have not been changed although they now have different line numbers to the beginning of your program (just after the programmer header comments).

Note: Command-line arguments are managed by the WScript.Arguments object. Set this object to
the name args so we can args in place of WScript.Arguments. The next statement is an if
statement that checks to see if you have entered the two required arguments. If you haven’t
(args.count < 2), an error message is displayed, and after 5 seconds the program terminates
using the WScript.Quit statement. If you have entered the two arguments, the if statement is
bypassed and the argument values are assigned to name (args.item(0)) and ageStr
(args.item(1)). args.item is an array where the first item is (0), the second item is (1).

 

·  Save your program (<Ctrl>S),  open the Windows CLI (Command Prompt) and change directory to the C:\Scripts folder. Execute the program the first time without any arguments: script

·  Execute it a second time with your own name in double quotes and your age. Note the double quotes are required if there are any spaces in the argument values.

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Final Exam (Set 3) | DeVry Online Help

http://www.devryonlinehelp.com/product/comp-230-final-exam-set-3-2/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-final-exam-set-3-2/

 

1. (TCO 7) The general syntax of an SQL select statement is _____.

2. (TCO 7) In a VBScript SQL Query statement, what Boolean operator can be used to test a set of conditions whereby all conditions must be true?

3. (TCO 7) What SQL clause is used in a VBScript program to determine the fields to be displayed in an SQL Query statement?

4. (TCO 7) What SQL clause is used in a VBScript program to determine the Table or Tables to be accessed in an SQL Query statement?

5. (TCO 1) The name of the service that controls the queue of print jobs with the Windows NET command is _____.

6. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to 192.168.100.10 255.255.255.0 with a metric of 1 is _____.

7. (TCO 1) The Windows CLI command that is used to display the extensions recognized as executable files is _____.

8. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to a DHCP-supplied IP address is _____.

9. (TCO 6) To delete a file in VBScript, use the following command (assuming that fso is a Scripting.FileSystemObject).

10. (TCO 6) What WSH object is required for VBScript File I/O?

11. (TCO 6) To create a new file in a VBScript program, use the following command (assuming that fso is an instance of Scripting.FileSystemObject).

12. (TCO 2) What is an example of a string constant?

13. (TCO 2) Given the rules of operator precedence, what value would the variable contain after the following statement was executed? distance = 2 + 21 / 3

14. (TCO 2) What is an example of a numeric constant?

15. (TCO 2) String constants and _____ refer to the same concept

16. (TCO 2) What is the assignment operator?

17. (TCO 5) When a subroutine or function is useful, you may want to use it more than once within a program or in other programs. This concept is known as _____.

18. (TCO 5) Which one of the following is a feature of good program design?

19. (TCO 3) Only one of the relational expressions being evaluated must be true in order for the entire expression to be evaluated as true. The VBScript Boolean operator that defines this evaluation is _____.

20. (TCO 3) The VBScript Boolean operator AND is used to evaluate multiple conditions where _____.

21. (TCO 3) Which VBScript Boolean operator has the highest precedence?

22. (TCO 3) If you are asked to write a VBScript program that prints a list of books that have fewer than 30 pages and more than 100 pages. What type of Boolean Operator would you use?

23. (TCO 3) In VBScript, when you combine Boolean operators, the _____ operators take precedence, meaning their values are evaluated first.

24. (TCO 4) What is the issue with the following VBScript Do While loop?
count = 1
Do while count < 10
WScript.Echo count
count = count – 1

25. (TCO 4) How many times will the following VBScript Do While loop execute the loop body?

26. (TCO 4) When a variable is incremented by 1, _____.

27. (TCO 4) VBScript arrays are most efficiently processed using _____.

28. (TCO 4) The value of array subscripts are always _____.

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI NET commands that will turn the WORKSTATION service OFF and then ON

3. (TCO 2) Give the order of precedence for all of the arithmetic operators and the parentheses

4. (TC0 3) A movie theater manager says, “Provide a discount to patrons who are under 13 years old and those who are over 64 years old; otherwise, charge the full price.” Write the VBScript code that implements this logic. Assume the variables age and price and the constants DISCOUNT_PRICE and FULL_PRICE.

1. (TCO 4) Write the VBScript code that displays all of the integers stored in the array numArray(100) .

2. (TCO 5) Write a VBScript function called GetName( ) that prompts the user to input his or her name and returns the name value. Use the StdIn and StdOut streams for input and output

3. (TCO 6) Write the VBScript code that defines the Scripting.FileSystemObject and the file C:\Data\DataFile.txt for appending. Make sure the file will be created if it doesn’t exist, and ensure that the format is ASCII.

4. (TCO 7) Assuming that you are connected to a database called Computers.mdb with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, and HDD_Size, write the SQL Query String sqlStr such that the fields Computer, Hostname, and CPU_Type will be displayed for all records CPU_Type is “AMD” and the Bit_Size is 64. The returned records should be sorted by Hostname

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Final Exam | DeVry Online Help

COMP 230 Final Exam | DeVry Online Help | COMP 230 Full Course - DevryOnlineHelp | Scoop.it

http://www.devryonlinehelp.com/product/comp-230-final-exam-2/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-final-exam-2/

 

1. (TCO 7) The general syntax of an SQL select statement is _____.

2. (TCO 7) In a VBScript SQL Query statement, what Boolean operator can be used to test a set of conditions whereby all conditions must be true?

3. (TCO 7) The _____ in a table is the column that makes each record different from all others

4. (TCO 7) What task(s) are involved in designing a database table?

5. (TCO 1) Which of the following Windows commands will shutdown and restart the computer FileServer in 2 minutes?

6. (TCO 1) Which Windows shutdown command switch is used to shutdown and turn off a local or a remote computer?

7. (TCO 1) Which one of the following Windows NET commands options is not used to control services with the NET ?????ServiceName?

8. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to a DHCP-supplied IP address is _____.

9. (TCO 6) The following VBScript statement will open a text file

10. (TCO 6) In creating a VBScript Scripting.FileSystemObject, you must start the code line with

11. (TCO 6) The following VBScript statement will open a text file.

12. (TCO 2) What is the problem with the following statement? average = (60 + 75) /100

13. (TCO 2) What is the multiplication operator?

14. (TCO 2) What is the assignment operator?

15. (TCO 2) What is the best choice for a variable name representing an interest rate

16. (TCO 2) If a variable holds the value “Ferrari,” what is its data type?

17. (TCO 5) In what way do VBScript named constants differ from variables?

18. (TCO 5) Variables declared in the main section of a VBScript program have what scope?

19. (TCO 3) What characters can be used to force operator precedence?

20. (TCO 3) What produces the same result as the following pseudocode?

21. (TCO 3) What VBScript Boolean operator could be used to replace the nested selection structure in this pseudocode?

22. (TCO 3) In VBScript, when you combine Boolean operators, the _____ operators take precedence, meaning their values are evaluated first

23. (TCO 3) A decision that is inside of another decision is known as a _____ decision

24. (TCO 4) What is the problem with the following VBScript Do While loop?

25. (TCO 4) The number of elements in an array is called the _____ of the array

26. (TCO 4) How many times will the following VBScript Do While loop execute the loop body?

27. (TCO 4) VBScript arrays are most efficiently processed using _____.

28. (TCO 4) In VBScript, the array declaration dim data(10) indicates the array data can have a maximum of _____ elements or components

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI NET commands that will turn the Spooler service OFF and then ON

3. (TCO 2) Write the VBScript code lines that define a constant TAXRATE that is 25%, a variable basePay that is $1000, and a variable bonusPay that is $500. Calculate the net pay, and assign that value to netPay. Then, calculate the taxes, and assign that value to taxWithheld

4. (TC0 3) Given the variables hoursWorked and payRate, write the VBScript code that will calculate grossPay such that all hoursWorked 40 will be paid at time and a half

1. (TCO 4) Write the VBScript code that uses a Do Until loop to display all of the integer values stored in the array numArray(100)

2. (TCO 5) Write a VBScript function called MaxNum that accepts two numbers and returns the largest to the two numbers

3. (TCO 6) Write the VBScript code that defines the Scripting.FileSystemObject and the file C:\Data\DataFile.txt for writing. Make sure the file will be created if it doesn’t exist, and ensure that the format is ASCII

4. (TCO 7) Assuming that you are connected to a database called Computers.mdb with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, Speed and HDD_Size, write the SQL Query String sqlStr such that all the fields will be displayed for the records that indicate a speed less than two and a memory value less than four. The returned records should be sorted by Room_Num

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Week 3 Quiz

http://www.devryonlinehelp.com/product/comp-230-week-3-quiz/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-week-3-quiz/

 

1. (TCO 3) What decision structure will perform the following logic?

if customerCode is not equal to 1 then
discount = 0.25
else
discount = 0.50

2. (TCO 3) In VBScript, the _____ sign means greater than.

3. (TCO 3) Every condition in a chain of conditions in a Boolean expression must be true in order for the entire expression to be evaluated as true. This defines the _____ Boolean operator in VBScript

4. (TCO 3) What logic operator could be used to replace the nested selection structure in this pseudocode?

if empMedicalIns = “paid” then
print empIdNumber
endif

if empDentalIns = “installments” then
print empIdNumber
endif

5. (TCO 3) Which one of the following object definitions is used in a VBScript program to Map and Un-map shared network folders to a drive letter?

6. (TCO 3) Which one of the following object definitions is used in a VBScript program to create and delete shared network folders?

more...
danny's curator insight, November 16, 2014 5:37 PM

1. (TCO 3) What decision structure will perform the following logic?

if customerCode is not equal to 1 then
discount = 0.25
else
discount = 0.50

2. (TCO 3) In VBScript, the _____ sign means greater than.

3. (TCO 3) Every condition in a chain of conditions in a Boolean expression must be true in order for the entire expression to be evaluated as true. This defines the _____ Boolean operator in VBScript

4. (TCO 3) What logic operator could be used to replace the nested selection structure in this pseudocode?

if empMedicalIns = “paid” then
print empIdNumber
endif

if empDentalIns = “installments” then
print empIdNumber
endif

5. (TCO 3) Which one of the following object definitions is used in a VBScript program to Map and Un-map shared network folders to a drive letter?

6. (TCO 3) Which one of the following object definitions is used in a VBScript program to create and delete shared network folders?

Felipe Gomez's curator insight, January 26, 2015 8:59 PM

answer

Felecia Frazier's curator insight, September 20, 2015 3:00 PM

Help

Scooped by Brazilwoolard
Scoop.it!

COMP 230 Week 2 Quiz | DeVry Online Help

COMP 230 Week 2 Quiz | DeVry Online Help | COMP 230 Full Course - DevryOnlineHelp | Scoop.it

http://www.devryonlinehelp.com/product/comp-230-week-2-quiz/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-week-2-quiz/

 

1. (TCO 2) What is the problem with the following statement?
100 = grade

2. (TCO 2) An English-like statement used to describe the logic of a program is known as _____.

3. (TCO 2) An identifier can be the name for a _____.

4. (TCO 2) What is the best choice for a variable name representing a payroll tax value?

5. (TCO 2) What is an example of a string constant?

6. (TCO 2) What is an example of a numeric constant?

7. (TCO 2) If a variable held the value “Ferrari,” what would be its data type?

8. (TCO 2) When a variable is given a data type and a name it is known as a _____.

9. (TCO 2) Given the rules of operator precedence, what value would the variable contain after the following statement was executed?

distance = 2 + 5 * 5 + 5

10. (TCO 2) Which one of the following VBScript Input Methods will allow the user to type data terminated by the <Enter> key into a VBScript program from the Windows CLI when prompted by the program?

11. (TCO 2) Which one of the following VBScript Methods will determine the number of command-line arguments passed to a program?

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Final Exam 3 Sets | DeVry Online Help

COMP 230 Final Exam 3 Sets | DeVry Online Help | COMP 230 Full Course - DevryOnlineHelp | Scoop.it

http://www.devryonlinehelp.com/product/comp-230-final-exam-3-sets/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-final-exam-3-sets/

 

COMP 230 Final Exam Set 1

 

1. (TCO 7) The general syntax of an SQL select statement is _____.

2. (TCO 7) In a VBScript SQL Query statement, what Boolean operator can be used to test a set of conditions whereby all conditions must be true?

3. (TCO 7) The _____ in a table is the column that makes each record different from all others

4. (TCO 7) What task(s) are involved in designing a database table?

5. (TCO 1) Which of the following Windows commands will shutdown and restart the computer FileServer in 2 minutes?

6. (TCO 1) Which Windows shutdown command switch is used to shutdown and turn off a local or a remote computer?

7. (TCO 1) Which one of the following Windows NET commands options is not used to control services with the NET ?????ServiceName?

8. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to a DHCP-supplied IP address is _____.

9. (TCO 6) The following VBScript statement will open a text file

10. (TCO 6) In creating a VBScript Scripting.FileSystemObject, you must start the code line with

11. (TCO 6) The following VBScript statement will open a text file.

12. (TCO 2) What is the problem with the following statement? average = (60 + 75) /100

13. (TCO 2) What is the multiplication operator?

14. (TCO 2) What is the assignment operator?

15. (TCO 2) What is the best choice for a variable name representing an interest rate

16. (TCO 2) If a variable holds the value “Ferrari,” what is its data type?

17. (TCO 5) In what way do VBScript named constants differ from variables?

18. (TCO 5) Variables declared in the main section of a VBScript program have what scope?

19. (TCO 3) What characters can be used to force operator precedence?

20. (TCO 3) What produces the same result as the following pseudocode?

21. (TCO 3) What VBScript Boolean operator could be used to replace the nested selection structure in this pseudocode?

22. (TCO 3) In VBScript, when you combine Boolean operators, the _____ operators take precedence, meaning their values are evaluated first

23. (TCO 3) A decision that is inside of another decision is known as a _____ decision

24. (TCO 4) What is the problem with the following VBScript Do While loop?

25. (TCO 4) The number of elements in an array is called the _____ of the array

26. (TCO 4) How many times will the following VBScript Do While loop execute the loop body?

27. (TCO 4) VBScript arrays are most efficiently processed using _____.

28. (TCO 4) In VBScript, the array declaration dim data(10) indicates the array data can have a maximum of _____ elements or components

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI NET commands that will turn the Spooler service OFF and then ON

3. (TCO 2) Write the VBScript code lines that define a constant TAXRATE that is 25%, a variable basePay that is $1000, and a variable bonusPay that is $500. Calculate the net pay, and assign that value to netPay. Then, calculate the taxes, and assign that value to taxWithheld

4. (TC0 3) Given the variables hoursWorked and payRate, write the VBScript code that will calculate grossPay such that all hoursWorked 40 will be paid at time and a half

1. (TCO 4) Write the VBScript code that uses a Do Until loop to display all of the integer values stored in the array numArray(100)

2. (TCO 5) Write a VBScript function called MaxNum that accepts two numbers and returns the largest to the two numbers

3. (TCO 6) Write the VBScript code that defines the Scripting.FileSystemObject and the file C:\Data\DataFile.txt for writing. Make sure the file will be created if it doesn’t exist, and ensure that the format is ASCII

4. (TCO 7) Assuming that you are connected to a database called Computers.mdb with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, Speed and HDD_Size, write the SQL Query String sqlStr such that all the fields will be displayed for the records that indicate a speed less than two and a memory value less than four. The returned records should be sorted by Room_Num

 

COMP 230 Final Exam Set 2 

1. (TCO 7) In an SQL Query statement used in a VBScript program, what Boolean operator can be used to test a set of conditions whereby any condition being true must test true?

2. (TCO 7) Which one of the following is a correct SELECT clause in a VBScript program for selecting the fields: FirstName and LastName and Age?

3. (TCO 7) What SQL clause is used in a VBScript program to determine the Table or Tables to be accessed in an SQL Query statement?

4. (TCO 7) Which one of the follows fields would be suitable as a primary key in a table that contains employee records?

5. (TCO 1) Which Windows shutdown command switch is used to log off the current user of the local computer?

6. (TCO 1) Which one of the following Windows NET commands will allow other computers to access the C:\Data directory under the share name UserData?

7. (TCO 1) From the Start/Run dialog, the command used to open the 32-bit Windows command prompt is _____.

8. (TCO 1) Which of the following Windows commands will shutdown and power down the computer FileServer in 2 minutes?

9. (TCO 6) What WSH object is required for VBScript File I/O?

10. (TCO 6) To evaluate whether a file exists or not before you overwrite it in VBScript, use the following command (assuming that fso is an object of type Scripting.FileSystemObject).

11. (TCO 6) The following VBScript statement will open a text file.

Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ForWriting) 

To open this file for writing, the value of ForWriting must be _____.

12. (TCO 2) Given the rules of operator precedence, what value would the variable contain after the following statement was executed? distance = 2 + 5 * 3

13. (TCO 2) What is an example of a numeric constant?

14. (TCO 2) What is the problem with the following statement? 75 = percent

15. (TCO 2) What is the best choice for a variable name representing a bank balance?

16. (TCO 2) What is the problem with the following statement? 65 = seniorAge

17. (TCO 5) What name is best suited to a function or subroutine that calculates overtime pay?

18. (TCO 5) A good example of a well-named constant is _____.

19. (TCO 3) What VBScript decision-making statement would be for a single condition and two alternative code blocks to be executed?

20. (TCO 3) What produces the same result as the following pseudocode?

21. (TCO 3) In VBScript, which relational operator is used to test for equality?

22. (TCO 3) Boolean expressions can have which outcomes?

23. (TCO 3) When using the _____ operator, both conditions must be true in order for the entire expression to be evaluated as true

24. (TCO 4) What is the issue with the following VBScript While loop?

25. (TCO 4) When a VBScript loop control variable is not altered during loop execution, a(n) _____ loop may result

26. (TCO 4) Which VBScript statement represents incrementing the loop counter variable called count?

27. (TCO 4) When a variable is incremented by 1, _____.

28. (TCO 4) What is the term used to represent individual items in an array?

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI command that will shutdown and restart your computer in 2 minutes with the message “Restart in 2 Minutes!!”

3. (TCO 2) Write the VBScript code lines that perform the following tasks: Define a variable name that is initialized to “John Doe” and a variable age that is initialized to 35. USING THESE VARIABLES, display the following message: “Your name is John Doe and your age is 35.”

4. (TC0 3) Given the variables hoursWorked and payRate, write the VBScript code that will calculate grossPay. Keep in mind that any hours worked over 40 are paid at time and a half.

5. (TCO 3) Write the VBScript code that implements this logic. Given the numeric variable age, display the message “You are a Senior” if age is greater than or equal to 65, otherwise display the message “You are not a Senior”.

1. (TCO 5) Write a VBScript function called MaxNum that accepts two numbers and returns the largest to the two numbers

2. (TCO 6) Write the VBScript code that will delete the file C:\Data\DataFile.txt using a Script.FileSystemObject, but do this only if the file exists.

3. (TCO 7) Assuming that you are connected to a database called Computers.mdb with a table called Inventory with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, and HDD_Size. Write the SQL Query String sqlStr such that the fields Computer, Room_Num, and OS_Type will be displayed for the records that indicate an OS_Type of “Fedora 10” or “Windows XP.” The returned records should be sorted by OS_Type.

 

COMP 230 Final Exam Set 3

 

1. (TCO 7) The general syntax of an SQL select statement is _____.

2. (TCO 7) In a VBScript SQL Query statement, what Boolean operator can be used to test a set of conditions whereby all conditions must be true?

3. (TCO 7) What SQL clause is used in a VBScript program to determine the fields to be displayed in an SQL Query statement?

4. (TCO 7) What SQL clause is used in a VBScript program to determine the Table or Tables to be accessed in an SQL Query statement?

5. (TCO 1) The name of the service that controls the queue of print jobs with the Windows NET command is _____.

6. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to 192.168.100.10 255.255.255.0 with a metric of 1 is _____.

7. (TCO 1) The Windows CLI command that is used to display the extensions recognized as executable files is _____.

8. (TCO 1) The NETSH command that will set the IP address of the interface name NIC to a DHCP-supplied IP address is _____.

9. (TCO 6) To delete a file in VBScript, use the following command (assuming that fso is a Scripting.FileSystemObject).

10. (TCO 6) What WSH object is required for VBScript File I/O?

11. (TCO 6) To create a new file in a VBScript program, use the following command (assuming that fso is an instance of Scripting.FileSystemObject).

12. (TCO 2) What is an example of a string constant?

13. (TCO 2) Given the rules of operator precedence, what value would the variable contain after the following statement was executed? distance = 2 + 21 / 3

14. (TCO 2) What is an example of a numeric constant?

15. (TCO 2) String constants and _____ refer to the same concept

16. (TCO 2) What is the assignment operator?

17. (TCO 5) When a subroutine or function is useful, you may want to use it more than once within a program or in other programs. This concept is known as _____.

18. (TCO 5) Which one of the following is a feature of good program design?

19. (TCO 3) Only one of the relational expressions being evaluated must be true in order for the entire expression to be evaluated as true. The VBScript Boolean operator that defines this evaluation is _____.

20. (TCO 3) The VBScript Boolean operator AND is used to evaluate multiple conditions where _____.

21. (TCO 3) Which VBScript Boolean operator has the highest precedence?

22. (TCO 3) If you are asked to write a VBScript program that prints a list of books that have fewer than 30 pages and more than 100 pages. What type of Boolean Operator would you use?

23. (TCO 3) In VBScript, when you combine Boolean operators, the _____ operators take precedence, meaning their values are evaluated first.

24. (TCO 4) What is the issue with the following VBScript Do While loop?
count = 1
Do while count < 10
WScript.Echo count
count = count – 1

25. (TCO 4) How many times will the following VBScript Do While loop execute the loop body?

26. (TCO 4) When a variable is incremented by 1, _____.

27. (TCO 4) VBScript arrays are most efficiently processed using _____.

28. (TCO 4) The value of array subscripts are always _____.

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI NET commands that will turn the WORKSTATION service OFF and then ON

3. (TCO 2) Give the order of precedence for all of the arithmetic operators and the parentheses

4. (TC0 3) A movie theater manager says, “Provide a discount to patrons who are under 13 years old and those who are over 64 years old; otherwise, charge the full price.” Write the VBScript code that implements this logic. Assume the variables age and price and the constants DISCOUNT_PRICE and FULL_PRICE.

1. (TCO 4) Write the VBScript code that displays all of the integers stored in the array numArray(100) .

2. (TCO 5) Write a VBScript function called GetName( ) that prompts the user to input his or her name and returns the name value. Use the StdIn and StdOut streams for input and output

3. (TCO 6) Write the VBScript code that defines the Scripting.FileSystemObject and the file C:\Data\DataFile.txt for appending. Make sure the file will be created if it doesn’t exist, and ensure that the format is ASCII.

4. (TCO 7) Assuming that you are connected to a database called Computers.mdb with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, and HDD_Size, write the SQL Query String sqlStr such that the fields Computer, Hostname, and CPU_Type will be displayed for all records CPU_Type is “AMD” and the Bit_Size is 64. The returned records should be sorted by Hostname

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Final Exam (Set 2)

http://www.devryonlinehelp.com/product/comp-230-final-exam-set-2-2/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-final-exam-set-2-2/

 

1. (TCO 7) In an SQL Query statement used in a VBScript program, what Boolean operator can be used to test a set of conditions whereby any condition being true must test true?

2. (TCO 7) Which one of the following is a correct SELECT clause in a VBScript program for selecting the fields: FirstName and LastName and Age?

3. (TCO 7) What SQL clause is used in a VBScript program to determine the Table or Tables to be accessed in an SQL Query statement?

4. (TCO 7) Which one of the follows fields would be suitable as a primary key in a table that contains employee records?

5. (TCO 1) Which Windows shutdown command switch is used to log off the current user of the local computer?

6. (TCO 1) Which one of the following Windows NET commands will allow other computers to access the C:\Data directory under the share name UserData?

7. (TCO 1) From the Start/Run dialog, the command used to open the 32-bit Windows command prompt is _____.

8. (TCO 1) Which of the following Windows commands will shutdown and power down the computer FileServer in 2 minutes?

9. (TCO 6) What WSH object is required for VBScript File I/O?

10. (TCO 6) To evaluate whether a file exists or not before you overwrite it in VBScript, use the following command (assuming that fso is an object of type Scripting.FileSystemObject).

11. (TCO 6) The following VBScript statement will open a text file.

Set file = fso.OpenTextFile(“C:\Data\CustData.txt”, ForWriting) 

To open this file for writing, the value of ForWriting must be _____.

12. (TCO 2) Given the rules of operator precedence, what value would the variable contain after the following statement was executed? distance = 2 + 5 * 3

13. (TCO 2) What is an example of a numeric constant?

14. (TCO 2) What is the problem with the following statement? 75 = percent

15. (TCO 2) What is the best choice for a variable name representing a bank balance?

16. (TCO 2) What is the problem with the following statement? 65 = seniorAge

17. (TCO 5) What name is best suited to a function or subroutine that calculates overtime pay?

18. (TCO 5) A good example of a well-named constant is _____.

19. (TCO 3) What VBScript decision-making statement would be for a single condition and two alternative code blocks to be executed?

20. (TCO 3) What produces the same result as the following pseudocode?

21. (TCO 3) In VBScript, which relational operator is used to test for equality?

22. (TCO 3) Boolean expressions can have which outcomes?

23. (TCO 3) When using the _____ operator, both conditions must be true in order for the entire expression to be evaluated as true

24. (TCO 4) What is the issue with the following VBScript While loop?

25. (TCO 4) When a VBScript loop control variable is not altered during loop execution, a(n) _____ loop may result

26. (TCO 4) Which VBScript statement represents incrementing the loop counter variable called count?

27. (TCO 4) When a variable is incremented by 1, _____.

28. (TCO 4) What is the term used to represent individual items in an array?

1. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway

2. (TCO 1) Write the Windows CLI command that will shutdown and restart your computer in 2 minutes with the message “Restart in 2 Minutes!!”

3. (TCO 2) Write the VBScript code lines that perform the following tasks: Define a variable name that is initialized to “John Doe” and a variable age that is initialized to 35. USING THESE VARIABLES, display the following message: “Your name is John Doe and your age is 35.”

4. (TC0 3) Given the variables hoursWorked and payRate, write the VBScript code that will calculate grossPay. Keep in mind that any hours worked over 40 are paid at time and a half.

5. (TCO 3) Write the VBScript code that implements this logic. Given the numeric variable age, display the message “You are a Senior” if age is greater than or equal to 65, otherwise display the message “You are not a Senior”.

1. (TCO 5) Write a VBScript function called MaxNum that accepts two numbers and returns the largest to the two numbers

2. (TCO 6) Write the VBScript code that will delete the file C:\Data\DataFile.txt using a Script.FileSystemObject, but do this only if the file exists.

3. (TCO 7) Assuming that you are connected to a database called Computers.mdb with a table called Inventory with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, and HDD_Size. Write the SQL Query String sqlStr such that the fields Computer, Room_Num, and OS_Type will be displayed for the records that indicate an OS_Type of “Fedora 10” or “Windows XP.” The returned records should be sorted by OS_Type.

more...
No comment yet.
Scooped by Brazilwoolard
Scoop.it!

COMP 230 Entire Course + COMP 230 Final Exam 3 Sets | DeVry Online Help

COMP 230 Entire Course + COMP 230 Final Exam 3 Sets | DeVry Online Help | COMP 230 Full Course - DevryOnlineHelp | Scoop.it

http://www.devryonlinehelp.com/product/comp-230-entire-course-comp-230-final-exam-3-sets/

Brazilwoolard's insight:

http://www.devryonlinehelp.com/product/comp-230-entire-course-comp-230-final-exam-3-sets/

more...
No comment yet.