Windows App Development Quiz
Windows App Development Quiz
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. super classing
D. overloading
Answer: Polymorphism
Explanation: Polymorphism is the ability of derived classes to
share common functionality with base classes but still define their
own unique behavior.
11. 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. Provide a public function that assigns a value to the data
member.
12. 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 be used?
A. Internal
B. Protected
C. Private
D. Public
Answer: Protected
Explanation: Private: Access is restricted to the containing class.
Protected: Access is restricted to the containing class and to any class that is
derived directly or indirectly from
the containing class.
13. 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.
A.Console-based
B.Windows Form
C.Windows Service
D.ClickOnce
14. 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
17. You have a stack that contains integer values. The values are pushed onto the stack
in the
following order: 2,4,6,8.
The ff. sequence executed:
Pop
Push 3
What is the value of the top element after
Pop
Push 4
these operations are executed?
Push 6
A. 2
Push 7
B. 3
Pop
C. 6
Pop
D. 7
Pop
Answer: 6
Explanation: stack implement Last-In First - Out
Answer: string
Explanation: can holds any character
Answer:6
24. In the life cycle of an ASP. NET Web page, which phase
follows the SaveStateComplete
phase?
A. PostBack
B. Postlnit
C. Load
D. Render
Answer: Render
25. 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
Answer: Runat=server
27. You create an application that uses Simple Object Access Protocol
(SOAP). Which technology provides information about the applications
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)
32. 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. It speeds up query execution.
Explanation: Indexes allow the database application to find data fast;
without reading the whole table.
35. In your student directory database, the Students table contains the following fields:
firstName, lastName, emailAddress telephoneNumber
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?
Answer:
Select firstName, lastName,
emailAddress
From Students
Order by lastName, firstName
Explanation:
Order by is an sql code for sort
38. 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
Answer: FormClosing
40. 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
Answer: Console-based
43. 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
Answer: Queue
Explanation : Queue implement First In First Out
44. 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
Answer: Maintenance
Answer: 2
A. 49
B. 50
C. 51
D. 100
Answer: 50
50. 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: Double
Explanation: The double keyword signifies a simple type that stores 64-bit floating-point
values.
Precision: 15-16 digits
Incorrect: The float keyword signifies a simple type that stores 32-bit floating-point values.
Precision: 7 digits
51. 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: Call a stored procedure.
Explanation: . Stored procedures are collections of SQL
statements and programming logic that are stored on the
database server as named objects.
56. You are reviewing a design for a database. A portion of this design is shown
in the exhibits.
A. Field
B. Attribute
C. Property
D. Entity
57. 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
Answer: Connection Pooling
Explanation:
pool and it is used again so that a new connection does not have to
be established.
58. Our 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 .
Answer: . Establish a connection to the database by using the appropriate data provider.
59. 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();
Answer: MyBase.brake();
D. Truck.brake
();
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.
61. 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.
Explanation:
If a class contains no instance constructor declarations,
a default instance constructor is automatically provided.
62. 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
Answer: Get
64. 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
Answer: Cookie
65. 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
Answer: Hosting
66. 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
Answer: server-side
You need to group all the style settings into a separate file that can be applied
to all thepages 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.
Answer- Use a Cascading Style Sheet (CSS).
68. 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
Answer- on the computer that hosts the application
69. 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 services 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
Answer- a listing of methods that are available in the
Web service
71. This question requires that you evaluate the underlined text to determine if
it is correct. The default entry point for a console application is the Class
method. Select No change is needed if the underlined text makes the
statement correct.
A. No change is needed
B. Main
C. Program
D. Object
Answer: Main
73. You are extending an application that stores and displays the
results of various types of foot races. The application contains the
following definitions:
The following code is used to display the result for
a race:
answer
public class footrace : race, idisplayresult
{
public override void display()
{
Console.WriteLine(seconds + "seconds");
}
public void displayraw()
{
base.display();
}
void idisplayresult.display()
{
Console.WriteLine(seconds / 60d +
"minutes");
Console.ReadKey();
}
}
74. You are developing an application that tracks tennis matches. A match is represented by the following class:
A match is created by using the following code:
How many times is the Location property on the newly created Match class assigned?
A. 0
B. 1
C. 2
D. 3
Answer: 2
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. (encircle the
correct answer)
79. You are migrating several HTML pages to your website. Many of these pages contain
HTML
<center> and <font> tags. Which XHTML document type declaration should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
80. HOTSPOT
You have a base class named Tree with a friend property named color and a protected
property named NumberOfLeaves. In the same project, you also have a class named Person.
For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.
82. The throw keyword is used to perform which two actions? (Choose two.)
A. stop processing of the code
B. move error handling to a separate thread
C. raise exceptions
D. re-throw exceptions as a different type
HOTSPOT
You have the following flowchart:
Use the drop-down menus to select the answer
choice that completes each statement Each
correct selection is worth one point. (Encircle
the correct answer)
84. You are creating a database for a student directory. The Students table contains the
following fields:
Which statement will retrieve only the first name, last name, and telephone number for every
student listed in the directory?
A. WHERE Students SELECT *
B. SELECT firstName, lastName, telephoneNutnber FROM Students
C. SELECT firstName, lastName, telephoneNumber IN Students
D. SELECT * FROM Students
E. WHERE Students SELECT firstName, lastName, telephoneNumber
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise,
select
No. Each correct selection is worth one point.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
88. You have a SQL Server database named MyDB that uses SQL Server Authentication.
Which connection string should you use to connect to MyDB?
A. Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales
B. Data Source=MyDB; Integrated Security=SSPI; Initial Catalog=Sales
C. Data Source=MyDB; Integrated Security=True; Initial Catalog=Sales
D. Data Source=MyDB; Trusted_Connection=True; MultipleActiveResultSets=True; Initial
Catalog=Sales
89. You are developing a database that other programmers will query to display race
results. You need to provide the ability to query race results without allowing access
to other information in the database.
What should you do?
90. This question requires that you evaluate the underlined text to determine if it is correct.
A piece of text that is 4096 bytes or smaller and is stored on and retrieved from the client
computer to maintain state is known as a ViewState.
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. cookie
C. form post
D. QueryString
Answer: B. cookie
91. This question requires that you evaluate the underlined text to determine if it is correct.
Internet Information Services (IIS) must be installed on the client computers in order to run a
deployed ASP.NET application.
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. computer that hosts the application
C. computer that you plan to deploy from
D. Application Layer Gateway Service
95. What are the three basic states that a Windows service
can be in? (Choose three.)
A. halted
B. running
C. stopped
D. paused
E. starting
Answer: Running, Stopped, Starting
96. You have a Windows Service running in the context of an account that
acts as a nonprivileged user on the local computer. The account presents
anonymous credentials to any remote server.
What is the security context of the Windows Service?
A. LocalSystem
B. User
C. NetworkService
D. LocalService
Answer: LocalService
97. 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
HOTSPOT
Answer: B. 10
99. This question requires that you evaluate the underlined text to determine if it is correct.
To minimize the amount of storage used on the hard drive by an application that generates
many small files, you should make the partition as small as possible.
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. file allocation table
C. block size
D. folder and file names
100 .You open the Internet Information Services 7.5 Manager console as
shown in the following exhibit:
You need to examine the current
configuration of the server W2008R2.
Use the drop-down menus to select
the answer choice that answers each
question.
Each correct selection is worth one
point.
Answer: 1 , 5
101. For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.
103. This question requires that you evaluate the underlined text to determine if it is
correct. A table whose attributes depend only on the primary key must be at least second
normal form. 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. first
C. third
D. Fourth
103. You have a table named ITEMS with the following fields:
ID (integer, primary key. auto generated)
Description (text)
Completed (Boolean)
You need to insert the following data in the table: Cheese, False
Which statement should you use?
A. INSERT INTO ITEMS (ID, Description, Completed) VALUES (1, Cheese, 0)
B. INSERT INTO ITEMS (Description, Completed) VALUES (Cheese, 1)
C. INSERT INTO ITEMS (10, Description, Completed) VALUES (NEWID(), Cheese, 0)
D. INSERT INTO ITEMS (Description, Completed) VALUES (Cheese, 0)
105. This question requires that you evaluate the underlined text to determine if it is correct.
The bubble sort algorithm steps through the list to be sorted, comparing adjacent items and
swapping them if they are in the wrong order.
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. merge
C. library
D. insertion
108. 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: Glass.break();
109. This question requires that you evaluate the underlined text to determine if it is correct.
The benefit of using a transaction when updating multiple tables is that the update cannot
fail. 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. succeeds or fails as a unit
C. finishes as quickly as possible
D. can be completed concurrently with other transactions
Answer: B. succeeds or fails as a unit
111. You are creating an application that presents the user with a Windows
Form. Which event is triggered each time the Windows Form receives
focus?
A. Enter
B. Paint
C. Load
D. Activated
Answer: A. Enter
112. You have a website that includes a form for usemame and password.
You need to ensure that users enter their username and password. The validation must
work in all browsers. Where should you put the validation control?
A.in both the client-side code and the server-side code
B. in the client-side code only
C. in the Web.config file
D. in the server-side code only
Answer: A.in both the client-side code and the server-side code
113. You are developing a webpage that enables students to manage races.
The webpage will display two lists: past races and upcoming races. The page also
contains a sidebar with contact information and a panel with social media settings that
can be edited. Race results can be shared on social media.
How many components will be on the webpage?
A. 2
B. 3
C. 4
D. 5
Answer: 4
114. This question requires that you evaluate the underlined text to determine if it is
correct. Converting a value type to a reference type in an object is called boxing.
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. unboxing
C. interfacing
D. mapping
Answer: No change is needed
115. 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: B. polymorphism
116. For each of the following statements, select Yes if the statement is true. Otherwise,
select
No. Each correct selection is worth one point.
117. This question requires that you evaluate the underlined text to determine if it is correct.
A data dictionary that describes the structure of a database is called metadata.
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. normalization
C. a database management system (DBMS)
D. metacontent
118. This question requires that you evaluate the underlined text to determine if it is correct.
To improve performance, a SQL SELECT statement should use indexes.
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 ichange s needed
B. joins
C. grouping
D. ordering
119. You are building a web application that enables international exchange students to schedule
phone calls with their prospective schools. The application allows students to indicate a preferred
date and time for phone calls. Students may indicate no preferred time by leaving the date and
time field empty. The application must support multiple time zones.
Which data type should you use to record the students preferred date and time?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D. Option D
121. This question requires that you evaluate the underlined text to determine if it is correct.
When a base class declares a method as virtual, the method is hidden from implementation
bv a derived class.
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. can be overridden with its own implementation by a derived class
C. must be overridden in any non-abstract class that directly inherits from that class
D. cannot be overridden with its own implementation by a derived class
Answer: can be overridden with its own implementation by a derived class
122. This question requires that you evaluate the underlined text to determine if it is correct.
The process of transforming compiled C# code into an XML string for a web service is
known as deserialization. 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. serialization
C. decoding
D. Encoding
Answer: serialization
Answer: 2
130. You are designing your first graphical windows application for a small business.
Instructions: for each of the following statement, select yes if the statement is true. Otherwise, select No.
Each correct selection worth one point.
Answer : 6
136. The duplication of code so that the modifications can happen in parallel is
known as separating.
Instructions: review the underlined text, if it makes the statement correct,
select No change is needed, if the statement is incorrect choose what makes
the statements correct.
a. No change is needed
b. Branching
c. Merging
d. Splitting
Answer: Branching
HOTSPOT
You are creating a Windows Store application that uses the following gesture:
Use the drop-down menus to select the answer choice that completes each statement.
Each
correct selection is worth one point.
This question requires that you evaluate the underlined text to determine
if
it
is
correct.
Converting an object to a more general type is called upcasting.
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. downcasting
C. interfacing
D. flexing
For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.
HOTSPOT
You are reviewing the architecture for a system that allows race officials to enter the results
of 5K race results. The results are then made available to students using a web application.
The architecture is shown below:
DRAG DROP
You are developing an application that displays a list of race results. The race results are
stored in the following class:
DRAG DROP
You are developing an application to display track and field race results.
The application must display the race results twice. The first time it must display only the
winner and runner-up. The second time it must display all participants. The code used to
display results is shown below.
HOTSPOT
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.
This question requires that you evaluate the underlined text to determine if it is correct.
Unit testing is the final set of tests that must be completed before a feature or product can be
considered finished.
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. User acceptance
C. System
D. Integration
HOTSPOT
The ASP.NET MVC page lifecycle is shown in the following graphic:
Use the drop-down menus to select the answer
choice that completes each statement Each
correct selection is worth one point.
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.
For each of the following statements, select Yes if the statement is true. Otherwise, select
No. Each correct selection is worth one point.