MTA EXAM UCERTIFY CH 2 EXERCISES
QUESTIONS AND ANSWERS
In which namespace is the Console class found? - Correct Answers -System
namespace
In C# programs, namespaces are heavily used in two ways. What are those ways? -
Correct Answers -1) The .NET Framework classes use namespaces to organize its
various classes.
2) Declaring your own namespaces can assist controlling scope of class and method
names.
Which of the following is the correct way of using the System namespace? - Correct
Answers -using System;
You create a program that includes two classes, Book and Pages. Which of the
following concept will you use to implement an "is-a" relationship between the objects? -
Correct Answers -Inheritance
Which of the following statements is TRUE about inheritance? - Correct Answers -It
allows you to reuse code from the base class.
Which is a set of objects that share the same properties and behavior and is the
instinctive view of a "kind" of objects? - Correct Answers -Class
An object that is used to follow the definition of a class is known as what? - Correct
Answers -Instance of that class
Which Object Oriented (OO) principle is used to hide the behavior of an object from its
implementation? - Correct Answers -Encapsulation
Which of the following is the Object Oriented (OO) principle by which a class, i.e. child
class, is used to refine the behavior and properties of some other class, i.e. parent
class? - Correct Answers -Inheritance
Which Object Oriented (OO) principle is used to deal with objects without the need to
know what exact class they belong to? - Correct Answers -Polymorphism
, Dennis has just started an internship with uCertify Inc., as a developer. He develops an
application named App1 using .NET Framework 4.0. App1 contains a class named
Class1, which is stored in a namespace named BlueWell.Namespace1. Dennis wants to
create another class named Class2, and use Class1 from Class2. For this, he wants to
define an alias named Alias1, and use it in Class2.
Which of the following statements will Dennis use to define Alias1? - Correct Answers -
using Alias1 = BlueWell.Namespace1.Class1;
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's
existing inventory system as much as possible to save time because the older code has
been tested thoroughly. The classes are part of a Microsoft Visual Studio project called
InventorySystem; Ryan's Visual Studio project is called TrackingSystem. Ryan is having
problems because some of his classes, such as Package, Barcode, and Destination,
have names that already exist in the InventorySystem. However, both projects use the
default namespaces defined by Visual Studio .NET 2010 when the projects were
created.
Which of the following is most likely the fully qualified name of Ryan's new Package
class? - Correct Answers -InventorySystem.Package
Namespaces are used a lot in C# programming in two ways.
What are those two ways? - Correct Answers -1) The .NET Framework uses
namespaces to organize its many classes.
2) Declaring your own namespaces.
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's
existing inventory system as much as possible to save time because the older code has
been tested thoroughly. The classes are part of a Microsoft Visual Studio project called
InventorySystem; Ryan's Visual Studio project is called TrackingSystem. Ryan is having
problems because some of his classes, such as Package, Barcode, and Destination,
have names that already exist in the InventorySystem. However, both projects use the
default namespaces defined by Visual Studio .NET 2010 when the projects were
created.
Which of the following is the best way for Ryan to use classes from InventoryProject? -
Correct Answers -Add a reference to the other project's classes.
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's
QUESTIONS AND ANSWERS
In which namespace is the Console class found? - Correct Answers -System
namespace
In C# programs, namespaces are heavily used in two ways. What are those ways? -
Correct Answers -1) The .NET Framework classes use namespaces to organize its
various classes.
2) Declaring your own namespaces can assist controlling scope of class and method
names.
Which of the following is the correct way of using the System namespace? - Correct
Answers -using System;
You create a program that includes two classes, Book and Pages. Which of the
following concept will you use to implement an "is-a" relationship between the objects? -
Correct Answers -Inheritance
Which of the following statements is TRUE about inheritance? - Correct Answers -It
allows you to reuse code from the base class.
Which is a set of objects that share the same properties and behavior and is the
instinctive view of a "kind" of objects? - Correct Answers -Class
An object that is used to follow the definition of a class is known as what? - Correct
Answers -Instance of that class
Which Object Oriented (OO) principle is used to hide the behavior of an object from its
implementation? - Correct Answers -Encapsulation
Which of the following is the Object Oriented (OO) principle by which a class, i.e. child
class, is used to refine the behavior and properties of some other class, i.e. parent
class? - Correct Answers -Inheritance
Which Object Oriented (OO) principle is used to deal with objects without the need to
know what exact class they belong to? - Correct Answers -Polymorphism
, Dennis has just started an internship with uCertify Inc., as a developer. He develops an
application named App1 using .NET Framework 4.0. App1 contains a class named
Class1, which is stored in a namespace named BlueWell.Namespace1. Dennis wants to
create another class named Class2, and use Class1 from Class2. For this, he wants to
define an alias named Alias1, and use it in Class2.
Which of the following statements will Dennis use to define Alias1? - Correct Answers -
using Alias1 = BlueWell.Namespace1.Class1;
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's
existing inventory system as much as possible to save time because the older code has
been tested thoroughly. The classes are part of a Microsoft Visual Studio project called
InventorySystem; Ryan's Visual Studio project is called TrackingSystem. Ryan is having
problems because some of his classes, such as Package, Barcode, and Destination,
have names that already exist in the InventorySystem. However, both projects use the
default namespaces defined by Visual Studio .NET 2010 when the projects were
created.
Which of the following is most likely the fully qualified name of Ryan's new Package
class? - Correct Answers -InventorySystem.Package
Namespaces are used a lot in C# programming in two ways.
What are those two ways? - Correct Answers -1) The .NET Framework uses
namespaces to organize its many classes.
2) Declaring your own namespaces.
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's
existing inventory system as much as possible to save time because the older code has
been tested thoroughly. The classes are part of a Microsoft Visual Studio project called
InventorySystem; Ryan's Visual Studio project is called TrackingSystem. Ryan is having
problems because some of his classes, such as Package, Barcode, and Destination,
have names that already exist in the InventorySystem. However, both projects use the
default namespaces defined by Visual Studio .NET 2010 when the projects were
created.
Which of the following is the best way for Ryan to use classes from InventoryProject? -
Correct Answers -Add a reference to the other project's classes.
Ryan has just started an internship with uCertify Inc., as a developer. He is updating the
company's inventory system to use barcode and GPS technologies for improving the
package tracking. Ryan's manager asked him to use classes from the company's