ISDS 505 Midterm Study Guide|Complete Questions with Correct Answers Graded A+
ISDS 505 Midterm Study Guide|Complete Questions 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; else if (quantity >= 3 && quantity < 10) discount = orderTotal * .1; else if (quantity > 10 && quantity <= 25) discount = orderTotal * .2; else discount = orderTotal * .3; 15 10 0 5 15 If quantity has a value of 2, what is the value of discount after these statements are executed? switch (quantity) { case 1: discount = 0; break; case 2: case 3: discount = .1; break; default: discount = .2; break; } 0 .2 .1 2 .1 What is the value of sum after the following code is executed? int sum = 0; for (int i = 2; i < 10; i += 2) { sum += i; } 54 30
Escuela, estudio y materia
- Institución
- ISDS 505
- Grado
- ISDS 505
Información del documento
- Subido en
- 16 de mayo de 2024
- Número de páginas
- 7
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
isds 505 midterm study guidecomplete questions wi