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?
- A . Windows Service application
- B . Windows Forms application
- C . DOS batch file
- D . Terminate-and-stay-resident (TSR) program
- E . Windows Store app
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?
- A . Functional
- B . Service oriented
- C . Structured
- D . Event driven
How does a console-based application differ from a Windows Forms application?
- A . Console-based applications require the XNA Framework to run.
- B . Windows Forms applications do not provide a method for user input.
- C . Windows Forms applications can access network resources.
- D . Console-based applications do not display a graphical interface.
Which type of Windows application presents a parent window that contains child windows?
- A . Application programming interface (API)
- B . Single-document interface (SDI)
- C . Multiple-document interface (MDI)
- D . Command-line interface (CLI)
C
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.
The purpose of a constructor in a class is to:
- A . Initialize an object of that class.
- B . Release the resources that the class holds.
- C . Create a value type.
- D . Inherit from the base class.
A
Explanation:
Each value type has an implicit default constructor that initializes the default value of that type.
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?
- A . Encapsulation
- B . Data modeling
- C . Inheritance
- D . Data hiding
C
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.
Which term is used to describe a class that inherits functionality from an existing class?
- A . Base class
- B . Inherited class
- C . Derived class
- D . Superclass
C
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.
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?
- A . polymorphism
- B . encapsulation
- C . superclassing
- D . overloading
A
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.
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
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.
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; }
}
}
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
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?
- A . Console-based
- B . Windows Forms
- C . Windows Service
- D . ClickOnce
B
Explanation:
Use Windows Forms when a GUI is needed.
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
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.
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
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?
- A . 2
- B . 3
- C . 6
- D . 7
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. )
- A . If
- B . Do. . . While
- C . For
- D . While
CD
Explanation:
For and While constructs check at the start of each iteration.
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?
- A . 0
- B . 4
- C . 5
- D . False
- E . Null
- F . True
D
Explanation:
A>B is false.
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?
- A . String
- B . Float
- C . Char
- D . Decimal
A
Explanation:
Need a string to store characters.
You execute the following code.
What will the variable iResult be?
- A . 0
- B . 1
- C . 2
- D . 3
The purpose of the Catch section in an exception handler is to:
- A . Break out of the error handler.
- B . Conclude the execution of the application.
- C . Execute code only when an exception is thrown.
- D . Execute code regardless of whether an exception is thrown.
You execute the following code.
How many times will the word Hello be printed?
- A . 5
- B . 6
- C . 10
- D . 12
In the life cycle of an ASP. NET Web page, which phase follows the SaveStateComplete phase?
- A . PostBack
- B . Postlnit
- C . Load
- D . Render
D
Explanation:
The SaveStateComplete event is raised after the view state and control state of the page and controls on the page are saved to the persistence medium. This is the last event raised before the page is rendered to the requesting browser.
You are creating an ASP. NET Web application.
Which line of code should you use to require a control to process on the computer that hosts the application?
- A . defaultRedirect="ServerPage. htm"
- B . redirect="HostPage. htm"
- C . AutoEvencWireup="true"
- D . runat="server"
In this XHTML code sample, what will cause an error?
- A . All tags are not in uppercase.
- B . The body tag is missing a background attribute.
- C . The line break tag is incorrectly formatted.
- D . The HTML tags do not read XHTML.
C
Explanation:
In XHTML, the <br> tag must be properly closed, like this: <br />.
You create an application that uses Simple Object Access Protocol (SOAP).
Which technology provides information about the application’s functionality to other applications?
- A . Web Service Description Language (WSDL)
- B . Extensible Application Markup Language (XAML)
- C . Common Intermediate Language (CIL)
- D . Universal Description, Discovery, and Integration (UDDI)
A
Explanation:
WSDL is often used in combination with SOAP and an XML Schema to provide Web services over the Internet. A client program connecting to a Web service can read the WSDL file to determine what operations are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to actually call one of the operations listed in the WSDL file using for example XML over HTTP.
Which language allows you to dynamically create content on the client side?
- A . Extensible Markup Language (XML)
- B . Cascading Style Sheets (CSS)
- C . Hypertext Markup Language (HTML)
- D . JavaScript (JS)
D
Explanation:
JavaScript (JS) is a dynamic computer programming language. It is most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.
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.
B
Explanation:
Start by adding a Service Reference to the project. Right-click the ConsoleApplication1 project and choose “Add Service Reference”:
What are two possible options for representing a Web application within Internet Information Services (IIS)? (Each correct answer presents a complete solution. Choose two. )
- A . Web site
- B . Web directory
- C . Virtual directory
- D . Application server
- E . Application directory
AC
Explanation:
Create a Web Application An application is a grouping of content at the root level of a Web site or a grouping of content in a separate folder under the Web site’s root directory. When you add an application in IIS 7, you designate a directory as the application root, or starting point, for the application and then specify properties specific to that particular application, such as the application pool that the application will run in.
You can make an Existing Virtual Directory a Web Application.
Which language uses Data Definition Language (DDL) and Data Manipulation Language (DML)?
- A . SQL
- B . C++
- C . Pascal
- D . Java
A
Explanation:
SQL uses DDL and DML.
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.
B
Explanation:
Faster to access an index table.
Which language was designed for the primary purpose of querying data, modifying data, and managing databases in a Relational Database Management System?
- A . Java
- B . SQL
- C . C++
- D . Visual Basic
B
Explanation:
SQL is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS).
You need to ensure the data integrity of a database by resolving insertion, update, and deletion anomalies.
Which term is used to describe this process in relational database design?
- A . Isolation
- B . Normalization
- C . Integration
- D . Resolution
B
Explanation:
Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database using the defined relationships.
In your student directory database, the Students table contains the following fields:
firstName
lastName
emailAddress
telephoneNumtoer
You need to retrieve the data from the firstName, lastName, and emailAddress fields for all students listed in the directory. The results must be in alphabetical order according to lastName and then firstName.
Which statement should you use?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
A
Explanation:
to sort use: ORDER BY LastName, FirstName
A data warehouse database is designed to:
- A . Enable business decisions by collecting, consolidating, and organizing data.
- B . Support a large number of concurrent users.
- C . Support real-time business operations.
- D . Require validation of incoming data during real-time business transactions.
You are creating an application that presents the user with a Windows Form. You need to configure the application to display a message box to confirm that the user wants to close the form.
Which event should you handle?
- A . Deactivate
- B . Leave
- C . FormClosed
- D . FormClosing
D
Explanation:
The Closing event occurs as the form is being closed.
Which type of application has the following characteristics when it is installed?
– Runs continuously in the background by default when the startup type is set to automatic
– Presents no user interface
- A . Windows Service
- B . Windows Forms
- C . Console-based
- D . Batch file
A
Explanation:
A Windows service runs in the background and has no interface.
You are creating an application that accepts input and displays a response to the user. You cannot create a graphical interface for this application.
Which type of application should you create?
- A . Windows Forms
- B . Windows Service
- C . Web-based
- D . Console-based
You need to create an application that processes data on a last-in, first-out (LIFO) basis.
Which data structure should you use?
- A . Queue
- B . Tree
- C . Stack
- D . Array
C
Explanation:
A stack implements LIFO.
You are creating an application for a help desk center. Calls must be handled in the same order in which they were received.
Which data structure should you use?
- A . Binary tree
- B . Stack
- C . Hashtable
- D . Queue
D
Explanation:
A queue keeps the order of the items.
In the application life cycle, the revision of an application after it has been deployed is referred to as:
- A . Unit testing
- B . Integration
- C . Maintenance
- D . Monitoring
In which order do the typical phases of the Software Development Life Cycle occur?
- A . Development, design, requirements gathering, and testing
- B . Design, requirements gathering, development, and testing
- C . Design, development, requirements gathering, and testing
- D . Requirements gathering, design, development, and testing
You execute the following code.
What will the variable iResult be?
- A . 1
- B . 2
- C . 3
- D . 4
You execute the following code.
How many times will the word Hello be printed?
- A . 49
- B . 50
- C . 51
- D . 100
B
Explanation:
The % operator computes the remainder after dividing its first operand by its second. All numeric types have predefined remainder operators. In this case the reminder will be nonzero 50 times (for i with values 1, 3, 5,..,99).
You are creating a routine that will perform calculations by using a repetition structure. You need to ensure that the entire loop executes at least once.
Which looping structure should you use?
- A . For
- B . While
- C . Do..While
- D . For..Each
C
Explanation:
In a Do..While loop the test is at the end of the structure, so it will be executed at least once.
The purpose of the Finally section in an exception handler is to:
- A . Execute code regardless of whether an exception is thrown.
- B . Conclude the execution of the application.
- C . Execute code only when an exception is thrown.
- D . Break out of the error handler.
A
Explanation:
By using a finally block, you can clean up any resources that are allocated in a try block, and you can run code even if an exception occurs in the try block. Typically, the statements of a finally block run when control leaves a try statement. The transfer of control can occur as a result of normal execution, of execution of a break, continue, goto, or return statement, or of propagation of an exception out of the try statement.
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
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
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.
C
Explanation:
The SQL will only be inside the stored procedure.
You are reviewing a design for a database. A portion of this design is shown in the exhibits.
Note that you may choose either the Crow’s Foot Notation or Chen Notation version of the design. (To view the Crow’s Foot Notation, click the Exhibit A button. To view the Chen Notation, click the Exhibit B button.)
Which term is used to describe the Customer component?
- A . Field
- B . Attribute
- C . Property
- D . Entity
D
Explanation:
Customer is a table (entity).
You have a server that limits the number of data connections.
What should you use to optimize connectivity when the number of users exceeds the number of available connections?
- A . Connection timeouts
- B . Named pipes
- C . Normalization
- D . Connection pooling
D
Explanation:
In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required.
Your application must pull data from a database that resides on a separate server.
Which action must you perform before your application can retrieve the data?
- A . Configure the network routers to allow database connections.
- B . Install the database on each client computer.
- C . Create a routine that bypasses firewalls by using Windows Management Instrumentation (WMI).
- D . Establish a connection to the database by using the appropriate data provider.
You have a class named Truck that inherits from a base class named Vehicle. The Vehicle class includes a protected method named brake ().
How should you call the Truck class implementation of the brake () method?
- A . Vehicle. brake ();
- B . This. brake ();
- C . MyBase. brake();
- D . Truck. brake ();
C
Explanation:
The MyBase keyword behaves like an object variable referring to the base class of the current instance of a class.MyBase is commonly used to access base class members that are overridden or shadowed in a derived class.
Which of the following must exist to inherit attributes from a particular class?
- A . Public properties
- B . A has-a relationship
- C . An is-a relationship
- D . Static members
A
Explanation:
There must be some public properties that can be inherited.
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
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.
Class C and Class D inherit from Class B. Class B inherits from Class A.
The classes have the methods shown in the following table.
All methods have a protected scope.
Which methods does Class C have access to?
- A . only m3, m4
- B . only m2, m3
- C . only ml, m3
- D . m1, m3, m3
- E . m2, m3, m4
- F . m1, m2, m3
You need to create a property in a class. Consumers of the class must be able to read the values of the property. Consumers of the class must be prevented from writing values to the property.
Which property procedure should you include?
- A . Return
- B . Get
- C . Set
- D . Let
How many parameters can a default constructor have?
- A . 0
- B . 1
- C . 2
- D . 3 or more
A
Explanation:
If a class contains no instance constructor declarations, a default instance constructor is automatically provided. That default constructor simply invokes the parameterless constructor of the direct base class.
Which function does Simple Object Access Protocol (SOAP) provide when using Web services?
- A . directory of registered Web services
- B . communications protocol
- C . security model
- D . model for describing Web services
B
Explanation:
SOAP, originally defined as Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of web services in computer networks. It relies on XML Information Set for its message format, and usually relies on other application layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.
Which term is used to describe small units of text that are stored on a client computer and retrieved to maintain state?
- A . trace
- B . cookie
- C . server transfer
- D . cross-page post
B
Explanation:
HTTP is a stateless protocol. This means that user data is not persisted from one Web page to the next in a Web site. One way to maintain state is through the use of cookies. Cookies store a set of user specific information, such as a reference identifier for a database record that holds customer information.
You are creating a Web application. The application will be consumed by client computers that run a variety of Web browsers.
Which term is used to describe the process of making the application available for client computers to access?
- A . Casting
- B . Deploying
- C . Hosting
- D . Virtualization
C
Explanation:
You host web applications.
You are writing a Web application that processes room reservation requests. You need to verify that the room that a guest has selected is not already reserved by another guest.
Which type of programming should you use to determine whether the room is still available when the request is made?
- A . client-side
- B . server-side
- C . multithreaded
- D . batch processing
B
Explanation:
For room availability we need to check a database located on a server.
You need to group all the style settings into a separate file that can be applied to all the pages in a Web application.
What should you do?
- A . Use a Cascading Style Sheet (CSS).
- B . Use inline styles.
- C . Use an Extensible Markup Language (XML) schema.
- D . Use a WebKit.
A
Explanation:
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. CSS is designed primarily to enable the separation of document content from document presentation, including elements such as the layout, colors, and fonts.
Where must Internet Information Services (IIS) be installed in order to run a deployed ASP. NET application?
- A . on the computer that you plan to deploy from
- B . on the computer that hosts the application
- C . on the Application Layer Gateway Service
- D . on the client computers
B
Explanation:
IIS is run on the web server. The web server is hosting the application.
What is displayed when you attempt to access a Web service by using a Web browser?
- A . a listing of methods that are available in the Web service
- B . a directory listing of the Web service’s application structure
- C . an error page explaining that you have accessed the Web service incorrectly
- D . a visual depiction of your preliminary connection to the Web service
A
Explanation:
The server, in response to this request, displays the Web service’s HTML description page. The Web service’s HTML description page shows you all the Web service methods supported by a particular Web service. Link to the desired Web service method and enter the necessary parameters to test the method and see the XML response.
You are writing a Web application that processes room reservation requests. You need to verify that the room that a guest has selected is not already reserved by another guest.
Which type of programming should you use to determine whether the room is still available when the request is made?
- A . functional
- B . dynamic
- C . in-browser
- D . server-side
HOTSPOT You are developing a web application.
You need to create the following graphic by using Cascading Style Sheets (CSS):
Use the drop-down menus to select the answer choice that completes each statement. Each correct selection is worth one point.