Computer Programming - CHP 3/ 4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

C# considers the variables number and nUmBEr to be identical

False

The arthimetic operators *, /, %, + and - all have the same level of precendence.

False

decimal method ___ converts a string to a decimal value

Parse

The ___ statement is used to make decisions.

if

When each object of a class maintain in own copy of an attribute, the attribute is known a(n) _____

instance variable

A(n) _____ begins the body of every method, and a (n) _____ ends te body of every method

left brace, right brace

Comments delimited by ___ and ___ can be spread over several lines

/* and */

A comment that begins with ____ is called a single line comments, because it terminates at the end of the line on which it appears.

//

______ begins a single line comment

//

For a(n) ____, the compiler automatically generates a private instance variable and set and get accounts

Auto implemented property

___ provides a rich set of predefined classes that you can reuse rather than " reinventing the wheel." These classes are grouped into namespaces-- named collections of classes

C#

The format specifier ____ is used to display values in a monetary format

C.

C# is a case sensitive

True

Empty parentheses following a method name in a method name in a method declaration indicate that the method does not require any parameters to perform its task.

True

The body of any method or property is delimited by left and right braces.

True

The number of arguments in the method call must the number of required parameters in the method declaration's parameters list.

True

Variables declared in the body of a particular method are known as instance variables and can be used in all methods of the class.

True

_____ Studio provides many ways to personalize your coding experience. You can modify the editor setting to display line numbers or set code indentation.

Visual

Keyword public is a(n) ___

access modifier

______ , _______ , and ______ are called whitespace. Newline character are also considered whitespace.

blank lines, space characters, and tab characters

The body of every class declaration is delimited by _____ ({})

braces

Every class declaration contains keyword ____ followed immediately by the class's name.

class

Keyword ____ introduces a class declaration and is immediately followed by the class name

class

You may insert ____ to document apps and improve their readability. The C# compiler ignore comments

comments

Variables of type ___ are typically used to represent monetary amounts.

decimal

A ____ directs the user to take specific action

prompt

Most statements end with a ______

semicolon (;)

____ enables you to insert values directly into a string literal.

string interpolation

A programming's languages's ____ specifies rules for creating a proper app in that lanuage

syntax

An interpolated string must begin with $ before the string literal.

true

Each parameter must specify both a(n) ____ and ____

type, name

____ are reserved for use by C# and are always spelled with all lowercase letters

Keywords

______ are reserved for use by C#

Keywords

By convention, method names begin with a lowercase first letter and all subsequent words in the name begin with a capital first letter.

False- they begin with uppercase first letter

The ____ class allows C# apps to read and displays characters in the console window.

Console

Methods ____ and _____ displays information in the console window.

Console.Writeline and Console.Read

Comments cause the computer to display the text after the // the screen when the app executes.

False

The remainder operator (%) can be used only with integer operands

False

All instance variables are initialized by default to null.

False- Numeric simple type instance variables are initialized to 0.

A property declaration must contain both a get accessor and a set accessor.

False- it can have a get, set, or both

A property's get accesor enables a client to modify the value of the instance variable associated with the property.

False- its the SET accessor

Local variables are initialized by default.

Instance variables

C# apps begin execution at method _____

Main

Console method ______ obtains a line of text from the keyboard for use in an app

ReadLine

____ are whole numbers, such as 7, 0, and 1024

integers

Operator _____ creates an object of the class specified to the right of the keyword.

new

A ____ directive help the compiler locate a type that's used in an app

using

A ___ is location in the computer's memory where a value can be stored for use later in an app. Variables must be declared with a name and a type before they're need.

variable

Return type _____ indicates that a method will not return any information when it completes its task.

void


Kaugnay na mga set ng pag-aaral

ECON 103 practice questions exam 2

View Set

Micro Chapter 13: Labor Markets, Poverty, & Income Distribution, Micro: Chapter 14, Chapter 15: International Trade and Trade Policy

View Set

Anatomy: posterior and lateral leg (8.2)

View Set