ISTM Conceptual Exam 1

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/153

flashcard set

Earn XP

Description and Tags

Business

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

154 Terms

1
New cards
A desktop application runs
On the user's computer
2
New cards
Which of the following is not a platform that you can use to develop Windows desktop applications
-WPF
-UWP
-Windows Forms
-ASP.NET Core MVC
ASP.NET Core MVC
3
New cards
Which of the following is not a .NET Programming Language
-Visual Basic
-JavaScript
-C\#
-F\#
Javascript
4
New cards
Which of the following statements is true?
- .Net Core is newer than the .NET Framework, but it only runs on Windows
- .NET Core is newer than the .NET Framework, and it is cross-platform
-.NET Core is older than the .NET Framework, and it only runs on Windows
- .NET Core is older than the .NET Framework, but it is cross platform.
.NET Core is newer than the .NET Framework, and it is cross-platform.
5
New cards
The primary components of .NET are its class libraries and its
Common Language Runtime
6
New cards
What is the purpose of the .NET class libraries?
They provide pre-written code that can be used by .NET applications.
7
New cards
What is the purpose of the Common Language Runtime?
-It provides pre-written code that can be used by .NET applications.
-It specifies the format of compiled .NET applications.
-It manages the execution of .NET applications.
-It specifies the data types that can be used by .NET applications.
It manages the execution of .NET applications.
8
New cards
Before a C\# application can be run, it must be compiled into a language called
Microsoft Intermediate Language
9
New cards
An assembly is
an executable file that includes the MSIL or IL
10
New cards
A solution is
a container that holds projects
11
New cards
Which of the following is a way to open a form in the Form Designer window?
Find the form in the Solution Explorer and double-click on it.
12
New cards
To write the C\# code for a form, you use a Visual Studio window called the
Code Editor
13
New cards
To work with the files of a solution, you use a Visual Studio window called the
Solution Explorer
14
New cards
A window that appears at the edge of the Visual Studio IDE is called a/an
docked window
15
New cards
Within Visual Studio, which window can you use to change the version of .NET that a project is targeting?
the Project Properties window
16
New cards
When you run a Windows Forms project, Visual Studio displays the project's first
form
17
New cards
To customize the way Visual Studio works, what command do you select from the Tools menu?
options
18
New cards
In Visual Studio, what command of the Tools menu can you use to change the development settings that affect the way the menus and toolbars work?
Import and Export Settings
19
New cards
To create a new Visual Studio project, what do you select from the New Project dialog box to specify the type of project you want to create?
a template
20
New cards
Which control do you use to allow a user to enter some text?
TextBox
21
New cards
Which property of a text box lets you prevent the user from entering data into the control?
ReadOnly
22
New cards
What is the name of the Visual Studio window that contains controls that you can drag onto a form?
toolbox
23
New cards
Two properties that are common to both forms and controls are the
Name and Text properties
24
New cards
Which key can a user press to activate the button that's set by the CancelButton property of a form?
Esc
25
New cards
What form property do you use to activate a button control when the user presses the Enter key?
AcceptButton property
26
New cards
The tab order determines the order in which
the controls on a form receive focus when the user presses the Tab key
27
New cards
To prevent a control from receiving the focus when the user presses the Tab key, which of the control's properties should you set to false?
TabStop
28
New cards
What property of a form sets the title that's displayed in the form's title bar?
Text
29
New cards
To create an access key that will move the focus to a text box, you
set the access key in the Text property of the label immediately before the text box
30
New cards
Access keys let the user activate a control by
pressing Alt plus another key
31
New cards
What would you set the Text property of a label to if you want the label to appear as shown below, with the letter n as the access key?
I&nvoice number
32
New cards
To change the filename for a form, project, or solution you use the
Solution Explorer
33
New cards
The Text property of a control determines
the text that's displayed in the control
34
New cards
When you run a form after you've used the Form Designer to design it but haven't added any code to it,
the buttons don't cause anything to happen, but otherwise the form works
35
New cards
To select two or more controls, you can
hold down either the Shift or Ctrl key while you click on them
36
New cards
To align two or more controls after you've selected them, you can use
both the Format menu commands and the Layout toolbar buttons
37
New cards
When you align or size a group of selected controls, the changes are made relative to the
primary control
38
New cards
an object is
an instance of a class
39
New cards
a class is
the code that defines the characteristics of an object
40
New cards
Instantiation is the process of generating
an object from a class
41
New cards
An operation that an object can perform is called
method
42
New cards
Which of the following is not defined by a class?
methods
properties
notices
events
notices
43
New cards
To refer to a property of an object in your C\# code, you code the
object name followed by a period and the property name
44
New cards
What does the following code do?
txtMonthlyInvestment.Focus();
calls the Focus() method of the txtMonthlyInvestment control
45
New cards
To say that a C\# application is event-driven means that it responds to
user events and other types of events
46
New cards
What is the term for a method that responds to events?
event handler
47
New cards
What event does Visual Studio generate code for when you double-click a button in the Form Designer?
click
48
New cards
What is the name of the method generated if you double-click a button named btnProcess in the Form Designer?
btnProcess_Click
49
New cards
Blocks of code are enclosed in
braces - {}
50
New cards
C\# statements must end with a
semicolon ;
51
New cards
A syntax error is identified in
the Code Editor window and the Error List window
52
New cards
Which of the following is not a recommended way to improve the readability of your C\# code?
Use blank lines before and after groups of related statements.
Use all capital letters for variable names.
Use indentation to align related elements of code.
Use spaces to separate words, values, and operators.
Use all capital letters for variable names.
53
New cards
Which of the following is a valid comment?

54
New cards
\ This is a comment
' This is a comment
/ This is a comment
// This is a comment
// This is a comment
55
New cards
Which of the following statements is true?
You can't use C\# keywords in a comment.
Comments must appear at the beginning of a line.
Comments can be inaccurate or out of date.
Comments make the program run slower.
Comments can be inaccurate or out of date.
56
New cards
To insert the starting code for an if statement into the code for a form, you can use
a code snippet
57
New cards
To change the name of all occurrences of a variable name after you change the first occurrence, you can use
refactoring
58
New cards
When an application encounters a problem that prevents a statement from being executed,
a runtime error occurs
59
New cards
When you test an application, your goal is to
find runtime errors
60
New cards
What is another name for a runtime error?
exception
61
New cards
a data tip
displays the value of a variable or property
62
New cards
Which of the following choices adds a comment that says "currency format" to the end of the line of code?
string amount \= total.ToString("c"); ' currency format
string amount \= total.ToString("c"); \-- currency format
string amount \= total.ToString("c"); \# currency format
string amount \= total.ToString("c"); // currency format
string amount \= total.ToString("c"); // currency format
63
New cards
Which of the following statements calls the Close() method of the current form?
this.Close();
currentForm.Close();
currentForm.Close(this);
currentForm.Call(Close);
this.Close();
64
New cards
Which built-in data type is the most precise type for storing monetary values?
decimal
65
New cards
The bool data type stores a
true or false value
66
New cards
Which built-in data type stores only whole numbers?
whole
float
number
int
int
67
New cards
A constant stores data
that does not change as a program executes
68
New cards
Which of the following is a valid decimal literal?
30.0
30.0c
30.0d
30.0m
30.0m
69
New cards
Variables named according to camel notation
capitalize the first letter of every word after the first word
70
New cards
Variables named according to Pascal notation
capitalize the first letter of every word including the first word
71
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

72
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= i + j;
12
73
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

74
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= j / i;
2
75
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

76
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= i / j;
0
77
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

78
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= k % j;
1
79
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

80
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
decimal x \= a + b;
6.5
81
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

82
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statements are executed?
int x \= 27;
x -\= i;
23
83
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= k / (j - i);
4
84
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

85
New cards
int i \= 4;
int j \= 8;
int k \= 17;

86
New cards
What is the value of x after the following statement is executed?
decimal x \= i / j;
0.0
87
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

88
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
decimal x \= (decimal)i / (decimal)j;
0.5
89
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

90
New cards
int i \= 4;
int j \= 8;
int k \= 17;

91
New cards
What is the value of x after the following statement is executed?
decimal x \= Math.Round(c)
13
92
New cards
Consider the following code:
decimal a \= 2.5m;
decimal b \= 4.0m;
decimal c \= 12.7m;

93
New cards
int i \= 4;
int j \= 8;
int k \= 17;
What is the value of x after the following statement is executed?
int x \= Math.pow(i, 2);
16
94
New cards
Given double variables a and b that contain the lengths of the two short sides of a right triangle, which of the following statements uses the methods of the Math class to calculate the length of the third side and save it in a double variable named c?The formula for calculating the length of the third side is: c \= sqrt x^2 + c^2
double c \= Math.Sqrt(Math.Pow(a, 2) + Math.Pow(b, 2));
95
New cards
Given the following Random object named number, which of the following choices gets a random integer from 1 to 10 (including both 1 and 10)?
Random number \= new Random();

96
New cards
int i \= number.Next(10);
int i \= number.Next(11);
int i \= number.Next(1,10);
int i \= number.Next(1,11);
int i \= number.Next(1,11);
97
New cards
Given the following Random object named number, which of the following statements returns a double value that is greater than or equal to 0.0 and less than 1.0?
Random number \= new Random();

98
New cards
double d \= number.NextDouble();
double d \= number.NextDouble(1.0);
double d \= number.Generate();
double d \= number.Generate(1.0);
double d \= number.NextDouble();
99
New cards
Which statement is equivalent to the following statement?
total \= total + tax;
total +\= tax;
100
New cards
To override the order of precedence in an arithmetic expression, you can use
parentheses