C# Exam 1 A

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Constructors are methods.

True

The Console class is defined in the System namespace.

True

A constructor is used to instantiate a class from an object.

False

A forward slash followed by an asterisk /* marks the beginning of an in-line comment.

False

A machine that has a 64-bit processor can process 64 characters at one time.

False

A method call is the same as a method declaration.

False

A namespace is really nothing more than a group of statements placed together under a single name.

False

A private access modifier is always associated with data members, methods, and constructors of a class.

False

A property looks like a method because it directly represents a storage location.

False

A standard convention used by C# programmers is to use Pascal case style for class, data member identifiers, and method identifiers.

False

A standard convention used by programmers for naming classes is to use an action verb phrase.

False

Accessors are special types of methods in C# used to instantiate an object of the class.

False

An appropriate identifier used to store the total transaction amount is total$Amount.

False

An int variable would be the most appropriate type for a memory location that will be used to store the monthly membership dues for the computer club.

False

An object is like a class template. The object is used to define the structure for the different classes that are going to be of that type.

False

Base 16, also called the octal numbering system, uses powers of sixteen.

False

C# is considered native code.

False

Ceiling( ), Pow( ), and Floor( ) are all static members of the Console class.

False

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

False

Classes are actually implemented through types in C#.

False

Classes, methods, namespaces, and properties follow the Pascal case naming convention, which indicates that the first letter in the identifier is in lowercase and the first letter of each subsequent concatenated word is capitalized.

False

Comments are considered instructions to the computer.

False

Constants are normally named using all lowercase characters, separating second and subsequent words with the underscore character.

False

Design your classes to be as flexible and full-featured as possible. One way to do this is to include multiple instance data members.

False

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

False

Hexadecimal uses the symbols 1, 2, 3, 4, 5, 6, 7 8, 9, A, B, C, D, E, F ,G.

False

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

False

If a method does not return a value, the void keyword is placed inside the parentheses in the method heading.

False

If aNumber is declared to be of type int with a value of 50, Console.out.WriteLine( aNumber++); displays 51.

False

If you overwrite the ToString( ) method, you should also override the other methods of the object class.

False

In order to indicate a value is constant and cannot be changed, the keyword constant is added.

False

Instance methods must have the static keyword in their heading.

False

Methods can be defined globally outside of a class in C#.

False

Methods may be defined in any order and placed anywhere in the file, in or outside of the class.

False

The Write( ), WriteLine( ), Read( ), and ReadLine( ) methods are all overloaded.

False

The accessibility modifier identifies what type of value is returned when the method is completed.

False

The assignment operators (=, +=, -=, *=, and /=) represent operations that appear at the top of the hierarchy in the order of operations.

False

The body of a method can include statements that declare other methods.

False

The bool data type can take on values of true/false or on/off.

False

The decimal equivalent for 3.42e-5 in scientific notation is .00342.

False

The definition of the method includes the entry inside the curly braces, which is sometimes called the body of the method.

False

The first step in the program development process is design.

False

The following are examples of the access modifiers available in C#: public, personal, protected.

False

The iterative approach in the software development process indicates that the application will never be fully developed.

False

The keyword new is used as an operator to call constructor methods.

False

The name of the method, modifiers, return type, and the types of its formal parameters make up the signature of the method.

False

The result of 25 % 4 is 6.25.

False

The return keyword may not be included with a non-value returning method (void method).

False

The return type for constructors is always the type of the class.

False

The value $78,888.90 is printed as output when the {0:c) format specifier is used in the following Write statement: Console.Write("{0:c}", 78888.894);

False

Unicode includes representation of 28 or 256 unique characters.

False

When you create an application that has two files, both must have a Main( ) method.

False

When you define a property, you can define the set without the get, but you must define a get.

False

moreData = true; An error will be produced when moreData is assigned the boolean variable shown above because the keyword true should be enclosed in double quotation marks.

False

A class named River will have a constructor named River.

True

A standard naming convention in C# for properties is to use the same name as the instance variable or field, except begin the identifier using an uppercase character.

True

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

True

Both out and ref parameter types cause a method to refer to the same variable that was passed into the method.

True

C# allows you to mix numeric integral types and floating-point types in an expression.

True

C# offers both call by value and call by reference parameters. Call by value is the default type.

True

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

True

IDE stands for Integrated Development Environment.

True

In order to hold the screen when the program runs, programmers often add ReadKey( ) as a last statement.

True

Methods are the members of a class that perform an action, and through writing methods you describe the behavior of data.

True

Methods that use the static modifier are called class methods.

True

One required entry for a method heading is the return type.

True

One way to ensure that you have one entry and one exit from a method is to include a single return statement as the last statement in the method.

True

Placing the two plus symbols (++) before an identifier causes one to be added to the memory location referenced by the variable prior to any other statement's execution.

True

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

True

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

True

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

True

System software includes software such as the operating system.

True

The Framework Class Library (FCL) consists of more than 2,000 classes.

True

The Parse( ) method returns the number representation of its string argument.

True

The Read( ) method is different from the ReadLine( ) method in that the Read( ) returns an int and the ReadLine( ) returns a string argument.

True

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

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 base-2 number system is also called the binary number system.

True

The binary value for ten is 00001010.

True

The decimal value type is appropriate for storing monetary data items because it provides for greater precision.

True

The definition for a method includes just the heading. The signature includes the heading and the body of the method.

True

The number 11111111 in binary is equivalent to the number 255 in decimal.

True

The result of "123" + "321" is "123321".

True

The symbols +=, -=, and *=, compound operators in C#, are used to provide a shortcut way to write assignment statements using the result as part of the computation.

True

Three of the contextual keywords associated with properties are get, set, and value.

True

ToString( ), Equals( ), GetType( ), and GetHashCode( ) are all methods of the object class.

True

When you define a class and determine what data members it should have, you are declaring instance variables or fields that will represent the state of an object.

True

When you define methods of a class, you are defining its behaviors, in terms of what kinds of things it can do.

True

When you desk check the algorithm, you can compare the results obtained from the program with calculator results.

True

With only eight bits, you can represent 28 or 256 different decimal values.

True

With the object-oriented approach, objects send messages to other objects and receive messages from objects.

True

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

True

float totalAmount = 23.57; The float compile-time initialization above will produce an error because it is missing the type specifier (f or F).

True


Set pelajaran terkait

Chapter 5: Carbohydrates- Sugars, Starches, and Fiber

View Set

Chapter 11 Anatomy and Physiology I

View Set

"The Black Cat" by Edgar Allan Poe Plot Summary

View Set

UNIT 4: Interest Rates, TVM, and Risk and Return Quiz

View Set

5-Sickle Cell Anemia (Lecture + Syllabus)

View Set

Week 1: Elements of Jazz to Early Jazz

View Set