CS 3160 - Quiz 2 - Ch. 1,2,9

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

valid identifiers

A combination of alphabetic characters, numeric digits, and the underscores ( _ ) can be used. Identifiers can be long; however, many systems consider the first 31 characters unique. The first character in the name may not be a numeric digit. No embedded spaces can be placed between the characters. Concatenate (append) second and subsequent words into the identifier by capitalizing the beginning letter of each word after the first.

constant variable

A data item defined and initialized to keep the same value throughout the life of the program. Keyword: const is placed before the data type variable keyword. Standard programming conventions often use UPPERCASE for their constant identifiers.

boolean data type (bool)

A variable that can have a value of either true or false.

integral data type (int)

Always a whole number value, an int data type can store values that do not have a decimal portion.

During which phase of software development should questions be asked to clarify the problem definition?

Analysis

The static method that stops the application and closes all of its windows is ____.

Application.Exit( )

Using the tools available from the FORMAT menu can greatly reduce your development time. All of the following are menu options EXCEPT ____.

Attach to Process

Using the tools available from the FORMAT menu can greatly reduce your development time. All of the following are menu options EXCEPT ____. a) Align b) Attach to Process c) Make same size d) Horizontal spacing

Attach to process

decimal system

Base-10 numbering system. Uses 10 symbols ranging from 0 to 9 to represent value.

Which of the following is an issue that you should consider and incorporate into your interfaces?

Be consistent with placement of items

Probably the most important rule for naming identifiers is ____.

Be descriptive and select a meaningful name.

Which of the following would display "Good day!" on the screen? a) Console.WriteLine["Good day!"]; b) WriteLine.Console("Good day!"); c) Console.WriteLine("Good day!"); d) WriteLine.Console["Good day!"];

Console.WriteLine("Good day!");

Which of the following statements would produce the output shown here?

Console.WriteLine("Live\nLife to the \tfullest");

Which of the following statements would produce the output shown here? Live Life to the fullest

Console.WriteLine("Live\nLife to the \tfullest");

The front end portion of the program that the user sees and responds to is called the ____.

Interface

double data type (double)

Real numbers with decimals are represented using the double data type for the 64-bit size. This data type can only have 15-16 digit precision.

float data type (float)

Real numbers with decimals are represented using the float data type for the 32-bit size. It is necessary to suffix the number with an F or f; otherwise, the number is assumed to be a double. This data type can only have 7 digit precision.

Most of the classes used to develop Windows-based applications are organized in which namespace?

System.Windows.Forms

You change the appearance of the tabs for a TabControl object using the ____ Collection Editor.

TabPage

The Form property used to set the title bar on the Windows form is ____.

Text

To retrieve data from a ListBox control as string data, use the ____ property.

Text

To retrieve multiple selections from a ListBox control, you can use all of the following properties EXCEPT ____.

Text

Which property is used to set or get the caption of the title bar for Windows applications?

Text

Windows forms and controls offer a wide variety of changeable properties including ____.

Text, Color, Font, (ALL OF THE ABOVE)

Probably the most commonly used control for input and output is the ____.

TextBox

byte

The 8-bit grouping combination. With each of the switches being known as a bit, it takes a combination of eight switches to represent one character, such as the letter A.

How does a Windows application differ from a console-based application?

Windows applications sit in a process loop, once executed, waiting for an event to execute.

Double-clicking on the form when you are using the Form Designer brings up the Code Editor and also ____.

adds a form load method heading

Which of the following would be the most appropriate identifier for a memory location that will store the amount of rainfall for a given period of time?

amountOfRain

You can add a shortcut to a menu by preceding one of the characters in the menu name with a(n) ____. This places an underline under the next character typed.

ampersand (&)

With a ListBox of numbers, the SelectedItem property returns ____.

an object representing the one selected.

After a button click event is registered, the associated method is called ____.

automatically when the button is clicked.

The class heading that is generated by Visual Studio for Windows applications includes a colon (:) following the class name. The identifier following the colon is the ____.

base class

Which of the following is an issue that you should consider and incorporate into your interfaces?

be consistent with placement of items

A(n) ____ version of software has not been fully tested and may still contain bugs or errors.

beta

Console is a ____ and WriteLine( ) is a ____.

class, method

What are objects, such as buttons, menus, and labels, that can display and respond to user interaction, called?

controls

The SelectionMode property of the ListBox object ____.

enables multiple selections to be made

A(n) ____ is a notification from the operating system that an action, such as the user clicking the mouse or pressing a key, has occurred.

event

decimal data type (decimal)

fairly new data type used in C#. Also a numeric data type that handles large decimal numbers, but helps eliminate the problems of loss of precision in mathematical operations that occurred in previous languages.

Classes and class diagrams are used most often with the structured procedural approach to software development.

false

Good programmers often build test plans while they are in the implementation stage.

false

In C#, it is tradition to name the file containing the class the same name as the class name, except the file name will have a .c# extension affixed to the end of the name.

false

Misspelling a name or forgetting to end a statement with a semicolon are examples of runtime errors.

false

Software consists of programs, which are sets of instructions telling you how to use the computer.

false

What object-oriented feature enables you to define subclasses that share some of the characteristics of other classes?

inheritance

A derived class ____ methods of another class.

inherits

Comments that use two forward slashes are called ____.

inline

To reduce the chances that typing errors will corrupt your solutions, a good design principle to follow is ____.

not allow users enter values that can be calculated

A quick way to identify a method is by looking for ____.

parentheses

In a Windows application, Application.Run(winForm); ____.

places the application in a process loop so that it receives messages from the operating system

Problem specifications often include the desired output of the program in terms of what is to be displayed, saved, or printed.

true

Procedural and object-oriented are the two commonly used design methods.

true

Procedural programming is also called structured programming.

true

Several third-party vendors are also marketing .NET-compliant languages.

true

System software includes software such as the operating system.

true

The rule that every statement should end with a semicolon is an example of a syntax rule.

true

Xamarin is included with the latest version of Visual Studio. ​

true

Given the following output statement, what would be displayed? Console.Write("Ok\\ \"I\'m sure\"");

Ok\ "I'm sure"

On a class diagram, the minus symbol shown beside the data member indicates the member is ____.

Private

In Visual Studio, the ____ window is used to view and change the design time properties and events of an object.

Properties

compound operator

Provide a shortcut way to write assignment statements using the result as part of the computation. answer = 100; answer = answer + 5; This can be written as a compound operation: answer += 5;

assignment operator (=)

The = symbol, when used with an assignment statement or a compile-time initialization. The value on the right side of the operator (=) is determined, and then that value is assigned to the variable on the left side of the = operator.

variable

The representation of an area in the computer memory in which a value of a particular data type can be stored.

character data type (char)

To represent a single character, such as the first initial of your last name, a char data type is used.

One of the guidelines for good design is to keep an item the same as other items, unless you are trying to call attention to that item.

True

System software includes software such as the operating system.

True

T/F Since C# is an object-oriented language, everything is designed around a class.

True

T/F Instead of calling on the operating system with a request, as console applications do, Windows applications receive messages from the operating system that an event has occurred

True

The #region is an example of a preprocessor directive. However, C# does not have the separate preprocessing step you find with some other languages.

True

The System namespace contains classes that define commonly used types or classes.

True

The rule that every statement should end with a semicolon is an example of a syntax rule.

True

Visual Studio automatically imports the System.Windows.Forms namespace for you when you create a Windows Application Project using the IDE.

True

While in Design view, you can select controls from the Toolbox window and drag and drop them onto your form container.

True

string data type (string)

Used to represent a grouping of characters, such as your name.

One class predefined as part of .NET is ____.

Console

One of the guidelines for good design is to try to place as many controls on the form as you are able to without overlapping any.

False

Probably the most commonly used control for both input and output is the button because it adds additional functionality to an application.

False

Semicolons are placed at the end of method headings.

False

Software consists of programs, which are sets of instructions telling you how to use the computer.

False

T/F A console-based application interface can include menus, buttons, pictures, and text in many different colors and sizes.

False

The first step in the program development process is design.

False

When you create a new Windows application using Visual Studio, if you do not see the constructed form, but instead see the program statements, you have selected the wrong template and need to begin again.

False

When you design Windows applications using Visual Studio, you must be sure to add program statements to call the Dispose( ) method to clean up or release unused resources back to the operating system.

False

With Windows applications, you write methods called processors to indicate what should be done when a mouse is clicked on a button or the press of a key occurs.

False

With console-based applications, you register events about which you want your program to receive notification.

False

The ____ method of the Control class sets the input focus.

Focus( )

The ____ property is used to determine whether a control is the one currently selected.

Focused

The top-level class used as a container to hold other controls for an application is called a ____.

Form

Using the object-oriented approach, a(n) ____ is a combined set of attributes and actions.

class

The diagram used in object-oriented development to show the characteristics and behaviors of a class is a(n) ____.

class diagram

An instance of the delegate class is called a

delegate

Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte...

kilo = 1000; mega = million; giga = billion; and so on. So if you have a machine that has a 64-bit processor, 4GB of RAM, and 1 TB of hard disk space, you know that the machine can process 64 bits at one time, store approximately 4 billion characters in memory, and has storage capacity for approximately 1 trillion characters on the hard disk.

Uppercase

used by constant literals and for identifiers that consist of two or fewer letters.

bit

"Binary Digit". Binary means two; thus, a binary digit can hold one of two values: 0 or 1. The 1 and 0 corresponds to on and off, respectively.

A ____ control offers the advantage of multiple selections and the opportunity to add or remove items dynamically at runtime.

ListBox

If you write a program and, instead of multiplying two values together as intended, you divide one value by the other, you produce a(n) ____ error.

Logic

Which character is called the escape character in C#?

\

To create mutually exclusive options use ____.

a GroupBox object with RadioButton objects

On a class diagram, the minus symbol shown beside the data member indicates the member is ____.

private

Scientific Notation for floating-point type numbers

Can be specified in scientific notation with an exponent or in standard decimal notation. Using scientific notation syntax, large decimal numbers can be written in short expressions. Example: n.ne+/-P. n is the decimal number; P is the number of decimal positions to move left or right; and the + or - indicate the direction the decimal should be moved. (3.2e+5 is equivalent to 320,000)

The method that converts all characters entered to and from their uppercase or lowercase equivalent is ____.

CharacterCasing

____ objects usually appear as small boxes that allow users to make a yes/no selection.

CheckBox

What is the name of the default event handler method for RadioButton and CheckBox objects?

CheckChanged( )

Using the object-oriented approach, a(n) ____ is a combined set of attributes and actions.

Class

Which of the following is one of the pre-configured dialog boxes that can be added to an application?

ColorDialog

ComboBox objects have an added feature over the ListBox controls in that ____.

ComboBox objects contain their own text box field

An IDE (Integrated Development Environment) enables you to ____.

Compile, Debug, Type your program statements into an editor

binary numbering system

Computers use this base-2 numbering system for their language. Uses only two symbols, the values 0 and 1.

In Visual Studio .NET, the feature that attempts to sense what you are going to type before you type it is called ____.

IntelliSense

A method call is the same as a method declaration.

False

A sequential order exists with methods for Windows applications. The program exits after all statements have been sequentially executed.

False

At the beginning of a program, comments are often written to identify how many pages are included in the program listing.

False

C# is considered native code.

False

IDEs include a number of useful development tools such as Sensitive Windows, pop-up windows with completion options.

False

Windows forms and controls offer a wide variety of changeable properties including ____.

Font, Text, Color

In a C# program, namespace is used to ____.

Group functionally related types under a single name

Which control is used for placing objects, like RadioButtons, together? This control not only offers the benefit of visual appearance, but also helps during design because you can set properties that impact all the associated objects.

GroupBox

The field of research that concentrates on the design and implementation of interactive computing systems is called ____.

Human Computer Interaction (HCI)

Which property is used with the PictureBox control to associate an actual picture to the control?

Image

What object-oriented feature enables you to define subclasses that share some of the characteristics of other classes?

Inheritance

A derived class ____ methods of another class.

Inherits

____ is normally part of the analysis phase of software development.

Making sure you understand the problem definition

The ____ class in the System.Windows.Forms namespace enables you to add more functionality to your application by offering additional user options, such as adding layers of menus.

MenuStrip

Event handlers are ____.

Methods

Which TextBox property can be set to enable several lines of data to be entered by the user?

MultiLine

A quick way to identify a method is by looking for ____.

Parentheses

In a Windows application, Application.Run(winForm); ____.

Places the application in a process loop so that it receives messages from the operating system

Which method of the Console class allows multiple characters to be input via the keyboard?

ReadLine( )

Which property can be set to indicate whether text in the TextBox is read-only or not?

ReadOnly

Double-clicking on the ListBox control registers which default event?

SelectedIndexChanged

The default event-handler method for the ComboBox control is ____.

SelectedIndexChanged( )

SelectedItems and ____ properties can be used to retrieve items from a ListBox object.

SelectedItem

modulus operator (%)

Sometimes referred to as the remainder operator. The result, after division is done with 2 integral operands, is the remainder.

Increment / Decrement Operators

The addition or subtraction of the number one (1) to or from a memory location. The symbols used for increment and decrement are ++ and --. No space is permitted between the two symbols (++ or --). If they appear as prefixes, or to the left of the variable, the increment or decrement is perfomred before using them in the expression. When placed before they are called preincrement or predecrement operators; when placed after they are called postincrement or postdecrement operators.

Unicode

The character set used by programmers of C#. The Unicode character set uses 16 bits to represent a character; thus, 2 to the 16th or 65,536 unique characters can be represented. Provides a unique character for every character in many different languages.

Pascal case

The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. Classes, methods, namespaces, and properties follow the Pascal case naming convention in C#.

Camel case

The first letter of an identifier is lowercase, and the first letter of each subsequent concatenated word is capitalized. The convention in C# is to use camel case for variable and object identifiers.

identifiers

The name of elements that appear in a program, such as the names of data items, variables, objects, classes, or methods. Some identifiers are predefined; others are user defined. They are made up of a combination of alphabetic characters, numeric digits and the underscore character.

An example of an event that might be registered is the "Press the enter key."

True

As far as the compiler is concerned, you could actually type the entire program without touching the Enter key.

True

Avoid using bright colors (such as reds), especially for backgrounds because they can result in user eye fatigue.

True

It is more important to spend time designing a prototype for Windows applications than console-based applications.

True

Several third-party vendors are also marketing .NET-compliant languages.

True

The GUI should be different if the application is going to be displayed on a WAP (Wireless Access Protocol)-enabled device such as a tablet or a smart phone.

True

The Visual Studio IDE is an interactive environment that enables you to type the source code, compile, and execute without leaving the IDE program.

True

The interface is the visual image you see when you run a program that allows users to interact with the application.

True

WriteLine( ) differs from Write( ) in that ____.

WriteLine( ) advances to the next line after it finishes displaying output

format specifiers

You can separate digits with commas or show the fractional portion of a value. You can suppress leading zeros or you can pad a value with zeros. There are many different specifiers that can be used with numbers. Examples: currency, decimal, scientific (exponent), fixed point, general, number, and percent. There are also some placeholder, separator, and literal specifiers as well.

With Windows Presentation Foundation (WPF) applications, ____.

a new XAML file, resembling an HTML file, is added to the solution

The front end portion of the program that the user sees and responds to is called the ____.

interface

In order for event handlers to be called using delegates, the delegate must ____.

maintain a list of the registered event handlers for the event

The preprocess directive #region can be added in the program to ____.

mark sections of code that can be expanded or collapsed.

Delegate declarations resembles ____ declarations

method

Event handlers are ____.

methods

when the delegate wraps more than one method, it is called a _____ delegate

multicast

One of the advantages of a ListBox object over other types of objects used for input is ____.

multiple selections can be made

It is important to name the button object, because once named ____.

program statements can be written to reference it.

Delegates are special types of .NET classes whose instances store

references to methods

Delegate signatures differ from method signatures in that the delegate also includes its

return type

An added value of ComboBox objects is that compared to a ListBox object they ____.

save space on a form

To have the ListBox or ComboBox Items arranged in alphabetical order ____.

set the Sorted property to true.

What does the following statement do? this.BackColor = System.Drawing.Color.Blue;

sets the form color to Blue

The compiler checks for ____.

syntax rule violations

Program execution halts in a C# program when ____.

the last statement in Main( ) is executed

Run-time errors are more difficult to find than syntax errors because ____.

the program may compile and produce results with a run-time error

A good design principle to follow when developing Windows applications is ____.

to keep data entry to a minimum

The compiler is responsible for ____.

translating high-level programming language into machine-readable form

As far as the compiler is concerned, you could actually type the entire program without touching the Enter key.

true

Each instruction statement has a semantic meaning—a specific way in which it should be used.

true

The process that includes identifying an event, such as a button click as being of interest, and associating a method to be executed when the event occurs describes ____.

wiring an event


संबंधित स्टडी सेट्स

BIOLOGY: CH. 7 PHOTOSYNTHESIS: USING LIGHT TO MAKE FOOD

View Set

Upgrade Computer Hardware- Assignment

View Set

Critically Ill Patients with Neurological

View Set