ISTM Conceptual Exam 1

studied byStudied by 0 people
0.0(0)
get a hint
hint

A desktop application runs

1 / 153

Tags and Description

Business

154 Terms

1

A desktop application runs

On the user's computer

New cards
2

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

New cards
3

Which of the following is not a .NET Programming Language -Visual Basic -JavaScript -C# -F#

Javascript

New cards
4

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.

New cards
5

The primary components of .NET are its class libraries and its

Common Language Runtime

New cards
6

What is the purpose of the .NET class libraries?

They provide pre-written code that can be used by .NET applications.

New cards
7

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.

New cards
8

Before a C# application can be run, it must be compiled into a language called

Microsoft Intermediate Language

New cards
9

An assembly is

an executable file that includes the MSIL or IL

New cards
10

A solution is

a container that holds projects

New cards
11

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.

New cards
12

To write the C# code for a form, you use a Visual Studio window called the

Code Editor

New cards
13

To work with the files of a solution, you use a Visual Studio window called the

Solution Explorer

New cards
14

A window that appears at the edge of the Visual Studio IDE is called a/an

docked window

New cards
15

Within Visual Studio, which window can you use to change the version of .NET that a project is targeting?

the Project Properties window

New cards
16

When you run a Windows Forms project, Visual Studio displays the project's first

form

New cards
17

To customize the way Visual Studio works, what command do you select from the Tools menu?

options

New cards
18

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

New cards
19

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

New cards
20

Which control do you use to allow a user to enter some text?

TextBox

New cards
21

Which property of a text box lets you prevent the user from entering data into the control?

ReadOnly

New cards
22

What is the name of the Visual Studio window that contains controls that you can drag onto a form?

toolbox

New cards
23

Two properties that are common to both forms and controls are the

Name and Text properties

New cards
24

Which key can a user press to activate the button that's set by the CancelButton property of a form?

Esc

New cards
25

What form property do you use to activate a button control when the user presses the Enter key?

AcceptButton property

New cards
26

The tab order determines the order in which

the controls on a form receive focus when the user presses the Tab key

New cards
27

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

New cards
28

What property of a form sets the title that's displayed in the form's title bar?

Text

New cards
29

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

New cards
30

Access keys let the user activate a control by

pressing Alt plus another key

New cards
31

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

New cards
32

To change the filename for a form, project, or solution you use the

Solution Explorer

New cards
33

The Text property of a control determines

the text that's displayed in the control

New cards
34

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

New cards
35

To select two or more controls, you can

hold down either the Shift or Ctrl key while you click on them

New cards
36

To align two or more controls after you've selected them, you can use

both the Format menu commands and the Layout toolbar buttons

New cards
37

When you align or size a group of selected controls, the changes are made relative to the

primary control

New cards
38

an object is

an instance of a class

New cards
39

a class is

the code that defines the characteristics of an object

New cards
40

Instantiation is the process of generating

an object from a class

New cards
41

An operation that an object can perform is called

method

New cards
42

Which of the following is not defined by a class? methods properties notices events

notices

New cards
43

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

New cards
44

What does the following code do? txtMonthlyInvestment.Focus();

calls the Focus() method of the txtMonthlyInvestment control

New cards
45

To say that a C# application is event-driven means that it responds to

user events and other types of events

New cards
46

What is the term for a method that responds to events?

event handler

New cards
47

What event does Visual Studio generate code for when you double-click a button in the Form Designer?

click

New cards
48

What is the name of the method generated if you double-click a button named btnProcess in the Form Designer?

btnProcess_Click

New cards
49

Blocks of code are enclosed in

braces - {}

New cards
50

C# statements must end with a

semicolon ;

New cards
51

A syntax error is identified in

the Code Editor window and the Error List window

New cards
52

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.

New cards
53

Which of the following is a valid comment?

New cards
54

\ This is a comment ' This is a comment / This is a comment // This is a comment

// This is a comment

New cards
55

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.

New cards
56

To insert the starting code for an if statement into the code for a form, you can use

a code snippet

New cards
57

To change the name of all occurrences of a variable name after you change the first occurrence, you can use

refactoring

New cards
58

When an application encounters a problem that prevents a statement from being executed,

a runtime error occurs

New cards
59

When you test an application, your goal is to

find runtime errors

New cards
60

What is another name for a runtime error?

exception

New cards
61

a data tip

displays the value of a variable or property

New cards
62

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

New cards
63

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();

New cards
64

Which built-in data type is the most precise type for storing monetary values?

decimal

New cards
65

The bool data type stores a

true or false value

New cards
66

Which built-in data type stores only whole numbers? whole float number int

int

New cards
67

A constant stores data

that does not change as a program executes

New cards
68

Which of the following is a valid decimal literal? 30.0 30.0c 30.0d 30.0m

30.0m

New cards
69

Variables named according to camel notation

capitalize the first letter of every word after the first word

New cards
70

Variables named according to Pascal notation

capitalize the first letter of every word including the first word

New cards
71

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
72

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

New cards
73

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
74

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

New cards
75

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
76

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

New cards
77

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
78

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

New cards
79

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
80

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

New cards
81

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
82

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

New cards
83

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

New cards
84

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
85

int i = 4; int j = 8; int k = 17;

New cards
86

What is the value of x after the following statement is executed? decimal x = i / j;

0.0

New cards
87

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
88

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

New cards
89

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
90

int i = 4; int j = 8; int k = 17;

New cards
91

What is the value of x after the following statement is executed? decimal x = Math.Round(c)

13

New cards
92

Consider the following code: decimal a = 2.5m; decimal b = 4.0m; decimal c = 12.7m;

New cards
93

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

New cards
94

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));

New cards
95

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();

New cards
96

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);

New cards
97

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();

New cards
98

double d = number.NextDouble(); double d = number.NextDouble(1.0); double d = number.Generate(); double d = number.Generate(1.0);

double d = number.NextDouble();

New cards
99

Which statement is equivalent to the following statement? total = total + tax;

total += tax;

New cards
100

To override the order of precedence in an arithmetic expression, you can use

parentheses

New cards

Explore top notes

note Note
studied byStudied by 1696 people
Updated ... ago
4.9 Stars(7)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 26 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 22 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 270 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard66 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard151 terms
studied byStudied by 23 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard95 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard151 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard24 terms
studied byStudied by 71 people
Updated ... ago
4.0 Stars(1)
flashcards Flashcard56 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard103 terms
studied byStudied by 47 people
Updated ... ago
4.8 Stars(4)
flashcards Flashcard113 terms
studied byStudied by 64 people
Updated ... ago
5.0 Stars(2)