16.09.2015 Views

CIS 115 Final Exam 1

For more course tutorials visit www.uoptutorial.com CIS 115 Entire Course: Devry University: All iLabs and Exercises

For more course tutorials visit
www.uoptutorial.com


CIS 115 Entire Course: Devry University: All iLabs and Exercises

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CIS</strong> <strong>115</strong> <strong>Final</strong> <strong>Exam</strong> 1 (Devry)<br />

Click Here to Buy the Tutorial<br />

http://www.uoptutorial.com/index.php?route=product/product&path=585&product<br />

_id=8992<br />

For more course tutorials visit<br />

www.uoptutorial.com<br />

1. (TCO 1) What does IPO of IPO Model stand for? (Points : 4)<br />

2. (TCO 1) What is a data item with a name and a value that remain the same during the<br />

execution of a program? (Points : 4)<br />

3. (TCO 1) What symbol in a flowchart would be used by a developer to represent an input or<br />

output operation? (Points : 4)<br />

4. (TCO 1) Set is a process. What data type would you expect the variable, name, to have?<br />

(Points : 4)<br />

5. (TCO 1) You are using dollar amounts in an algorithm. What data type would you assign?<br />

(Points : 4)<br />

6. (TCO 2) What tool is used by developers to design logic using specific shapes/symbols?<br />

(Points : 4)<br />

7. (TCO 2) When a program evaluates mathematical expression, which of the following<br />

operators (or mathematical operations) has the lowest precedence? (Points : 4)<br />

8. (TCO 2) Using the assignment statement, + sales, which side of the equal sign is evaluated<br />

first? (Points : 4)<br />

9. (TCO 2) What value will be contained in the variable, x, after the following statement is<br />

executed?<br />

* 5 / 10 + 6 (Points : 4)<br />

10. (TCO 2) Review the partial pseudocode below. What is the correct math expression to<br />

complete the algorithm and total sales for both regions?<br />

Prompt “Enter total sales for region 1: ”<br />

Input region1<br />

Prompt “Enter total sales for region 2: ”<br />

Input region2<br />

Set _____<br />

Display “total sales: ” + total (Points : 4)<br />

11. (TCO 3 & 4) Review the pseudocode below. What will be displayed when this algorithm<br />

executes?<br />

Set<br />

If ((x > 10) AND (x < 20))=""><br />

Display “the IF path executes”<br />

Else


Display “the ELSE path executes”<br />

EndIf (Points : 4)<br />

12. (TCO 3 & 4) What value gets displayed for the variable X?<br />

Set<br />

Set<br />

Set<br />

If (B > 15) AND (() OR (C <br />

Set<br />

Else<br />

Set<br />

EndIf<br />

Display X (Points : 4)<br />

13. (TCO 3 & 4) In the following pseudocode, what raise will an employee in Department 6<br />

receive?<br />

If department < 2=""><br />

Set<br />

Else<br />

If department < 6=""><br />

Set<br />

Else<br />

Set<br />

EndIf<br />

EndIf (Points : 4)<br />

14. (TCO 3 & 4) Which of the selection structures determines if the user enters a number<br />

between 20 and 45? (Points : 4)<br />

15. (TCO 3 & 4) What value gets displayed for the variable Z?<br />

Set<br />

Set<br />

Set<br />

If ((balance 800) OR (stateCode 6) OR (creditCode 7) then<br />

Set<br />

Else<br />

Set<br />

EndIf<br />

Display Z (Points : 4)<br />

1. (TCO 5) The variable used to create an expression controlling the loop is known as the _____.<br />

(Points : 4)<br />

2. (TCO 5) Which of the following statements is false? (Points : 4)<br />

3. (TCO 5) Which control structure is classified as a loop? (Points : 4)<br />

4. (TCO 5) Repetition that loops a certain number of times is typically referred to as _____.<br />

(Points : 4)<br />

5. (TCO 5) How many times will the following loop be executed?<br />

Set<br />

DOWHILE x 7<br />

Display x


Set + 1<br />

ENDO (Points : 4)<br />

6. (TCO 7) What is a subscript or an index? (Points : 4)<br />

7. (TCO 7) Suppose you have an array named number and two of its elements are number(1) and<br />

number(4). You know that _____. (Points : 4)<br />

8. (TCO 7) What is the value of the index used to access the last element in a zero-based array<br />

declared as num(12)? (Points : 4)<br />

9. (TCO 7) When loading/initializing the elements of an array, what control structure is used to<br />

move through each element within the array? (Points : 4)<br />

10. (TCO 7) A zero-based array named sales has been declared and loaded with the values: 100,<br />

1100, 3400, 5550, 3000, 22300, 1200. What value will be stored in the array element, sales(2)?<br />

(Points : 4)<br />

11. (TCO 6) A record contains _____. (Points : 4)<br />

12. (TCO 6) What are the three modes of operation on a file? (Points : 4)<br />

13. (TCO 8) Many algorithms require direct communication from users. These types of<br />

algorithms are called _____. (Points : 4)<br />

14. (TCO 9) What type of error occurs when an array subscript’s value goes beyond the total<br />

number of elements in the array? (Points : 4)<br />

15. (TCO 2) What type of variable can be accessed by any module within the design? (Points : 4)<br />

1. (TCO 10) A department store is having a customer appreciation sale. Depending on the total<br />

dollars purchased, the customer could receive a discount on total purchases. You are to develop<br />

pseudocode that will obtain the total dollars purchased from the user, determine the discount<br />

percent, and display the total amount due. When the purchases are more than $500, the discount<br />

is 10%. When the purchases are $500 or less, the discount is 6%. (Points : 10)<br />

2. (TCO 10) A small business in your neighborhood would like an application developed that<br />

determines the average dollar amount spent for every three purchases. The user will enter three<br />

different purchase amounts. You need to display the average to your client. Complete the<br />

pseudocode to design your logic. (Points : 10)<br />

3. (TCO 9 & 10) There is a logic error in the following pseudocode. What statement(s) would<br />

you need to add to correct the logic? Be sure to explain why you are adding the statements.<br />

Set<br />

DOWHILE num<br />

Set + num<br />

ENDO<br />

Display total (Points : 10)<br />

4. (TCO 4 & 10) Complete the pseudocode by rewriting the algorithm. The design is determining<br />

the correct sales tax depending on the county identifying code. Counties with a number less than<br />

7 have a 5% sales tax. The 8-24 codes have a sales tax of 7%. Codes above 24 have a sales tax of<br />

9%. The code is entered by the user.<br />

Begin<br />

Declare Real salesTax<br />

Declare ____ countyCode<br />

_____ “Enter the county code: “<br />

Input _____________<br />

If _______ <br />

Set


Else<br />

If ______ AND ______ then<br />

______________<br />

Else<br />

Set<br />

EndIf<br />

____________<br />

Display “the sales tax is: “ + _______________<br />

End (Points : 10)<br />

5. (TCO 5 & 10) Complete the pseudocode by rewriting the algorithm. The design is to display a<br />

60 second countdown.<br />

Begin<br />

Declare _______ count<br />

Set<br />

REPEAT<br />

Display “countdown: “ + _______<br />

Set - 1<br />

UNTIL ___________<br />

Display “LIFT OFF!”<br />

End (Points : 10)<br />

6. (TCO 4, 5 & 10) Complete the pseudocode by rewriting the algorithm. The colors red, blue,<br />

and yellow are known as primary colors because they cannot be made by mixing other colors.<br />

When you mix two primary colors, you get a secondary color. Mixing yellow and blue gets you<br />

green. Mixing red and blue gets you purple. The algorithm allows the user to enter two primary<br />

colors and then displays the resulting secondary color. The colors entered by the user will be<br />

validated to ensure they entered a primary color.<br />

Begin<br />

Declare String color1<br />

Declare String color2<br />

Declare String control1<br />

Declare String control2<br />

______ “Enter first primary color: “<br />

Input _______<br />

Prompt “Enter the second primary color: “<br />

Input _________<br />

Set control1 = “n”<br />

DOWHILE control1 = “n”<br />

If (color1 “yellow”) ______ (color1 “red”) _______ (color1 “blue”) then<br />

Prompt “first primary color is invalid”<br />

Input _________<br />

Else<br />

Set control1 = “y”<br />

ENDO<br />

Set control2 = “n”<br />

DOWHILE control2 = “n”<br />

If (color2 “yellow”) ______ (color2 “red”) _______ (color2 “blue”) then


Prompt “second primary color is invalid”<br />

Input color2<br />

Else<br />

Set control2 = “y”<br />

ENDO<br />

If (color1 = “red”) AND (__________) then<br />

Display “secondary color is: purple”<br />

EndIf<br />

If (color1 = “yellow”) AND (_________) then<br />

Display “secondary color is: green”<br />

EndIf<br />

End (Points : 10)<br />

7. (TCO 1, 2, 3, & 4) Describe the difference between a flowchart and pseudocode and explain<br />

whether one is more important to develop than the other. (Points : 10)<br />

8. (TCO 1, 2, 3, 4, & 5) Compare and contrast sequence control structures and selection control<br />

structures. (Points : 10)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!