Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer the following: 1. Constructors are defined with ____ access modifiers. public protected internal private 2. Enabling reuse of code through extending the functionality of

answer the following:

1. Constructors are defined with ____ access modifiers.

public
protected
internal
private

2. Enabling reuse of code through extending the functionality of classes describes ____ as it relates to object oriented development.

inheritance
polymorphism
encapsulation
abstraction

3. In order to derive from a user-defined base class, you must ____.

open both files in the same application
add a reference to the base class
store both files using the same extension
store both files in the same directory

4. Packaging data attributes and behaviors into a single unit so that implementation details can be hidden describes ____ as it relates to object oriented development.

polymorphism
encapsulation
abstraction
inheritance

5. An overloaded method must have exactly the same signature as the method it is overriding.

True
False

6. Today applications are normally designed to be single, self-contained, monolithic programs.

True
False

7. The distinguishing characteristic of an abstract method is ____.

no parameters are found in the heading for the method
no implementation details are included
they cannot be included in abstract classes
methods may not include a return type

8. Class library files end with a(n) ____ extension.

.exe
.dll
.class
.cs

9. The base constructor is called by

adding className( ): between the constructor heading and the opening curly brace
adding base( ): between the constructor heading and the opening curly brace
typing base( ): as the first executable statement in the Main( ) method
typing base( ): as the first executable statement in the derived constructor

10. Partial classes enable a class to be split into two or more files and combined when the application is compiled and ran.

True
False

11. A generic class is defined ____ on the class definition line.

by inserting an identifier between left and right brackets
by inserting the word generic
by inserting an identifier between left and right parentheses
by removing the type

12. One of the developer tools available with Visual Studio that can be used to view an assembly is ____.

DisAssembler
ILDASM
Assembler
GAC

13. Components are implemented in C# through ____.

packages
namespaces
encapsulation
classes

14. To override a method, the base method may include any of the following keywords, EXCEPT ____.

abstract
override
interface
virtual

15. When you add the virtual keyword to a method heading, it

forces all classes derived from that class to include implementation details for the method.
tags the method as capable of being overridden.
overrides a method from a base class.
converts the class to an abstract class.

16. Which access modifier should be used to give derived classes direct access to change the parentmember data. This access modifier does not allow classes that instantiate objects of the class to have access to change member data?

internal
public
private
protected

17. By defining data members as private, you protect the data and enable access only through the objects methods and properties. This describes the ____ feature.

inheritance
abstraction
polymorphism
encapsulation

18. Abstract classes can include ____.

properties and virtual methods
only abstract methods
regular data field and method members
only virtual methods

19. You cannot spread the definition of your classes over multiple files using the partial keyword. Partial classes are reserved for use by the IDE.

True
False

20. To add dynamic link library components, add a reference to the components in your program and include a using directive. The reason for adding the using directive is to ____.

avoid fully qualifying references to class members
enable the program to use class members
eliminate the syntax errors
enable an executable to be created

21. Determining which method to call at runtime based on which object invokes the method describes ____.

abstraction
virtual method calls
dynamic binding
encapsulation

22. Calls to the ToString( ) method emphasize the use of ____.

encapsulation
inheritance
polymorphism
abstraction

23. Enabling multiple implementations of the same behaviors so that the appropriate implementation can be executed based on the situation describes ____ as it relates to object oriented development.

inheritance
abstraction
encapsulation
polymorphism

24. Once a DLL is available, any application can add a reference to the DLL. The referenced file with the .dll extension becomes part of the applications private assembly.

True
False

25. ____ contain no implementation details for any of their methods. Instead all their members are considered abstract.

base classes
virtual classes
abstract classes
interfaces

26. Classes can have a has a relationship. This is a concept called ____ or aggregation.

containment
polymorphism
inheritance
is a

27. Replacing a method defined at a higher level creates a(n) ____.

abstract method
virtual method
overloaded method
overridden method

28. Use the ____ keyword to mark a class so that it can be used only as the base class from which other classes can be derived.

virtual
interface
base
abstract

29. The ____ keyword can be used to spread the definition of your classes over multiple files.

class
partial
interface
base

30. Multiple inheritance is not possible in C#; ____ provides the closest work around to this because a class can implement multiple ____.

abstract classes
interfaces
virtual classes
components

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

What does stickiest refer to in regard to social media

Answered: 1 week ago

Question

Stages of a Relationship?

Answered: 1 week ago