Section 1

Preview this deck

double

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (26)

Section 1

(26 cards)

double

Front

decimals

Back

c

Front

2. Which of the following languages is not considered a high-level programming language? a) C# b) Visual Basic c) Common Intermediate Language d) C++

Back

a

Front

Use the following scenario to answer the following questions: Adriana is creating a point-of-sale (cash register) application for Fourth Coffee. Her responsibility is to create a password-protected login system to ensure security of the system. She has finished the login window and password check, but she is having trouble implementing it correctly. Adriana's project manager wants the system to give the user three attempts to login correctly before locking the system. In Adriana's most recent version, the system prompts the user for a name and password three times—even if the user correctly logs in on the first try. After the third attempt, the system always locks—even if the input is correct. 8. Adriana is using a for loop, which works best when: a. the number of iterations is known and is unlikely to change during execution b. the number of iterations is known but is likely to change during execution c. the number of iterations is unknown

Back

b

Front

5. You are developing a C# program. You write the following code line: int x = 6 + 4 * 4 / 2 - 1; What will be the value of the variable x after this statement is executed? a) 19 b) 13 c) 20 d) 14

Back

a

Front

SCENARIO: Ken is a soccer coach who has a difficult time keeping track of all of his players: At the beginning of the season, each of his players filled out a paper with personal data, but it always takes him a long time to find the information he needs. Cassie is one of his brightest players, and Ken knows that she's a computer programmer. Tired of shuffling through the huge stack of papers, he asks her to create a program to keep track of his records. The program will need to store each player's full name, jersey number, age, gender, height and weight, as well as goals scored and number of games played. Cassie agrees to develop the software for him, but she has some decisions to make . . . 10. Would you have to use the Convert.ToInt32 code for any of the variables collected? a. True b. False

Back

c

Front

SCENARIO: Ken is a soccer coach who has a difficult time keeping track of all of his players: At the beginning of the season, each of his players filled out a paper with personal data, but it always takes him a long time to find the information he needs. Cassie is one of his brightest players, and Ken knows that she's a computer programmer. Tired of shuffling through the huge stack of papers, he asks her to create a program to keep track of his records. The program will need to store each player's full name, jersey number, age, gender, height and weight, as well as goals scored and number of games played. Cassie agrees to develop the software for him, but she has some decisions to make . . . 9. It would make sense to store one of these variables as a char. Which one? a. player's name b. weight c. gender

Back

b

Front

4. You are developing a C# program. You write the following code: 01: int count = 0; 02: while (count < 5) 03: { 04: if (count == 3){ 05: break; 06: } 07: count++; 08: } How many times will the control enter the while loop? a) 5 b) 4 c) 3 d) 2

Back

short

Front

-32,768 to 32,767

Back

string

Front

words

Back

byte

Front

0 to 255

Back

b

Front

5. You are developing a C# program. You write the following code: int i = 6; do { if (i == 3){ break; } Console.WriteLine("The value of i = " + i); i++; }while (i <= 5); How many times will the control enter the while loop? a) 0 b) 1 c) 2 d) 3

Back

a

Front

3. You are developing a C# program that needs to perform 5 iterations. You write the following code: 01: int count = 0; 02: while (count <= 5) 03: { 04: Console.WriteLine("The value of count = ", + count); 05: count++; 06: } When you run the program, you notice that the loop does not iterate five times. What should you do to make sure that the loop is executed exactly five times? a) Change the code in line 01 to int count = 1; b) Change the code in line 02 to: while (count == 5) c) Change the code in line 02 to while (count >= 5) d) Change the code in line 05 to count++;

Back

b

Front

Adriana is creating a point-of-sale (cash register) application for Fourth Coffee. Her responsibility is to create a password-protected login system to ensure security of the system. She has finished the login window and password check, but she is having trouble implementing it correctly. Adriana's project manager wants the system to give the user three attempts to login correctly before locking the system. In Adriana's most recent version, the system prompts the user for a name and password three times—even if the user correctly logs in on the first try. After the third attempt, the system always locks—even if the input is correct. 9. What control structure would be best for Adriana's login system? a. for loop b. while loop c. a recursive method

Back

d

Front

7. You need to store values ranging from 0 to 255. You also need to make sure that your program minimizes memory use. Which data type should you use to store these values? a. byte b. char c. short d. int

Back

bool

Front

true or false

Back

d

Front

2. You need to provide complex multi-way branching in your C# program. You need to make sure that your code is easy to read and understand. Which of the following C# statements should you use? a) case b) break c) if-else d) switch

Back

d

Front

6. You are writing a C# program that needs to manipulate very large integer values that may exceed 12 digits. The values can be positive or negative. Which data type should you use to store a variable like this? a) int b) float c) double d) long

Back

a

Front

1. You are developing a C# program. You write the following code: int x = 10; int y = x++; int z = y --; What will be the value of the variable z after all the above statements are executed? a) 10 b) 11 c) 12 d) 13

Back

a

Front

1. You need to gain a better understanding of the solution before writing the program. You decide to develop an algorithm that lists all necessary steps to perform an operation in the correct order. Any technique that you use should minimize complexity and ambiguity. Which of the following techniques should you use? a) flowchart b) decision table c) C# program d) A paragraph in English

Back

b

Front

Adriana is creating a point-of-sale (cash register) application for Fourth Coffee. Her responsibility is to create a password-protected login system to ensure security of the system. She has finished the login window and password check, but she is having trouble implementing it correctly. Adriana's project manager wants the system to give the user three attempts to login correctly before locking the system. In Adriana's most recent version, the system prompts the user for a name and password three times—even if the user correctly logs in on the first try. After the third attempt, the system always locks—even if the input is correct. 10. How many times does a do-while loop execute? a. at least zero times b. at least one time c. at least two times

Back

long

Front

-9,223,372,036,854,755,808 to 9,223,372,036,854,775,807

Back

d

Front

6. You are writing a C# program and need to select an appropriate repetition structure for your requirement. You need to make sure that the test for the termination condition is performed at the bottom of the loop rather than at the top. Which repletion structure should you use? a) The while statement b) The for statement c) The foreach statement d) The do-while statement

Back

int

Front

-2,147,483,648 to 2,147,483,647

Back

b

Front

7. You are writing a C# program that needs to iterate a fixed number of times. You need to make sure that your code is easy to understand and maintain even when the loop body contains complex code. Which of the following C# statements provide the best solution for this requirement? a) while b) for c) foreach d) do-while

Back

char

Front

U+0000 to U+FFFF

Back

d

Front

SCENARIO: Ken is a soccer coach who has a difficult time keeping track of all of his players: At the beginning of the season, each of his players filled out a paper with personal data, but it always takes him a long time to find the information he needs. Cassie is one of his brightest players, and Ken knows that she's a computer programmer. Tired of shuffling through the huge stack of papers, he asks her to create a program to keep track of his records. The program will need to store each player's full name, jersey number, age, gender, height and weight, as well as goals scored and number of games played. Cassie agrees to develop the software for him, but she has some decisions to make . . . 8. Which of the following data types would be the best choice for keeping track of players' ages and jersey numbers using the least amount of memory? a. short b. byte c. int d. long

Back