Question: #9456

CIS170 Information Technology in Criminal Justice Final Exam Complete Solution

CIS170 Final Exam 1. (TCOs 1, 6) Because information in _____ is lost when the power is turned off, that type of memory is considered to be _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image002.pngauxiliary storage, nonvolatile src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image004.png auxiliary storage, volatile src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image006.png RAM, nonvolatile src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image008.png RAM, volatile 2. (TCOs 1, 6) What does IDE stand for? (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image010.png Interior Design Environment src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image012.png Integrated Development Environment src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image014.png Integrated Design Environment src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image016.png Interior Development Environment 3. (TCOs 1, 6) Which keyboard function key do we use to compile and run a C# program within Visual Studio.NET? (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image018.pngF5 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image020.png F11 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image022.png F10 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image024.png F1 4. (TCOs 2, 3) A computer uses the _____ numbering system to represent and manipulate data. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image026.pngbinary src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image028.png decimal src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image030.png hexadecimal src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image032.png octal 5. (TCOs 2, 3) The proper operator precedence, from first to last, is _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image034.pngsubtraction, addition, and multiplication src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image036.png addition, subtraction, and multiplication src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image038.png exponentiation, division, and subtraction src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image040.png exponentiation, addition, and division src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image042.png exponentiation, division, and multiplication 6. (TCOs 2, 3) Your C# program needs to store a single alphanumeric character the user will enter. When your program starts, the default setting for that character should be the letter A. You implement this functionality by writing _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image044.pngchar myVar = A; src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image046.png char myVar = ‘A’; src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image048.png char myVar(‘A’); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image050.png char myVar(A); 7. (TCO 4) The following C# code _____ compile; however, it contains a _____ error. int x = 15, y = 10; if (x < y);=> Console.WriteLine(x is less than y); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image052.pngwill, compiler src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image054.png will, logical src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image056.png will not, compiler src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image058.png will not, logical 8. (TCO 4) Which part of this expression will be evaluated first? if (b <= c= &&= d=>= e) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image060.png b <=> src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image062.png c || d src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image064.png d >= e src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image066.png if() 9. (TCO 5) Your program keeps asking for input from the user. If there is more input, the user types “Y” after entering the data. If there is no more input, he/she enters “N.” In this context, “Y” and “N” are used as _____. (Points : 5) accumulators src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image070.png counters src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image072.png integer data types src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image074.png sentinel values 10. (TCO 5) In this code, the variable _____ is a counter and the variable _____ is an accumulator. double sum = 0, height = 2.0, stop =10, max = 50; int track = 0, num = 0; while (num <=> { sum = sum + height * num; if (sum <=> track++; num++; } src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image076.png num, track src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image078.png sum, track src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image080.png track, sum src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0clip_image082.png height, stop 1. (TCOs 7, 8) Which is a predefined C# method? (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image004.png Console.PrintLine(); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image006.png Console.Print(); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image008.png Math.Sum(); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image010.png Math.Sin(); 2. (TCOs 7, 8) Which is a valid overloaded version of the following method? float DetermineResults(float num1, float num2) (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image012.png float DetermineResults(double num1, float num2) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image014.png float DetermineTheResults(float num1, float num2) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image016.png void DetermineResults(float num1, float num2) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image018.png double DetermineResults(float num1, float num2) 3. (TCOs 7, 8) Because Main() and MyFunction() store counter in _____, the output of this code will be _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image020.png different memory locations, 8 9 10 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image022.png the same memory location, 8 9 10 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image024.png different memory locations, 8 9 11 src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image026.png the same memory location, 8 9 11 4. (TCOs 9, 10) Which of the following is not good programming practice? (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image028.png Indenting the statements in the body of each control structure src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image030.png Using integer types for loop control variables src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image032.png Left-aligning nested repetition structures src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image034.png Placing vertical spacing above and below control structures 5. (TCOs 9, 10) In Figure 1, objectB is a _____ and objectC is a _____. src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image038.png CheckBox, Form src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image040.png Checkbox, MenuStrip src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image042.png RadioButton, Form src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image044.png RadioButton, MenuStrip 6. (TCOs 9, 10) When the user of your flight reservation GUI selects the “checkBoxAirGhana” CheckBox, the string “AirGhana” should appear in the “listBoxOrder” ListBox. To implement this functionality, write _____ in the ckBoxAirGhana_CheckedChanged() event handler. (Points : 5) 7. (TCOs 11, 12) To pass the entire myInfo array to the PrintElements method, replace the commented line below with _____. src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image054.png PrintElements(myInfo); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image056.png PrintElements(myInfo[0]); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image058.png PrintElements(ref myInfo); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image060.png PrintElements(6,7,8,9); 8. (TCOs 11, 12) The size of an _____ must be determined when the program is written, whereas elements of an _____ can be added or deleted at runtime. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image062.png ArrayList, array src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image064.png array, ArrayList src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image066.png array, array src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image068.png ArrayList, ArrayList 9. (TCOs 11, 12) An array that stores four days of closing stock market prices can be declared as _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image070.png decimal price1, price2, price3, price4; src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image072.png decimal [] price = new price[4]; src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image074.png decimal price[] = new decimal[4]; src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image076.png decimal [] price = new decimal[4]; 10. (TCO 13) Because your C# program needs to read data from a file one character at a time, you choose to use the _____ member of the _____ class. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image078.png ReadChars(), StreamReader src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image080.png ReadChars(), BinaryReader src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image082.png ReadChar(), StreamReader src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image084.png ReadChar(), BinaryReader 11. (TCO 13) To print out the time a file called “timeSheet.txt” was created, write _____. (Points : 5) src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image086.png Console.WriteLine(File.GetCreationTime(timeSheet.txt)); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image088.png Console.WriteLine(GetFileInfo(“timeSheet.txt”); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image090.png Console.WriteLine(GetCreationTime(“timeSheet.txt”); src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image092.png Console.WriteLine(File.FileInfo(“timeSheet.txt”); 12. (TCO 13) The following C# code will print out _____. src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image094.png the names of all files in the current directory src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image096.png the names of all subdirectories of the root directory src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image098.png the contents of all files in the root directory src=file://localhost/Users/DeanGergi/Library/Caches/TemporaryItems/msoclip/0/clip_image100.png the names of all subdirectories of the current directory 1. (TCO 3) Show the source code for a C# console application called “SalesTax” to display a 7% sales tax one would pay on an item that costs $150. (Note that the sales tax would be .07 times the value of the item.) · Declare and initialize appropriate variables for tax rate and item cost. · Include at least three descriptive comments. · State what your program displays when it runs. · State how you would use the debugger to check the values of your variables as your program runs. 2. (TCO 5) Describe two types of loops that can be used to write the C# code required to print every fifth integer from 0 to 500 (i.e., 0, 5, 10, 15, etc.), each on its own line. Which would be a better choice and why? Write the code using that type of loop. (Points : 20) 3. (TCO 8) Briefly describe how parameter passing by-value and by-reference are accomplished in memory. Write statement 1 to call method A below. Write statement 2 to call method B. Which method uses pass by-value? Which method uses pass by-reference? 4. (TCO 9) Identify an example of one of each of the following GUI design errors in Figure 2: 5. (TCO 2) Although the following code compiles and runs, the programmer made some major readability errors. Describe at least three changes that would make it easier for other programmers to read and understand the code. 6. (TCO 11) Write a C# program to store an array of integers 10 through 19. Use an appropriate loop to multiply all of the values in the list. Print out the result. (Points : 20)
Solution: #9493

CIS170 Information Technology in Criminal Justice Final Exam Complete Solution

A+ Please look at the attach...
Tutormaster
Rating: A+ Purchased: 11 x Posted By: Tutormaster
Related Solutions
Comments
Posted by: Tutormaster

Online Users