with Correct Answers Graded A+
In Object-oriented programming language, the ability to create methods that act appropriately
depending on the context is called _________.
inheritance
instance
encapsulation
polymorphism
polymorphism
in "using System;", what is "System" referring to?
variable
class
namespace
method
namespace
Which of the following is NOT a valid C# identifier
this
_order
a1
a
this
Which of the following pairs is an example of a class and an object, in that order?
car and vehicle
cup and glass
CSUF and university
animal and bear
animal and bear
What is NOT considered a keyword by the C# language?
catch
global
implicit
static
, global
Which of the following expression is equivalent to x || y && w || z?
x && y || w && z
two of these
x || (y && w) || z
(x || y) && (w || z)
x || (y && w) || z
What is the value of the variable named counter after the following statements are executed?
double percent = 0.54;
bool valid = true;
int counter = 1;
if ((percent > 0.50) && (valid == true))
{
counter += 2;
if (valid == true)
counter++;
else if (percent >= 0.50)
counter += 3;
}
else
counter++;
2
4
7
3
4
Which value of x would make the following condition true: (x>=5) && (x<=6)
both B and C
A. x=7
B. x=5
C. x=5.001
both B and C
If orderTotal has a value of 50 and quantity has a value of 10, what is the value of discount after these
statements are executed?
if (quantity == 1 || quantity == 2)
discount = 0;