MTA C# CERTIFICATION

¡Supera tus tareas y exámenes ahora con Quizwiz!

Select all the statements which are true for unit testing:

(all are true) 1. The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the rest of the code and determine whether it behaves exactly as expected 2. Each unit is tested separately before integrating the units into modules to test the interfacing between modules 3. The driver that you use in unit testing simulates a calling unit and the stub stimulates a called unit

How many parameters can a default constructor have?

0

(picture of Internet Information Services Manager console on Windows) How many sites are configured on the DESKTOP-CFBKD8 server?

1

Which of the following statements are true for a Queue data structure? (4)

1. A queue's items are stored in the same order they were added 2. A queue s a FIFO structure 3. Enqueue adds an item to the back of the queue 4. The capacity of a queue can be decreased by calling TrimToSize

Which of the following statements are true for Entity Relationship Diagrams?

1. An ERD contains entities, relationships and attributes 2. Cardinality refers to how one table is related to another table, e.g. one-to-many, one-to-one, many-to-many, etc.

Select all the statements which are false for the different types of linked lists:

1. Backtracking is possible in single linked lists 2. In the circular linked list, the next of the last node will point null

Which of the following statements are true for Arrays?

1. Each element in an array has an index 2. You can access the elements of an array by using the index

Which of the following statements are true for Dictionaries? (5)

1. Each key in a dictionary will have a unique value 2. The same value can be assigned to more than one key 3. Represents a collection of key 4. You can iterate through the items in a dictionary to retrieve the key-value pair 5. The dictionary class is contained inside the Systems.Collections.Generic namespace

Select all the statements which are true for a Hashtable: (5)

1. Each key in a hashtable will have a unique value 2. The same value can be assigned to more than one key 3. An untyped data structures which represents a collection of key-value pairs 4. You can iterate through the items in a hashtable to retrieve the key-value pair 5. When an element is added to the hashtable, the element is placed into a bucket based on the hash code of the key

What is the purpose of a finally block in exception handling? Select all that apply.

1. Execute clean-up code and release resources 2. Code in a finally block is executed even if an exception is not thrown

Which are 3 valid T-SQL keywords? (Select 3)

1. From 2. Select 3. Where

Select the 3 items that are the benefits of encapsulation:

1. Maintainability 2. Flexibility 3. Restricted Access

What are two advantages of normalization in a database? (Choose two)

1. Prevents data inconsistencies 2. Decreases space used on disk

What are the advantages of Connection Pooling? (Select 3)

1. Reduces the time it takes to create a connection 2. Improved scalability 3. Improved performance

What are the three basic states that a Windows service can be in? (Choose three.)

1. Running 2. Paused 3. Stopped

public struct PicData { public byte[] data; public int length; public Guid id; } public void post() { var uploaded = new PostedImage(); var newPic = new PicData(); newPic.data = uploaded.data; newPic.length = uploaded.length; newPic.id = Guid.NewGuid(); } Select all the following statements which are true:

1. The ID of the image is stored on the stack 2. Stack is used for static memory allocation and Heap for dynamic memory allocation

Which two types of information should you include in an effective test case? (Choose two.)

1. The expected result from the test case 2. Multiple actions combined as a single step to test the case

What is the purpose of the throw keyword? Select all that apply:

1. To raise exceptions 2. To rethrow exceptions as a different type

What are two possible options for representing a Web application within Internet Information Services (IIS)?

1. Website 2. Virtual Directory

You have the following function: private static int Printer (int j) { for(var i=j;i>0;i=Printer(i-1) ) { Console.Write(i); } return j; } What is the return value of the function call? Printer(2);

2

What is displayed when you attempt to access a Web Service by using a Web browser?

A list of methods which are available in the web service

What is displayed when you attempt to access a Web service by using a Web browser?

A listing of methods that are available in the Web service

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?

ASP.Net Web Application (ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages)

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?

Normalization

Where must Internet Information Services (IIS) be installed in order to run a deployed ASP. NET application?

On the computer that hosts the application

You are reviewing a design for a database. A portion of this design is shown in the exhibit. (picture of either the Crow's Foot Notation or Chen Notation version of the design) Which term is used to describe the relationship between Customers and Orders?

One-to-many

In your application, you are using a queue data structure to manipulate information. You need to find which data item will be processed next, but you don't want to actually process that data item yet. Which of the following queue operations will you use?

Peek

You are developing a database that other programmers will query to display Sales results. You need to provide the ability to query sales results without allowing access to other information in the database. What should you do?

Place the query in a stored procedure

You have a base class named Shape in your application. The Rectangle and Triangle classes both inherit Circumference from the Shape class but each compute it differently. Which term is used to describe this object-oriented concept?

Polymorphism

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

Provide a public function that assigns a value to the data member

You are designing a Windows Store application (Or in more modern terms, a UWP, application). You need to design the application so that users can share content by connecting two or more devices by physically tapping the devices together. Which user experience (UX) guideline for Windows Store (UWP) applications should you use?

Proximity gestures

You are part of a team of developers working on an application for a call centre. Calls must be taken in the same order they came in. Which data structure should you use?

Queue

You need to process data in your application on a FIFO (First-in first-out) basis. Which data structure should you use?

Queue

This question requires that you evaluate the text in italics to determine if it is correct. The *bubble* sort algorithm uses the partitioning and comparison operations to arrange the elements of a list in the correct order. A pivot element is picked in the list, and smaller items are moved to the left of the pivot and larger numbers to the right. The smaller lists are evaluated separately, and then merged together in the end. Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

Quick

Usually, with every new fix, software testers run a battery of ____________ to make sure that all functionality that was known to be working is still working

Regression Tests

In the life cycle of an ASP. NET Web page, which phase follows the SaveStateComplete phase?

Render

____________ is the process of determining the detailed business requirements for a new software system.

Requirements Analysis

(The ASP.NET MVC page lifecycle is shown in the graphic) During which event is the URL Pattern matched?

Route

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?

SELECT firstName, lastName, emailAddress FROM Students ORDER BY lastname, firstname *keyword order by*

You are creating a database for a student directory. The Students table contains the following fields: firstName lastName emailAdress telephoneNumber Which statement will retrieve only the first name, last name, and telephone number for every student listed in the directory?

SELECT firstName, lastName, telephoneNumber FROM Students

Which language uses Data Definition Language (DDL) and Data Manipulation Language (DML)?

SQL

Which language was designed for the primary purpose of querying data, modifying data, and managing databases in a Relational Database Management System?

SQL

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?

Connection Pooling

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?

Console Application

You plan to create an application for your company. The application will run automated routines and write the results to a text-based log file. Little or no user interaction is required. Security requirements on the host computers prevent you from running applications on startup, and users must be able to see the status easily on the screen. The host computers also have limited memory and monitors that display only two colors. These computers will have no network connectivity. Which type of application should you use for this environment?

Console-based

How does a console-based application differ from a Windows Forms application?

Console-based applications do not display a graphical user interface

You are developing an application that will be run from the command line. Which of the following methods would you use for output to the command line?

Console.Write();

(The ASP.NET MVC page lifecycle is shown in the graphic) Which event determines which action method is needed, and then calls that method?

Controller

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

Cookie

Which term is used to describe small units of text that are stored on a client computer and retrieved to maintain state?

Cookie (Cookies are small packets of information that are stored by a Web browser locally on the user's computer)

You need to provide query functionality to several of your classes. Each class's algorithm for the query will likely be different. Also, not all the classes have an "is-a" relationship with each other. How should you support this functionality?

Create a common interface that is implemented by all the classes

You are writing code for a class named Product. You need to make sure that the data members of the class are initialized to their correct values as soon as you create an object of the Product class. The initialization code should be always executed. What should you do?

Create a constructor in the Product class to initialize data members

You need to evaluate the following expression: (a>b) and (x<y) What is the value of this expression if a=5, b=6, x=6 and y=7?

False

You are developing an application that will need to copy data from a SQL Server view to a DataSet. You name the DataSet object dsData. Which of the following methods should you use to copy the data?

Fill

You write the following code for your Web page: <html> <head> <title>Sample Page</title> <style type="text/css"> div { font-family: Verdana; font-size: 9pt; } </style> </head> <body> <div style= "font-weight: bold; font-size: 12pt;"> Sample Text</div> </body> </html> What would be the style for text displayed as part of the <div> element?

Font family: Verdana; font weight: bold; font size: 12pt

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?

FormClosing

What does the Console.Error property do within a console-based application?

Gets the standard error output stream

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?

Hosting

You have a table named ITEMS with the following fields: ID (integer, primary key, IDENTITY) Description varchar (50) Completed (bit) You need to insert the following data in the table: "Cheese", False Which statement should you use?

INSERT INTO ITEMS (Description, Completed) VALUES ('Cheese', 0)

Which programming language is characterized as client-side, dynamic and weakly typed?

JavaScript

Which language allows you to dynamically create content on the client side?

Javascript

You are developing a mapping Web site that allows users to interactively explore maps using actions such as panning and zooming. You want the Web site to be responsive and accessible in most modern Web browsers. However, you do not want users to need to install additional plug-ins in order to use your Web site. Which of the following technologies should you use to display maps?

Javascript

You are developing a Windows Form with a multiple document interface (MDI). You need to write code that arranges the child windows vertically within the client region of the MDI parent form. Which of the following statements should you use?

LayoutMdi(MdiLayout.TileVertical);

You are developing a web application. You need to create the following graphic by using Cascading Style Sheets (CSS): (Image: gradient green box that is green to black from top to bottom) For the CSS background image, which value should you use?

Linear-gradient (to bottom, green, black)

You have a Windows Service running in the context of an account that acts as a non-privileged user on the local computer. The account presents anonymous credentials to any remote server. What is the security context of the Windows Service?

LocalService

You have developed a Windows service. This service needs to run as a non-privileged user in order to minimize any possible security risk. Which of the following accounts should you use for running this Windows service?

LocalService

This question requires that you evaluate the text in italics to determine if it is correct. The default entry point for a Console application is the *Program Class* method. Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

Main method

In the application-, or software development, life cycle, the revision of an application after it has been deployed is referred to as:

Maintenance

Which of the following class elements should you use to define the behavior of a class?

Method

You need to process data in your application on a LIFO (Last-in first-out) basis. Which data structure should you use?

Stack

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

String Array

(image of an arrow pointing up) The gesture depicted in the graphic is called:

Swiping

Which Exception type is thrown when a store into an array fails because the actual type of the stored element is incompatible with the actual type of the array?

System.ArrayTypeMismatchException

Which Exception type is thrown in an attempt to index an array via an index that is less than zero or outside the bounds of the array?

System.IndexOutOfRangeException

Which Exception type is Thrown when the execution stack is exhausted by having too many pending method calls; typically indicative of very deep or unbounded recursion?

System.StackOverflowException

From which item does all Objects in the .Net Framework inherit?

The System.Object class

In the following HTML sample, what will cause an error? <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Spot the error</title> </head> <body> <h1>Heading 1</h1> <p>paragraph 1 ending with line break</p><br> </body> </html>

The line break tag is incorrectly formatted

What is the purpose of a class constructor?

To initialize an object of the class

The testers of a software application have access to its source code, and they plan to write test cases that ensure that the methods return correct values. Which of the following testing levels will this activity fall under?

Unit Testing

You need to modify the records in a Products table by marking certain products as Discontinued. However, you need to do this only when the UnitsInStock and UnitsOnOrder are both zero. Which of the following SQL statements should you use?

Update

You have developed a Windows service. You need to install this service in order to install its functionality. Which of the following options should you choose to accomplish this task?

Use InstallUtil.exe

You need to group all the style settings in a website into a separate file that can be applied to all the pages. What should you do?

Use a Cascading Style Sheet (CSS)

You need to debug a Windows Service application by using breakpoints. What should you do?

Use the Attach to Process menu in Microsoft Visual Studio

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

User Acceptance Testing

How can you access a specific element in an array?

Using an integer index which starts from 0

Your ASP.NET page contains a page-level variable of Customer type. You want to preserve the value of this variable across page postbacks, but you do not need this variable in any other page in the application. Which of the following state-management techniques is the best way to achieve this?

ViewState

You are extending an existing Windows application. You would like to create a new form that derives its visual characteristics (including size, color, and some controls) from a previously created form. Which technique should you use to create the new form?

Visual Inheritance

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?

base.brake();

Which of the following types of functions can be overridden by a derived class?

a protected virtual member function

You have a class named Glass that inherits from a class named Windows. The Windows class includes a protected method named Break(). How should you call the Glass class implementation of the Break() method? In other words, which line of code should you add to the Glass.Break() method below the //Add code here comment? public class Window { protected virtual void Break() { } } public class Glass:Window { protected override void Break() { //Add code here: } }

base.Break();

You are creating a new class named Square that is derived from the Polygon class. The Polygon class has the following code: class Polygon { public virtual void Draw() { // additional code . . . } } The Draw method in the Square class should provide new functionality but also hide the Polygon class implementation of the Draw method. Which code segment should you use to accomplish this?

class square: Polygon { public new void Draw() { // additional code . . . } } ***Keyword NEW*** (The new keyword creates a new member with the same name in the derived class and hides the base-class implementation)

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

computer that hosts the application

You can step directly to the evaluation of the while, do, for or foreach expression. If the expression evaluates to *true*, execution continues at the first statement in the loop. Otherwise, execution continues at the first statement after the loop. Which statement would you use to achieve this result?

continue

You have a website that includes a form for a 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?

in the client-side code only

This question requires that you evaluate the text in italics to determine if it is correct. To improve performance, a SQL SELECT statement should use *joins*. Select the correct answer if the text in italics does not make the statement correct. Select "No change is needed'' if the text in italics makes the statement correct.

indexes

You want to restrict the access for a method to the containing class or to a class that is derived from the containing class. Which access modifier should you use for this method?

protected

This question requires that you evaluate the text in italics to determine if it is correct. When creating a site to utilize message queuing, the *IP address* must be configured to MSMQ. Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

protocol

(display of public class Race code) For the purposes of this exam, select the correct implementation of the Footrace class:

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"); } }

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?

runat="server" (This attribute indicates that an element should be treated as a server control)

You defined a class AdvMath that defines advanced mathematical functionality. You do not want the functionality of this class to be inherited into derived classes. What keyword should you use to define the AdvMath class?

sealed

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

serialization (the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file)

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?

server side

You have a class with a property. You need to ensure that consumers of the class can write to the value of the property. Which keyword should you use?

set (The set keyword defines an accessor method in a property or indexer that assigns a value to the property or the indexer element)

Your application includes a SqlDataAdapter object named sqlDataAdapter that connects to the Employees table. Based on this SQLDataAdapter, your application also includes a DataSet object dsEmployees. What line of code should you use to load the data from the database into the DataSet object?

sqlDataAdapter.Fill(dsEmployees, "Employees");

You are creating a variable for an application. You need to store data that has the following characteristics in this variable: Characters as well as numbers Includes numbers that have decimal points Which data type should you use?

string

Which of the following statements would declare a string variable named firstname and assign a value of "John" to it in one statement?

string firstname = "John";

You are developing a Windows Form that responds to mouse events. When the mouse moves, you need to invoke the method Form1_HandleMouse. Any code that you write should not affect any existing event-handling code. What statement should you use to attach the event handler to the event?

this.MouseMove += new MouseEventHandler (Form1_HandleMouse); (Use the addition assignment operator (+=) to attach your event handler to the event)

You write the following code in a program: int[] numbers = {2, 3, 1, 4}; numbers [2] = 4; What will be the contents of the array after the second statement is executed?

{2, 3, 4, 4}

XHTML: Select all the statements which are true:

1. Within an XHTML document, the XHTML DOCTYPE declaration is mandatory 2. Within an XHTML document, the XML namespace attribute in the HTML tag is mandatory 3. Within an XHTML document, the xmins attribute in <html> is mandatory 4. Within an XHTML document, the html, head, title, and body tags are mandatory

XHTML: Select all of the statements which are true. Each correct selection is worth one point.

1. XHTML attribute values must be in quotation marks 2. XHTML attribute minimization is forbidden

Select all the statements which is true for a linked list: (5)

1. You can add nodes anywhere in a linked list 2. A linked list is a sequential data structure and cannot easily be stored in another order 3. Data - each node of a linked list can store data 4. The first node of a linked list is reference by a pointer called Head 5. Effective Memory Management: They are dynamic in nature and allocate memory as and when required

You are reviewing the Player class that is used to manage the results of players and matches: public class Player { private string _Name; public const string Key = "player"; public bool MatchName(string searchTerm) { return _Name.ToLower() == searchTerm; } public void SetResult(int rank, string name) { if (_Name != null) return; Ranking = rank; _Name = name; } public int Ranking{get; private set; } } Select all the statements that are true regarding the Player class:

1. You can only set the player's ranking once 2. If you call the MatchName method the code will thrown an exception

When a web service is referenced from a client application in Microsoft Visual Studio, which two items are created? (Choose two.)

1. a .wsdl file 2. a .disco file

Which statements can you use to exit a while, do, for or foreach loop? Select all applicable answers:

1. break 2. goto 3. throw 4 return

When you execute the following code, what would the returned result be? static int EvalLogicalOr() { int x = 10, y = 20, z = 30, result = 0; if (x <= y || z > x) result = 10; else if (x<=y||z<=x) result = 20; else result = 30; return result; }

10 (|| operator means OR)

(algorithm graph problem) If x=80 and y = 100, what will the output of the algorithm be?

100

(algorithm graph problem) The value that is returned is:

100

You are developing a web application. You need to create the following graphic by using Cascading Style Sheets (CSS): (Image: gradient green box that is green to black from top to bottom with white border) For the CSS style Border-Radius, which value should you use?

10px

When you execute the following code, what would the returned result be? static int EvalIfElse() { bool cupFull = true; bool sugarAdded = false; int result = 0; if (cupFull) { if(sugarAdded) { result = 1; } else { result = 2; } } else { result = 3; } return result; }

2

When you execute the following code, what would the returned result be? static int EvalSwitch() { bool cupFull = true; bool sugarAdded = false; int result = 0; switch (cupFull) { case true: switch (sugarAdded) { case true: result = 1; break; case false: result = 2; break; } break; case false: switch (sugarAdded) { case false: result = 3; break; case true: result = 4; break; } break; } return result; }

2

You are developing an application that tracks tennis matches. A match is represented by the following class: public class Match { public Match() { Location = "unknown"; //Console.WriteLine("Location = " + Location); } public string Location { get; set; } public DateTime? MatchDate { get; set; } } A match is created by using the following code: var match = new Match { Location = "South Region", MatchDate = new DateTime(2013, 4, 14), }; How many times is the Location property on the newly created Match class assigned?

2

You have the following function: private static int Printer (int j) { for(var i=j;i>0;i=Printer(i-1) ) { Console.Write(i); } return j; } What does the Console display with the following function call? Printer(2);

211

You create the following class: class NumberExample { //Data fields private int _no1 = 7; //Default Constructor public NumberExample() { } //2nd Constructor public NumberExample(int no) { _no1 = no; } } You execute the following code: NumberExample no_ex = new NumberExample(3); What is the value of _no1 after the code is executed?

3

You are developing a web page that enables students to manage races. The web page 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?

4

(picture of Internet Information Services Manager console on Windows)

5

In the following code, how many times will "Hi There!" be printed to the Console? int counter = 0; Console.WriteLine("Printing all the uneven numbers from 0 to 100:"); for (int x = 0; x <= 100; x++) { if(x%2!=0) { counter++; Console.Write("Hi There!"); } } Console.WriteLine("\nPrinted 'Hi There' to the Console {0} times", counter); Console.ReadKey();

50

A Stack is a last-in, first-out collection of objects. Push adds and item to the Stack and Pop removes the last item from the Stack. You have a Stack to which values are pushed in the following order: 2, 4, 6, 8. You execute the following sequence of operations: Pop Push 3 Pop Push 4 Push 6 Push 7 Pop Pop Pop What is the value of the top element after execution?

6

How many times will the loop be executed in the following code block? int counter = 0; for (int x=0; x<=10; x+=2) { counter++; Console.WriteLine("Looping through the for loop {0} times", counter); Console.WriteLine("The value of x is: {0}", x); } Console.ReadKey();

6

(algorithm graph problem) The value of X is:

70

You want to display values of the C# expressions in an ASP.NET page. Which of the following types of code blocks should you use to enclose the expression?

<%= ..... %> (The characters <% and %> are used to embed code blocks in the HTML markup of a page)

Which function does Simple Object Access Protocol (SOAP) provide when using Web services?

A Communication Protocol

You have developed a timesheet application that will be used by all employees in your company. You used ASP.NET to develop this application and have deployed it on the company's Web server. What must all employees of the company install on their computers before they can access the timesheet application?

A Web browser

The product that you are developing is not yet finished, but you would like to release the product to a wider customer audience for feedback and testing. Under which of the following testing levels would this activity fall?

Acceptance Testing

You are developing an application that manages customers and their orders. Which of the following situations is not a good candidate for implementation with stored procedures in your application?

Ad hoc querying by the database administrator

You need to update the Region fields for customers in Japan. You write the following SQL UPDATE statement: UPDATE Customers SET Region = 'EastAsia' You test the query on a test database and find that more records were affected than you expected. You need to correct the SQL statement. What should you do?

Add a WHERE clause to the UPDATE statement

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

Add a reference to the Web service in the application

Which of the following must exist to inherit attributes from a particular class?

An Is-A Relationship (The is-a relationship refers to inheritance)

(image of an arrow pointing up) You are creating a Universal Windows App that uses the following gesture, the surface displayed on completion of the gesture is the:

App Bar

You have a Microsoft ASP.NET web application. You need to store a value that can be shared across users on the server. Which type of state management should you use?

Application

The application you are developing needs to read data from a flat file that include items such as a five-digit integer key, followed by a 20-character customer name, followed by two date and time fields. Which of the following classes should you use?

BinaryReader

Your application needs to store the product image out to a disk file. You'd like to minimize the size of this disk file. Which of the following objects should you use to write the file?

BinaryWriter

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

Block size

Select all the statements which are true regarding is-a and has-a relationships:

Both inheritance and composition allows you to create sub-objects

The duplication of code so that it can be modified in parallel is known as?

Branching

A _________________ is responsible for analyzing business needs and converting them into requirements that can be executed by the development team.

Business Analyst

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

Call a store procedure

Your C# program needs to return the total number of customers in a database. The program will be used several times a day. What is the fastest way to return this information from your program?

Create a stored procedure to return the total number of customers, then use the SqlCommand.ExecuteScalar method to execute the stored procedure

You need to create a stored procedure that passes in a person's name and age. Which statement should you use to create the stored procedure?

Create procedure StoreData @Username nvarchar(255), @Age int

Your application connects to a SQL Server database that contains a table called Employees with the following columns: EmployeeID (int, identity) EmployeeType (char(1)) EmployeeDate (datetime) You need to write a query that deletes all rows from the table where the EmployeeType value is either C or T. You do not want to delete any other rows. Which statement should you use? ​ DELETE FROM Employees WHERE EmployeeType LIKE '[CT]'

DELETE FROM Employees WHERE EmployeeType IN ('C', 'T') (IN operator is a logical operator that allows you to test whether a specified value matches any value in a list)

You have a SQL Server database named MyDB that uses SQL Server Authentication. Which connection string should you use to connect to MyDB?

Data Source=MyDB; UserID=username; Password=P@sswOrd; Initial Catalog=Sales (uname & pw required for authentication)

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 student's preferred date and time?

DateTimeOffset

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

Derived class

Which of the following activities in the application lifecycle is used by an architect to create the technical blueprint of a system?

Design

Select the correct order of the Software Development life cycle:

Design, requirements gathering, development, and testing

Which type of loop will you use to ensure the loop executes at least once?

Do-While

You are developing a program that performs frequent insert and delete operations on the data. Your requirement also dictates the capability to access previous and next records when the user presses the previous or next button. Which of the following data structures will best suit your requirements?

Doubly linked list

A data warehouse database is designed to:

Enable business decisions by collecting, consolidating, and organizing data

You are creating an application that presents the user with a Windows Form. Which event is triggered each time the Windows Form receives focus?

Enter (focus events of the Control class occur in the following order: Enter -> GotFocus -> LostFocus -> Leave -> Validating -> Validated)

You are reviewing a design for a database. A portion of this design is shown in the exhibit. (picture of either the Crow's Foot Notation or Chen Notation version of the design) Which term is used to describe the Customer component?

Entity

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?

Establish a connection to the database by using the appropriate data provider

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?

Event Driven

The purpose of the catch block in handling exceptions is to:

Execute code only when an exception is thrown

You are developing a Web form to display currency information. When a user requests the Web form, the form needs to perform some initialization to change its appearance and assign values to some controls. Where should you put the code?

In the Load event handler of the Page class

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? e.g. public class Manager : Employee { // Employee fields, properties, methods and events are inherited // New Manager fields, properties, methods and events go here... }

Inheritance

Which service can host an ASP.NET application?

Internet Information Services

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?

It speeds up query execution

You have a base class named Tree with an internal property named color and a protected property named NumberOfLeaves. In the same project, you also have a class named Person. Select which of the following statements are true:

Methods in the Person class can access the color property

You want to develop an application that displays a visual surface capable of displaying a variety of controls, such as text boxes, buttons, and menus. The application should also allow multiple child windows to reside under a single parent window. Which of the following types of application should you develop?

Multiple document interface (MDI) application

Which type of Windows application presents a parent window that contains child windows?

Multiple-document interface (MDI)

This question requires that you evaluate the text in italics 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 text in italics does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

No change is needed

This question requires that you evaluate the text in italics to determine if it is correct. A table whose attributes depend only on the primary key must be at least in *second* normal form. Select the correct answer if the text in italics does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

No change is needed

This question requires that you evaluate the text in italics to determine if it is correct. Converting an object to a more general type is called *upcasting.* Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

No change is needed

This question requires that you evaluate the text in italics 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 italicized text does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

No change is needed

This question requires that you evaluate the italicized 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 text in italics does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

No change is needed (The conversion of a value type to a reference type is known as boxing. Unboxing is just the opposite - it is defined as the process of conversion of a reference type to a value type.)

You are developing an application that needs to retrieve a list of customers from a SQL Server database. The application should move through the list sequentially once, processing each customer's record. Which of the following classes should you use to hold the customer list in order to achieve maximum performance?

SQLDataReader

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 (graph of architecture is shown) To minimize the time between when a race official records the race results and when the results are available on the web browser, which part of the system is critical?

Satellite links

This question requires that you evaluate the text in italics to determine if it is correct. The *Response.Redirect* method is used to transfer processing of the current page to a new page, and then return processing back to the calling page once processing of the new page has completed. Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

Server.Execute

You are designing a Windows service application that contains only one Windows service. You would like this service to be started automatically when the computer is restarted. Which of the following classes should you use to specify this setting?

ServiceInstaller

You are developing a Web application for an online bank. Your application enables users to access their account information and transactions from within a Web browser. When a user logs onto the Web application, you want to show the username and account balance on all pages of the application until the user logs off. You also want this application to be safe from malicious users. Which of the following state-management techniques should you use?

Session state

You need to design a Windows service that cannot be paused. Which of the following options will help you accomplish this task?

Set the CanPauseAndContinue property of the Windows service to False

You need to change the display and behavior of a Windows Form so that the form can contain multiple child windows. What should you do?

Set the isMdiContainer property of the form to True

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

Software Testing

You are developing a program that requires you to track the method calls. You can only invoke one method at a time. However, a method call may in turn invoke other methods. When a method ends, it returns control back to the calling method. Which data structure should you use to keep track of these method calls?

Stack

You are part of a team of developers who need to develop an application for a call centre. The most recent calls need to be routed to a priority department and handled first by that department. Which data structure should you use?

Stack

You create an application that uses Simple Object Access Protocol (SOAP). Which technology provides information about the application's functionality to other applications?

Web Service Description Language (WSDL)

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 (graph of architecture is shown) To increase the number of students using the application, which element should be added to the system?

Web application servers

In ____________ testing, testers use their knowledge of system internals to assess the system

White Box

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?

Windows Forms

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

Windows Service

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

You are working on an application for a Health and Lifestyle consultancy. You want to indicate if clients are smokers. You need to create a variable named smoker and initialize it to false. Which statement would you use?

bool smoker=false;

You need to declare a variable which will achieve the following in your C# application: · Can only store unsigned values · Maximum size should be 8 Bits · Should be able to store whole numbers from 0 up to 255 · Be optimized for performance Which data type should you use?

byte

This question requires that you evaluate the text in italics to determine if it is correct. When a base class declares a method as virtual, the method *is hidden from implementation by a derived class*. Select the correct answer if the italicized text does not make the statement correct. Select "No change is needed'' if the italicized text makes the statement correct.

can be overridden with its own implementation by a derived class

Which of the following statements would declare a decimal variable named price and assign a value of 245.77 to it in one statement?

decimal price = 245.77M; (If you do not add the M to the end of 245.77, you would get the following error when you are trying to run your application: "Error Code CS0664 - Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type.")

Which of the following iteration statements always executes at least once, even if the condition fails at its first check?

do

You are creating variables for an application. You need to store data that has the following characteristics in this variable: · Consists of numbers only · 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?

double

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?

get

You have the following classes - Class A, B, C, D. Class C and class D inherit from Class B. Class B inherits form class A. A: m1 B: m2 C: m3 D: m4 All methods have protected scope. Which methods does class C have access to?

m1, m2, m3

Which type in C# is the base type of all other types?

object

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?

polymorphism

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

protected

This question requires that you evaluate the text in italics 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 text in italics does not make the statement correct. Select "No change is needed" if the italicized text makes the statement correct.

succeeds or fails as a unit

In a class, you defined a method called Render. This method provides functionality to render bitmap files on the screen. You would like the derived classes to supersede this functionality to support the rendering of additional image formats. You also want the Render method of the derived classes to be executed even if a derived class is cast as the base class. Which keyword should you use with the definition of the Render method in the base class?

virtual (The virtual keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class. The virtual member can also be executed from the base class)


Conjuntos de estudio relacionados

Open English - Level 1 - Unit 1 - Hello!

View Set

THE ELEPHANT IN THE BRAIN chap Intro - 2

View Set

Pharmacology Chapter 1: Consumer safety and drug regulations

View Set

chapter 2 interactive presentation

View Set

Science Chapter 1Section Review 1.5

View Set

Alexander Graham Bell and Thomas Edison

View Set