98-361 : Software Development Fundamentals : Part 01

  1. You are creating an application for computers that run Windows XP or later. This application must run after the computer starts. The user must not be aware that the application is running.

    The application performs tasks that require permissions that the logged-in user does not have.

    Which type of application allows this behavior?

    • Windows Service application
    • Windows Forms application
    • DOS batch file
    • Terminate-and-stay-resident (TSR) program
    • Windows Store app
  2. An application presents the user with a graphical interface. The interface includes buttons that the user clicks to perform tasks. Each time the user clicks a button, a method is called that corresponds to that button.

    Which term is used to describe this programming model?

    • Functional
    • Service oriented
    • Structured
    • Event driven
  3. How does a console-based application differ from a Windows Forms application?

    • Console-based applications require the XNA Framework to run.
    • Windows Forms applications do not provide a method for user input.
    • Windows Forms applications can access network resources.
    • Console-based applications do not display a graphical interface.
  4. Which type of Windows application presents a parent window that contains child windows?

    • Application programming interface (API)
    • Single-document interface (SDI)
    • Multiple-document interface (MDI)
    • Command-line interface (CLI)
    Explanation:

    A multiple document interface (MDI) is a graphical user interface in which multiple windows reside under a single parent window. Such systems often allow child windows to embed other windows inside them as well, creating complex nested hierarchies. This contrasts with single document interfaces (SDI) where all windows are independent of each other.

  5. The purpose of a constructor in a class is to:

    • Initialize an object of that class.
    • Release the resources that the class holds.
    • Create a value type.
    • Inherit from the base class.
  6. A class named Manager is derived from a parent class named Employee. The Manager class includes characteristics that are unique to managers.

    Which term is used to describe this object-oriented concept?

    • Encapsulation
    • Data modeling
    • Inheritance
    • Data hiding
    Explanation:

    Classes (but not structs) support the concept of inheritance. A class that derives from another class (the base class) automatically contains all the public, protected, and internal members of the base class except its constructors and destructors.

    Incorrect:
    not A: Encapsulation is sometimes referred to as the first pillar or principle of object-oriented programming. According to the principle of encapsulation, a class or struct can specify how accessible each of its members is to code outside of the class or struct. Methods and variables that are not intended to be used from outside of the class or assembly can be hidden to limit the potential for coding errors or malicious exploits.

  7. Which term is used to describe a class that inherits functionality from an existing class?

    • Base class
    • Inherited class
    • Derived class
    • Superclass
    Explanation:

    Classes (but not structs) support the concept of inheritance. A class that derives from another class (the base class) automatically contains all the public, protected, and internal members of the base class except its constructors and destructors.

  8. Two classes named Circle and Square inherit from the Shape class. Circle and Square both inherit Area from the Shape class, but each computes Area differently.

    Which term is used to describe this object-oriented concept?

    • polymorphism
    • encapsulation
    • superclassing
    • overloading
    Explanation:

    You can use polymorphism to in two basic steps:
    Create a class hierarchy in which each specific shape class derives from a common base class.
    Use a virtual method to invoke the appropriate method on any derived class through a single call to the base class method.

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

    98-361 Part 01 Q09 001
    98-361 Part 01 Q09 001

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

    • Null
    • 0
    • 3
    • 7
  10. You need to allow a consumer of a class to modify a private data member.

    What should you do?

    • Assign a value directly to the data member.
    • Provide a private function that assigns a value to the data member.
    • Provide a public function that assigns a value to the data member.
    • Create global variables in the class.
    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; }
    }
    }
  11. 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?

    • Internal
    • Protected
    • Private
    • Public
  12. You are creating an application that presents users with a graphical interface in which they can enter data. The application must run on computers that do not have network connectivity.

    Which type of application should you choose?

    • Console-based
    • Windows Forms
    • Windows Service
    • ClickOnce
    Explanation:

    Use Windows Forms when a GUI is needed.

  13. 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?

    • Windows Forms
    • Windows Service
    • ASP. NET
    • Console-based
  14. The elements of an array must be accessed by:

    • Calling the item that was most recently inserted into the array.
    • Calling the last item in the memory array.
    • Using an integer index.
    • Using a first-in, last-out (FILO) process.
  15. Simulating the final design of an application in order to ensure that the development is progressing as expected is referred to as:

    • Analyzing requirements
    • Prototyping
    • Software testing
    • Flowcharting
  16. You have a stack that contains integer values. The values are pushed onto the stack in the following order: 2,4,6,8.

    The following sequence of operations is executed:

    Pop
    Push 3
    Pop
    Push 4
    Push 6
    Push 7
    Pop
    Pop
    Pop

    What is the value of the top element after these operations are executed?

    • 2
    • 3
    • 6
    • 7
  17. What are two methods that can be used to evaluate the condition of a loop at the start of each iteration? (Each correct answer presents a complete solution. Choose two. )

    • If
    • Do. . . While
    • For
    • While
  18. You need to evaluate the following expression:

    (A>B) AND (C<D)

    What is the value of this expression if A=3, B=4, C=4, and D=5?

    • 0
    • 4
    • 5
    • False
    • Null
    • True
  19. You are creating a variable for an application.

    – You need to store data that has the following characteristics in this variable:
    – Consists of numbers and characters
    – Includes numbers that have decimal points

    Which data type should you use?

    • String
    • Float
    • Char
    • Decimal
    Explanation:

    Need a string to store characters.

  20. You execute the following code.

    98-361 Part 01 Q20 002
    98-361 Part 01 Q20 002

    What will the variable iResult be?

    • 0
    • 1
    • 2
    • 3
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments