stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Final Exam Review - Programming Concepts II Flashcards | StudBud
Explore
/
Final Exam Review - Programming Concepts II
Final Exam Review - Programming Concepts II
15 terms
·
StudBud Administration
·
2 plays
Imported from external platform
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
A utility class can be instantiated multiple times to create objects.
True
False
2
If you try to write into file that doesn't exist, the file will be created by default.
False
True
3
How can we declare a class "Dog" inherited from a parent class "Animal" in C#?
class Dog implements Animal
class Dog : Animal
class Dog inherits Animal
class Dog extends Animal
4
Which Keyword restricts access to a class member so that it is only accessible within the same class?
Public
Internal
Private
Protected
5
What is a utility class typically used for in C#?
To define user interfaces
To manage data access
To hold common methods and functions
To handle database transactions
6
In C#, a class can inherit from multiple classes
True
False
7
Which regex pattern matches a phone number format like 123-456-7890 or 123 456 7890?
^\d{3}[-\s]\d{3}[-\s]\d{4}$
^\d{3}-\d{3}-\d{4}$
^\d{3}\s\d{3}\s\d{4}$
^\d{3} \d{3} \d{4}$
8
Consider the class "BankAccount", what are "accountNumber", "accountHolder" and "balance"?
Events
Variables Types
Atributes
Methods
9
What is the primary purpose of creating a Class Library in C#?
To design user interfaces for desktop applications.
To perform unit testing on application code.
To encapsulate code that can be shared across multiple applications.
10
Which regex pattern matches a Conestoga College email format like
[email protected]
?
^\
[email protected]
$
^\w+@conestogac\.on\.ca$
^\w+@conestogac\.ca$
^\w+@conestogac\.edu
11
What does the highlighted part in the following class represent?
Property
Method
Constructor
Field
12
Which of the following best describes abstraction in C#?
Providing a detailed implementation of methods and hiding their details.
Restricting access to certain parts of an object.
Bundling data and methods that operate on that data.
Creating a base class that cannot be instantiated and must be inherited,
13
Encapsulation involves hiding an object's internal state and interacting with it only through methods.
True
False
14
What does the regex pattern @"^abc" match?
Any string containing "abc" anywhere
Any string starting with "abc"
Any string ending with "abc"
Any string with "abc" in the middle
15
The command "Directory.GetCurrentDirectory()" will return the path where the executable file is located.
False
True