BigDady313 .
Quiz por , criado more than 1 year ago

Component based programming .NET midterm quiz

36
0
0
BigDady313 .
Criado por BigDady313 . mais de 7 anos atrás
Fechar

.NET midterm question

Questão 1 de 25

1

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?

Selecione uma das seguintes:

  • 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

Explicação

Questão 2 de 25

1

What is the default file name extension of a .NET class library?

Selecione uma das seguintes:

  • .exe

  • .net

  • .lib

  • .cs

  • .dll

Explicação

Questão 3 de 25

1

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?

Selecione uma das seguintes:

  • 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

Explicação

Questão 4 de 25

1

Which of the following C# project templates in Visual Studio should be used to construct the PaymentCard service from Lab 1?

Selecione uma das seguintes:

  • Class Library

  • WPF Application

  • Console Application

  • Windows Service

Explicação

Questão 5 de 25

1

A reasonable conclusion that can be drawn after completing the Payment Card lab is that:

Selecione uma das seguintes:

  • 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

Explicação

Questão 6 de 25

1

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?

Selecione uma das seguintes:

  • 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

Explicação

Questão 7 de 25

1

Where does the CLR normally expect to find a private class library assembly that is required by a client assembly?

Selecione uma das seguintes:

  • 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

Explicação

Questão 8 de 25

1

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!)

Selecione uma das seguintes:

  • 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

Explicação

Questão 9 de 25

1

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?

Selecione uma das seguintes:

  • Lab3Library.dll.config

  • App.config

  • Lab3Library.config

  • Lab3Client.config

  • Lab3Client.exe.config

Explicação

Questão 10 de 25

1

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

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 11 de 25

1

Which is the correct Visual Studio command-line to install an assembly called library.dll into the Global Assembly Cache?

Selecione uma das seguintes:

  • gacutil -i library

  • gacutil -u library.dll

  • gacutil -i library.dll

  • gacutil -u library

  • gacutil library

Explicação

Questão 12 de 25

1

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?

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 13 de 25

1

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?

Selecione uma das seguintes:

  • codeBase

  • assemblyIdentity

  • assemblyBinding

  • bindingRedirect

  • probing

Explicação

Questão 14 de 25

1

Which kind of .NET assembly can be shared in the Global Assembly Cache (GAC)?

Selecione uma das seguintes:

  • 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)

Explicação

Questão 15 de 25

1

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?

Selecione uma das seguintes:

  • assemblyIdentity

  • codeBase

  • bindingRedirect

  • probing

  • assemblyBinding

Explicação

Questão 16 de 25

1

Which clients are impacted by a publisher's policy?

Selecione uma das seguintes:

  • 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

Explicação

Questão 17 de 25

1

What kind of file is a publisher's policy deployed as?

Selecione uma das seguintes:

  • A signed Windows executable assembly

  • A signed class library assembly

  • An xml-based text file

  • A private, unsigned class library assembly

Explicação

Questão 18 de 25

1

Which Visual Studio utility program is used to generate a publisher's policy from an XML format config file?

Selecione uma das seguintes:

  • al (al.exe)

  • ildasm (ildasm.ee)

  • sn (sn.exe)

  • gacutil (gacutil.exe)

Explicação

Questão 19 de 25

1

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?

Selecione uma das seguintes:

  • policy.2.0.PhysicsLib

  • policy.1.0.PhysicsLib

  • pubpol.PhysicsLib.1.0

  • policy.9abc54cf85be28fe.PhysicsLib

  • No particular file name

Explicação

Questão 20 de 25

1

Which of the following is not an aspect of assembly binding that can be controlled by a publisher's policy?

Selecione uma das seguintes:

  • 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

Explicação

Questão 21 de 25

1

What kind of thing is a Runtime Callable Wrapper (RCW)?

Selecione uma das seguintes:

  • 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

Explicação

Questão 22 de 25

1

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?

Selecione uma das seguintes:

  • 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

Explicação

Questão 23 de 25

1

What kind of file is a COM Callable Wrapper (CCW)?

Selecione uma das seguintes:

  • 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

Explicação

Questão 24 de 25

1

A Runtime Callable Wrapper (RCW) is used to:

Selecione uma das seguintes:

  • 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)

Explicação

Questão 25 de 25

1

A COM Callable Wrapper (CCW) is used to:

Selecione uma das seguintes:

  • 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

Explicação