.NET midterm question

Description

Component based programming .NET midterm quiz
BigDady313 .
Quiz by BigDady313 ., updated more than 1 year ago
BigDady313 .
Created by BigDady313 . almost 8 years ago
45
0

Resource summary

Question 1

Question
Assume there is a private .NET class library and client executable. Which is the correct way to test the client to see if it will interoperate with the class library?
Answer
  • Use the .NET assembly linker tool to generate one combined assembly based on both the client and the class library, then execute this combined assembly
  • Put the client and the library in the same folder and execute the class library file
  • Put the client and the library in the same folder and execute the client file
  • Combined all the source code for the client and class library into one Visual Studio project then build and execute the project

Question 2

Question
What is the default file name extension of a .NET class library?
Answer
  • .exe
  • .net
  • .lib
  • .cs
  • .dll

Question 3

Question
When developing a .NET application in Visual Studio, which one of the following is a correct way to establish a client-service relationship between a client project and a class library project?
Answer
  • Add a reference to the client assembly within the class library project
  • Add a reference to the class library assembly within the client project
  • Add using namespace statement for the class library's namespace within the client project
  • Add a using namespace statement for the client's namespace within the class library project

Question 4

Question
Which of the following C# project templates in Visual Studio should be used to construct the PaymentCard service from Lab 1?
Answer
  • Class Library
  • WPF Application
  • Console Application
  • Windows Service

Question 5

Question
A reasonable conclusion that can be drawn after completing the Payment Card lab is that:
Answer
  • A software component interface, like ICard, must remain immutable or unchanging to allow different implementations to be supported
  • A component software architecture should be the default or standard approach when developing any software system
  • A class library project in Visual Studio is a suitable tool for creating a client application such as the PaymentCard client
  • An application's performance can be improved by separating it into multiple software components like the PaymentCard client and library

Question 6

Question
The CLR can be advised to bind to a private class library in non-default location using the probing element in an Application Configuration File. Which of the following is a key limitation of this technique?
Answer
  • The class library must be located outside the folder in which the client assembly is located.
  • Both the client and class library assembly must be developed using the same .NET language (e.g. both written in C#)
  • The class library must be located in a subfolder within the folder in which the client assembly is located
  • The class library's version number must match the version number expected by the client

Question 7

Question
Where does the CLR normally expect to find a private class library assembly that is required by a client assembly?
Answer
  • In the Global Assembly Cache
  • In the same folder as the client assembly
  • In a subfolder called libs located within the client assembly's folder
  • In the Windows\System32 folder

Question 8

Question
If you have a class library project in Visual Studio, what effect will be created by assigning it an assembly version number of 10* (Yes, the last number is blank!)
Answer
  • This will assign a version number that does not include a revision number or a build number
  • This will cause a builder error
  • Visual Studio will automatically assign a build number to the assembly
  • Visual Studio will automatically assign both a revision number and a build number to the assembly

Question 9

Question
If a client assembly called Lab3Client.exe uses a class library assembly called Lab3Library.dll, what is the correct name of the application configuration file if the application is deployed with one?
Answer
  • Lab3Library.dll.config
  • App.config
  • Lab3Library.config
  • Lab3Client.config
  • Lab3Client.exe.config

Question 10

Question
True of False: If a .NET client is designed to use a private (unsigned) class library having an assembly version of 1.0.0.0 but instead an otherwise identical class library is provided with a different version number, the application will still work
Answer
  • True
  • False

Question 11

Question
Which is the correct Visual Studio command-line to install an assembly called library.dll into the Global Assembly Cache?
Answer
  • gacutil -i library
  • gacutil -u library.dll
  • gacutil -i library.dll
  • gacutil -u library
  • gacutil library

Question 12

Question
A .NET client is designed to use a signed class library having an assembly version of 1.0.0.0. However an otherwise identical class library with the assembly version number 1.0.1.0 is available instead. This application will still work without configuring it via an application configuration file: True or False?
Answer
  • True
  • False

Question 13

Question
A developer wants to deploy a signed class library assembly that is a newer version of the one the client already references. Which element of the client's application configuration file can be used to configure this?
Answer
  • codeBase
  • assemblyIdentity
  • assemblyBinding
  • bindingRedirect
  • probing

Question 14

Question
Which kind of .NET assembly can be shared in the Global Assembly Cache (GAC)?
Answer
  • Any assembly
  • Any signed Windows application assembly (.exe extension)
  • Any signed class library assembly (.dll extension)
  • Any class library assembly (.dll extension)
  • Any Windows application assembly (.exe extension)

Question 15

Question
A developer wants to deploy a signed class library assembly's in a "non-default" location (i.e. not a location where the CLR would normally look for it). Which element of the client's application configuration file can be used to configure this?
Answer
  • assemblyIdentity
  • codeBase
  • bindingRedirect
  • probing
  • assemblyBinding

Question 16

Question
Which clients are impacted by a publisher's policy?
Answer
  • Any client installed in the Global Assembly Cache (GAC)
  • Any client of the corresponding class library that has an application configuration file that "points to" the publisher's policy
  • All clients of the corresponding class library on the computer
  • Always just one client that is in the same folder as the policy

Question 17

Question
What kind of file is a publisher's policy deployed as?
Answer
  • A signed Windows executable assembly
  • A signed class library assembly
  • An xml-based text file
  • A private, unsigned class library assembly

Question 18

Question
Which Visual Studio utility program is used to generate a publisher's policy from an XML format config file?
Answer
  • al (al.exe)
  • ildasm (ildasm.ee)
  • sn (sn.exe)
  • gacutil (gacutil.exe)

Question 19

Question
Given the following assembly information: File Name = PhysicalLib.dll Public Key Token = 9abc54cf85be28fe Assembly Version = 2.0.1.5 What would be the correct name of a publisher's policy (file extension not included) for this assembly?
Answer
  • policy.2.0.PhysicsLib
  • policy.1.0.PhysicsLib
  • pubpol.PhysicsLib.1.0
  • policy.9abc54cf85be28fe.PhysicsLib
  • No particular file name

Question 20

Question
Which of the following is not an aspect of assembly binding that can be controlled by a publisher's policy?
Answer
  • Binding to an assembly with a different version number than the clients requests
  • Binding to an assembly with a different "friendly" name
  • Binding to the assembly in a non-default location

Question 21

Question
What kind of thing is a Runtime Callable Wrapper (RCW)?
Answer
  • A .NET assembly
  • A strong name key file with either the .snk or the .pfx extension
  • A COM Type ibrary with the .tlb file extension
  • An application configuration file with the .config file extension

Question 22

Question
When a COM library such as WordPlay.dll is deployed on a computer, what administrative task must be performed before the library will work with any client (managed or unmanaged) on that computer?
Answer
  • The library must be registered with the Windows System Registry
  • A COM Callable Wrapper (CCW) must be provided for the library
  • The library must be installed in the Global Assembly Cache (GAC)
  • A Runtime Callable Wrapper (RCW) must be provided for the library

Question 23

Question
What kind of file is a COM Callable Wrapper (CCW)?
Answer
  • An application configuration file with the .config file extension
  • A .NET assembly with the .exe file extension
  • A .NET assembly with the .dll file extension
  • A COM type library with the .tlb file extension

Question 24

Question
A Runtime Callable Wrapper (RCW) is used to:
Answer
  • enable a managed (.NET) component to work with an unmanaged client
  • enable an managed component to be assigned a strong name
  • enable a unmanaged (COM) component to work with an managed client
  • enable a managed (.NET) component to be shared in the Global Assembly Cache (GAC)

Question 25

Question
A COM Callable Wrapper (CCW) is used to:
Answer
  • enable a unmanaged (COM) component to work with an managed client
  • enable an unmanaged (COM) component to be assigned a strong name
  • enable an unmanaged (COM) component to be shared in the Global Assembly Cache (GAC)
  • enable a managed (.NET) component to work with an unmanaged client
Show full summary Hide full summary

Similar

HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Historical Development of Computer Languages
Shannon Anderson-Rush
Useful String Methods
Shannon Anderson-Rush
Flvs foundations of programming dba 2
mariaha vassar
Introduction to Programming: C#
Isaiah Parker
Python Quiz
karljmurphy
computer systems and programming quiz
Molly Batch
Think Python
tsilvo2001
C Programming
Miki Rana
Generations of Programming Languages
Balikkoftesi
Mapa Conceptual - Arreglos
ciroivan94