Software Development Fundamentals v10.0 (98-361)

Page:    1 / 19   
Total 276 questions

You are reviewing the following code that saves uploaded images.


For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.



Answer :

Explanation:


C:\Users\Kamran\Desktop\image.jpg

Which type of function can a derived class override?

  • A. a non-virtual public member function
  • B. a private virtual function
  • C. a protected virtual member function
  • D. a static function


Answer : C

Explanation: You can override virtual functions defined in a base class from the Visual
Studio.
The override modifier is required to extend or modify the abstract or virtual implementation of an inherited method, property, indexer, or event.

The Dog class and the Cat class inherit from the Animal class. The Animal class includes a breathe() method and a speak() method. If the speak() method is called from an object of type Dog, the result is a bark. If the speak() method is called from an object of type Cat, the result is a meow.
Which term is used to describe this object-oriented concept?

  • A. multiple inheritance
  • B. polymorphism
  • C. data hiding
  • D. encapsulation


Answer : A

Explanation: Polymorphism is often referred to as the third pillar of object-oriented programming, after encapsulation and inheritance. Polymorphism is a Greek word that means "many-shaped" and it has two distinct aspects:
* At run time, objects of a derived class may be treated as objects of a base class in places such as method parameters and collections or arrays. When this occurs, the object's declared type is no longer identical to its run-time type.
* Base classes may define and implement virtual methods, and derived classes can override them, which means they provide their own definition and implementation. At run- time, when client code calls the method, the CLR looks up the run-time type of the object, and invokes that override of the virtual method. Thus in your source code you can call a method on a base class, and cause a derived class's version of the method to be executed.

You have a class named Glass that inherits from a base class named Window. The
Window class includes a protected method named break().
How should you call the Glass class implementation of the break() method?

  • A. Window.break();
  • B. Glass.break();
  • C. this.break();
  • D. base.break();


Answer : A

Simulating the final design of an application in order to ensure that the development is progressing as expected is referred to as:

  • A. Analyzing requirements
  • B. Prototyping
  • C. Software testing
  • D. Flowcharting


Answer : C

You are creating an application that presents users with a graphical interface. Users will run this application from remote computers. Some of the remote computers do not have the
. NET Framework installed. Users do not have permissions to install software.
Which type of application should you choose?

  • A. Windows Forms
  • B. Windows Service
  • C. ASP. NET
  • D. Console-based


Answer : C

You are creating the necessary variables for an application. The data you will store in these variables has the following characteristics:
-> Consists of numbers
-> Includes numbers that have decimal points
-> Requires more than seven digits of precision
You need to use a data type that will minimize the amount of memory that is used.
Which data type should you use?

  • A. decimal
  • B. double
  • C. byte
  • D. float


Answer : B

Explanation: The double keyword signifies a simple type that stores 64-bit floating-point values.

Precision: 15-16 digits -
Incorrect:
Not D: The float keyword signifies a simple type that stores 32-bit floating-point values.

Precision: 7 digits -

The elements of an array must be accessed by:

  • A. Calling the item that was most recently inserted into the array.
  • B. Calling the last item in the memory array.
  • C. Using an integer index.
  • D. Using a first-in, last-out (FILO) process.


Answer : C

You are designing a class for an application. You need to restrict the availability of the member variable accessCount to the base class and to any classes that are derived from the base class.
Which access modifier should you use?

  • A. Internal
  • B. Protected
  • C. Private
  • D. Public


Answer : C

You need to allow a consumer of a class to modify a private data member.
What should you do?

  • A. Assign a value directly to the data member.
  • B. Provide a private function that assigns a value to the data member.
  • C. Provide a public function that assigns a value to the data member.
  • D. Create global variables in the class.


Answer : C

Explanation: In this example (see below), the Employee class contains two private data members, name and salary. As private members, they cannot be accessed except by member methods. Public methods named GetName and Salary are added to allow controlled access to the private members. The name member is accessed by way of a public method, and the salary member is accessed by way of a public read-only property.
Note: The private keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared
Example:
class Employee2
{
private string name = "FirstName, LastName";
private double salary = 100.0;
public string GetName()
{
return name;
}
public double Salary
{
get { return salary; }
}
}

How should you configure an application to consume a Web service?

  • A. Add the Web service to the development computer.
  • B. Add a reference to the Web service in the application.
  • C. Add a reference to the application in the Web service.
  • D. Add the Web service code to the application.


Answer : B

Explanation: Start by adding a Service Reference to the project. Right-click the
ConsoleApplication1 project and choose Add Service Reference:

This question requires that you evaluate the underlined text to determine if it is correct.
Arguments are passed to console applications as a Hashtable object.
Select the correct answer if the underlined text does not make the statement correct. Select
"No change is needed'' if the underlined text makes the statement correct.

  • A. No change is needed
  • B. String Array
  • C. StoredProcedureCollection
  • D. Dictionary


Answer : B

Explanation: Arguments are passed to console applications as a String Array object.

Your database administrators will not allow you to write SQL code in your application.
How should you retrieve data in your application?

  • A. Script a SELECT statement to a file.
  • B. Query a database view.
  • C. Call a stored procedure.
  • D. Reference an index in the database.


Answer : C

Explanation: The SQL will only be inside the stored procedure.

You create an object of type ANumber. The class is defined as follows.


What is the value of _number after the code is executed?

  • A. Null
  • B. 0
  • C. 3
  • D. 7


Answer : C

A table named Student has columns named ID, Name, and Age. An index has been created on the ID column. What advantage does this index provide?

  • A. It reorders the records alphabetically.
  • B. It speeds up query execution.
  • C. It minimizes storage requirements.
  • D. It reorders the records numerically.


Answer : B

Explanation: Faster to access an index table.

Page:    1 / 19   
Total 276 questions