ITC 366 Final Prep

¡Supera tus tareas y exámenes ahora con Quizwiz!

When presented with two classes that have a parent-child relationship, you can tell which class is the base class and which is the derived class by using the two classes in a sentence using what phrase? a. "is a" b. "in a" c. "uses a" d. "of a"

A

Where can a method's name and information about what will be passed into the method and returned from it be found? a. in the body of the method b. in the method's header c. in the method's class definitions d. in the method's keywords

B

A member of a class that provides access to a field of a class is referred to as what? a. property b. implicit parameter c. reference type d. explicit parameter

A

What can be used in conjunction with a switch statement in order to make the meaning of case label values much clearer? a. enumeration b. OR c. if structure d. conditional AND

A

What interface in C# contains the definition for the CompareTo() method that compares one object to another and returns an integer? a. IComparable b. CompareTo c. Comparable d. ICompareTo

A

What is another name for a base class in C#? a. parent class b. extended class c. child class d. derived class

A

What method can you use to return a unique hash for different objects, so long as you explicitly implement it in a derived class? a. GetHashCode() b. CalcHash() c. ToHash() d. GetHashGen()

A

Classes that support simple data items each contain a method that provides the details of how items in the class compare to each other. What is the name of this method? a. Equals() b. CompareTo() c. Less() d. IndexOf()

B

System.Console is an example of a class that can't be extended. What is the reason for this? a. The class has a private access modifier. b. The class has a static access modifier. c. The class has an internal access modifier. d. The class has a protected access modifier.

B

The program you are creating must output information onto the screen, and then position the cursor on the next line in preparation for additional output. What method should you use? a. Main() b. WriteLine() c. Println() d. Write()

B

What is a method considered to be when there is a potential for a situation in which the compiler cannot determine what method to use? a. polymorphic b. overloaded c. ambiguous d. hidden

C

What is another name used for instance variables in order to help distinguish them from other variables you might use? a. states b. relationships c. fields d. instantiations

C

What is the process of removing all syntax and logical errors from a program in order to create a working program that accomplishes all intended tasks known as? a. commenting out b. executing c. debugging d. compiling

C

What kind of conditional operator requires three arguments: a test expression, and true and false result expressions? a. binary conditional operator b. enumeration conditional operator c. ternary conditional operator d. unary conditional operator

C

What kind of property is one in which the code within the accessors is created automatically? a. polymorphic property b. dynamic property c. auto-implemented property d. abstract property

C

What technique allows for the ability to write multiple versions of a method using the same method name? a. inheriting b. interfacing c. overloading d. implementation hiding

C

When you declare an object, what are the numeric fields initialized to? a. false b. '\u0000' c. 0 d. null

C

What is a garbage value in the C# programming language? a. It is a variable that holds output text after it is displayed. b. It is a variable that is used as a placeholder. c. It is a variable that is assigned a value that has no purpose. d. It is an unknown, unassigned value.

D

What keyword always refers to the superclass of the class in which you use it? a. super b. upper c. parent d. base

D

What technique involves the packaging of an object's attributes and methods into a cohesive unit that can be used as an undivided entity? a. polymorphism b. inheritance c. interface d. encapsulation

D

What type of expression has a Boolean value as a result? a. unifying b. assignment c. decrement d. comparison

D

What type of search is performed when each array element is examined in order? a. binary b. range match c. parallel d. sequential

D

When you declare an object, what are the bool fields initialized to? a. true b. '\u0000' c. null d. false

D

You are performing an arithmetic operation and have placed the desired result type in parentheses followed by a variable to be cast with the result. What is this an example of? a. implicit casting b. automatic casting c. intrinsic casting d. explicit casting

D

C# programmers must use Pascal casing when creating method names to produce an executable program. True False

False

In C#, an array's elements are numbered beginning with 1. True False

False

In a switch statement, the keyword return usually terminates each case. True False

False

Statements in a for loop body cannot be blocked. True False

False

The Equals() method compares two objects and returns true if they have the same value. True False

False

You can overload an operator for a built-in data type. For example, you can change the meaning of + between two ints. True False

False

someValue++ is an example of the use of the prefix increment operator. True False

False

You can concatenate two strings with the plus (+) sign. True False

True

A method's name and parameter list both constitute what component of the method? a. The method's signature. b. The method stamp. c. The method's type. d. The return type for the method

A

Besides the new keyword, what keyword can you use when defining a derived class member that has the same name as a base class member? a. override b. cast c. overload d. hide

A

Machine language is expressed as a series of 1s and 0s. True False

True

You can improve loop performance by using prefix incrementing. True False

True

When running a program, an instruction to the user to enter data for the program to process is known by what term? a. prompt b. line c. cue d. hint

A

What modifier is used to indicate that a parameter is used for output? a. ref b. out c. get d. params

B

What type of parameter requires you to indicate the parameter's type and name, and the method receives a copy of the value passed to it? a. reference parameter b. value parameter c. input parameter d. output parameter

B

Even though you can't specify this modifier for a named constant within a class, what is the effective access modifier for the constant? a. public b. private c. internal d. static

D

A method can return at most one value to a method that calls it. True False

True

If you don't write a constructor for a class object, C# writes one for you. True False

True

Only nonstatic methods receive a this reference. True False

True

You can combine as many AND and OR operators in an expression as needed. True False

True

What are methods with identical names that have identical parameter lists but different return types? a. illegal methods b. related methods c. overloaded methods d. applicable methods

A

What can be used as a type of "fingerprint" for an object, due to the fact that it is unique? a. hash code b. new property c. property d. derived code

A

What object class method returns a string that holds the name of the class, just as GetType() does? a. ToString() b. GetName() c. Equals() d. GetHashCode()

A

What operator is used for exponentials in the C# programming language? a. None of the above. b. ^ c. % d. *

A

What programming style capitalizes the first letter of all new words in an identifier, including the first one? a. Pascal casing b. upper casing c. OOP casing d. camel casing

A

What should you utilize when you don't know how many arguments you might eventually send to a method? a. parameter array b. output parameter c. value parameter d. reference parameter

A

What type of one-dimensional array contains another one-dimensional array in each element, with each array capable of being a different length? a. jagged b. rectangular c. matrix d. table

A

What type of parameter to a method will have a value automatically supplied if you do not explicitly send one as an argument? a. optional parameter b. default parameter c. actual parameter d. value parameter

A

What type of program is created by the use of named memory locations and a series of steps or operations to manipulate the values of those memory locations? a. procedural b. component-oriented c. object-oriented d. variable-oriented

A

What will be the highest subscript value possible for an array with 15 elements? a. 14 b. 16 c. 17 d. 15

A

When can a method be called with fewer arguments than exist in the parameter list for the method? a. Only when default arguments are defined for the method. b. Only when the parameters are marked as non-critical parameters. c. Only when value parameters are passed by other parts of the program. d. Only when scope relaxation is used to allow global variables.

A

A loop for which the number of iterations is predetermined is known as what type of loop? a. indefinite b. definite c. infinite d. while

B

A loop that is controlled by user input rather than altered by arithmetic is known as what type of loop? a. infinite b. indefinite c. definite d. sentinel

B

A program's execution of various statements and procedures in a correct order to produce desired results is referred to as what defining characteristic? a. the attributes utilized by the program b. the program's logic c. the program's GUI d. the methods of the program

B

An array that you can picture as a column of values, and whose elements you can access using a single subscript, is what type of array? a. jagged b. single-dimensional c. two-dimensional d. rectangular

B

What accessibility modifier allows access to a method from other classes? a. private b. public c. protected d. protected internal

B

What character(s) function as the non-conditional Boolean logical inclusive OR operator? a. && b. | c. || d. &

B

What conditional operator can be used to create a compound Boolean expression as an alternative to if statements? a. OR b. AND c. NOT d. XOR

B

What happens if you do not explicitly include an access specifier? a. Its access modifier will be public by default. b. Its access modifier will be private by default. c. It will be set to protected. d. It will be assumed as an internal field.

B

What happens when "string1" is added to "string2" using the + sign in the C# programming language? a. A type error occurs, and the program is halted. b. The strings are concatenated together. c. The result is returned as a Boolean value. d. The strings are converted to integer equivalents and then added together.

B

What is the term for a named location in computer memory that can hold different values at different points in time? a. constant b. variable c. alias d. literal constant

B

What rule results in an error if you reach the end point of a statement list in a case section? a. break on end b. no fall through c. default d. en passant

B

What type of arithmetic operator has one argument to the left and another argument to the right of the operator? a. unary b. binary c. complex d. composite

B

What type of array has the same number of elements and corresponding data with another array? a. shadow array b. parallel array c. twin array d. shared array

B

What will a Click() method that responds to button clicks be by default, due to the fact that it is associated with an object that is a Form? a. static b. nonstatic c. local d. qualified

B

When declaring a method, how any params keywords are permitted? a. Only as many as there will be arguments. b. Only one params keyword is permitted. c. Two, provided there is a nested method. d. There is no limit to the use of the keyword.

B

When using a nested loop, what should always be thought of as the all-encompassing loop? a. inner loop b. outer loop c. for loop d. while loop

B

A parameter within a method header that accepts a value is considered to be what type of parameter? a. global parameter b. actual parameter c. formal parameter d. local parameter

C

In C#, += adds the operand on the right to the operand on the left and assigns it to the operand on the left in one step. What is the name for this operator? a. postfix increment b. prefix increment c. add and assign d. increment and assign

C

Many loop control variable values rely on an added value through each loop. What type of loop control variable is this? a. A reducing loop control variable. b. A comparing loop control variable. c. An incrementing loop control variable. d. An expanding loop control variable.

C

Under what circumstances can you return a reference from a method? a. Only when a method is returning optional parameters with known values as the reference. b. Only when the method performing the return is a static type method. c. Only when it is safe to return, such as returning a reference from a method if the reference was passed into the method. d. Only when the reference is for an array defined within the method's scope.

C

What can be used as a construct that acts like a container to provide a way to group similar classes? a. black box b. object c. namespace d. method

C

What can be used to extend an existing class so as to create a more specific class? a. abstraction b. polymorphism c. inheritance d. encapsulation

C

What consists of abstract methods (and perhaps other members) that can be used by any class, as long as the class overrides the abstract method definitions? a. A defined framework. b. A class destructor. c. A properly implemented interface. d. A C# multifile assembly.

C

What method can be used to find the array position of a requested value in an array by repeatedly splitting the list of objects until a match is found, but only if the array is sorted in ascending order? a. IndexOf() b. Reverse() c. BinarySearch() d. Sort()

C

What statement regarding the C# programming language is accurate? a. C# only allows specific pieces of data to be treated as objects. b. The C# programming language was developed as a procedural language. c. C# provides constructs for creating components with properties, methods, and events. d. C# is modeled after the COBOL programming language.

C

What term describes a one-word name with no embedded spaces that references a variable in a program? a. behavior b. bug c. identifier d. attribute

C

What type of operator can be used to reduce a variable's value by 1 either at time of evaluation, or after it is evaluated, depending on placement? a. sub and assign operator b. add and assign operator c. decrement operator d. increment operator

C

What uses curly braces containing a number that indicates the desired position for a variable in a list that follows a string used for formatting purposes? a. whitespace b. namespace c. placeholder d. format string

C

When a variable or constant is required by multiple methods in a GUI program, where should it be defined? a. Inside a nested method shared by both methods. b. Inside of an inherited class. c. Outside of the methods, but inside of the Form class shared by both methods. d. Inside one of the methods used by the GUI.

C

You can assign a derived class object to an object of any of its superclass types. When you do, what type of conversion occurs from the derived class to base class? a. explicit b. strong c. implicit d. real

C

A parameter that is undeclared and that gets its value automatically is considered to be what type of parameter? a. property b. instance c. explicit d. implicit

D

Besides being known as a class client, what is a class that instantiates objects of another prewritten class known as? a. a server class b. a class instantiation c. a class state d. a class user

D

In order to use the Sort() method, what must the array name be passed to? a. Sort.Sort() b. List.Sort() c. Collections.Sort() d. Array.Sort()

D

Loops that are controlled by reducing a variable are utilizing what type of loop control variable? a. incrementing b. expanding c. comparing d. decrementing

D

Programmers make use of what type of program in order to translate higher-level language statements into machine code? a. a JIT b. a command prompt c. an IDE d. a compiler

D

What do accessors do within the C# language? a. They define how an instantiation of a class behaves. b. They provide access to a field of a class. c. They control access to the various properties of a class. d. They specify the statements that execute when a class's fields are accessed.

D

What keyword can be used to create a named identifier for a memory location whose contents cannot change? a. static b. final c. fix d. const

D

What kind of programming language allows you to use a vocabulary of reasonable terms such as "read," "write," or "add" instead of the sequence of on/off switches that perform these tasks? a. machine-level b. switch-level c. low-level d. high-level

D

What statement regarding operator precedence is accurate? a. Addition and subtraction operations are evaluated first. b. Operations are always evaluated left to right, regardless of the expressions. c. Multiplication, division, and addition always take place prior to the calculation of a remainder. d. Operations that are placed in parentheses are evaluated first.

D

What technique allows a programmer to change the way in which a method works internally without affecting programs that utilize the method? a. overloading b. polymorphism c. inheritance d. implementation hiding

D

What type of loop is one in which the loop control variable is tested after the loop body executes? a. fortest b. intest c. pretest d. posttest

D

What type of parameter can be given a default value? a. reference parameter b. array parameter c. output parameter d. value parameter

D

If you do not provide an accessibility modifier for a method, it is private by default. True False

True

The Visual Studio IDE gives you advanced features such as syntax coloring and automatic statement completion. True False

True

The equal sign (=) is the C# assignment operator. True False

True


Conjuntos de estudio relacionados

MKTG 3335 Chapters 11-14 TB Questions

View Set

Section 3: Computer Hardware and History

View Set

Chemistry: ChemQuest Skill Practice (Semester 1)

View Set

Adaptive Quizzing: Medication Administration (Chapter 32)

View Set