ADVANCED OBJECT-ORIENTED PROGRAMMING TEST FOCUS

studied byStudied by 13 people
5.0(2)
Get a hint
Hint

arr.GetLength(0);

1 / 47

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

48 Terms

1

arr.GetLength(0);

Suppose you have a two-dimensional array named arr. How are you going to get the length of its rows?

New cards
2

structure

It is a fundamental concept in the C# programming language that allow you to define and manipulate composite data types.

New cards
3

Base Case

This refers to the "stopping case" and the simplest way of the problem that can be directly solved

New cards
4

Escape Sequences

These are used for characters that cannot be printed using the normal way of printing

New cards
5

c. these are methods used to MODIFY the values of private data members of a class from outside the class

What is the purpose of setters?
a. these are methods used to ACCESS the values of private data members of a class from outside the class
b. these are special methods, but does not return a value
c. these are methods used to MODIFY the values of private data members of a class from outside the class
d. all of these

New cards
6

internal

Members with this access modifier are visible to the subclass and any class within the same assembly

New cards
7

d. Use the abstract keyword before the class keyword.

How do we define abstract classes in C#?
a. Use the abstract keyword after the class keyword.
b. Use the abstract-class keyword after the class keyword.
c. Use the abstract-class keyword before the class keyword.
d. Use the abstract keyword before the class keyword.

New cards
8

Microsoft

Who developed C#?

New cards
9

a. represent the state or characteristics of an object
d. defined within the class and store the object's data

Which of the following defines a field?
a. represent the state or characteristics of an object
b. define the behavior of the objects
c. allow you to perform actions or calculations related to the state of the object
d. defined within the class and store the object's data

New cards
10

c. Can be instantiated independently without the need for subclasses.
d. Can be directly instantiated using the new keyword.
e. Contains concrete implementations for all its methods.

Which of the following describes a concrete class?
a. Exists to serve as a blueprint for other classes.
b. Subclasses must implement all abstract methods.
c. Can be instantiated independently without the need for subclasses.
d. Can be directly instantiated using the new keyword.
e. Contains concrete implementations for all its methods.
f. May contain both abstract and concrete methods.

New cards
11

c. to inherit from a base class

What is the purpose of the : keyword?
a. create an instance of the derived class
b. create an object
c. to inherit from a base class
d. to encapsulate data members

New cards
12

do-while

This iterative structure ensures that the statement will be executed once.

New cards
13

Method Overriding

This occurs when a subclass provides a specific implementation for a method that is already defined in its superclass

New cards
14

break

This statement is used to prematurely terminate the loop

New cards
15

void

Which keyword is used if the function does not require to return a value?

New cards
16

{2:C}

Write the format specifier for the third argument, in currency format.

New cards
17

Polymorphism

This OOP principle allows objects of different classes to be treated as objects of a common base class or interface during runtime.

New cards
18

Functions

They are used to encapsulate the set of tasks in a single unit, ensuring the DRY principle.

New cards
19

ref

This keyword is used in passing by reference

New cards
20

index

they refer to the array's addresses/location, and are used to access its elements.

New cards
21

return

this keyword is used to exit a method, providing a value to the caller

New cards
22

{ and }

the function definition is placed inside these characters

New cards
23

member variables

These are places inside the curly braces when defining a structure

New cards
24

arr.GetLength(0);

Suppose you have a two-dimensional array named arr. How are you going to get the length of its rows?

New cards
25

main method

This contains the main logic of the program

New cards
26

structures

these are complex data types that contains multiple data members with various types.

New cards
27

sample:
Rectangle rectangle1 = new Rectangle {Width = 10, Height = 5};

Suppose you created a structure named Rectangle, with integer data members such as Width and Height. How are you going to create an instance of it, initializing 10 and 5 for the value of width and height, respectively?

New cards
28

ref

This keyword is used in passing by reference

New cards
29

Console.Writeline()

This keyword is used in displaying a string literal, or any value in the console

New cards
30

Recursive Functions

These are functions that repeatedly call themselves, and changing the input values

New cards
31

Escape Sequences

These are used for characters that cannot be printed using the normal way of printing

New cards
32

Function Call

This is done by specifying its name and passing the arguments if required

New cards
33

while loop

This iterative structure evaluates the condition before each iteration of the loop

New cards
34

Pass by Reference

This allows methods to modify the original values of the actual parameters directly

New cards
35

dot(.) operator

This operator is used to access the members of a structure

New cards
36

{2:C}

Write the format specifier for the third argument, in currency format

New cards
37

Base Case

This refers to the "stopping case" and the simplest way of the problem that can be directly solved

New cards
38

void

This keyword is used if the method does not have a return type

New cards
39

arr[3,2] = 25;

How will you assign the value 25 to an array named arr, on the fourth row index and third column index?

New cards
40

MidtermPassedCutie

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
41

2.000

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
42

Jerome is a 4th year student.

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
43

Artist

Which of the following is the base class? Write only the class name.

<p><span>Which of the following is the base class? Write only </span><strong><em><span>the class name</span></em></strong><span>.</span></p>
New cards
44

Painter

Which of the following is the derived class? Write only the class name

<p><span>Which of the following is the derived class? Write only </span><strong><em>the class name</em></strong></p>
New cards
45

Fatima

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
46

7 14 210 28 35

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
47

Minimum value: 8

Identify the output of the given codes in each item. Please remember, they are case-sensitive

<p><span>Identify the output of the given codes in each item. Please remember, they are case-sensitive</span></p>
New cards
48

16


What will be the value of min if i is 2?

<p><br>What will be the value of <strong>min</strong>&nbsp;if <strong>i </strong>is 2?</p>
New cards

Explore top notes

note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 177 people
... ago
4.8(4)
note Note
studied byStudied by 28 people
... ago
5.0(1)
note Note
studied byStudied by 48 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 16 people
... ago
5.0(2)

Explore top flashcards

flashcards Flashcard (64)
studied byStudied by 35 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 52 people
... ago
5.0(1)
flashcards Flashcard (28)
studied byStudied by 19 people
... ago
5.0(1)
flashcards Flashcard (138)
studied byStudied by 52 people
... ago
5.0(1)
flashcards Flashcard (46)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (21)
studied byStudied by 77 people
... ago
5.0(1)
flashcards Flashcard (90)
studied byStudied by 49 people
... ago
5.0(2)
flashcards Flashcard (51)
studied byStudied by 14 people
... ago
5.0(1)
robot