MTA 98-361

Ace your homework & exams now with Quizwiz!

You need to declare a button control on an ASP.NET page and have it execute on the Web server before it is sent to the browser. How should you declare the button control? 1. <asp:Button runat="WebServer"/> 2. <asp:Button compile="server"/> 3. <asp:Button runat="server"/> 4. <asp:Button compile="WebServer"/>

<asp:Button runat="server"/>

What must you use as a condition of an if statement

A Boolean expression

When a program calls a function, in which type of data structure is memory allocated for the variables in that function?

A heap

You need to write a block of code that will log user activity in a text file, but it does not need to return a value to the code that is executing. What type of code block should you write?

A method with a return type of void

In the agile software methodology, what is a sprint?

A month-long or shorter development life cycle

You need to configure a Web application to consume a Web service. What should you do?

Add a reference to the Web service in the application

How should you configure you applications project to communicate with an XML Web service?

Add the .wsdl file as a Web reference to your project.

What is Web Service Definition Language (WSDL)?

An XML format used for describing network services as a set of endpoints

Planning, developing, testing, and deploying are all aspects of:

Application lifecycle management

What term is used to describe a class that serves as a starting point for new classes?

Base class

What must you invoke to instantiate a class?

Constructor

What term best describes a procedure that is automatically invoked when an object is first instantiated?

Constructor

You need to model an "is a" relationship. What should you do?

Create a class that inherits from another class.

Which tool or application is used to host Web sites?

Internet Information Services (IIS)

What is the purpose of a Data Source Name (DSN)?

It Stores and centralizes connection information for a data source.

You need to define a JavaScript function on a Web Page. In which HTML tag should you enclose the function?

SCRIPT

You want to return values from all fields and all rows in a table named Suggestions. Which Structured Query Language (SQL) query should you use?

SELECT * FROM Suggestions

Your company uses the waterfall software development life cycle. In which phase are software bugs discovered and fixed?

Testing

What is unit testing?

Testing to ensure that each small unit of code behaves as expected.

The finally block of an exception handler is: ? (hint: are there any exceptions?)

always executed when the code leaves any part of the try statement, except when a StackOverflowException is thrown.

You need to record whether users have signed up to receive e-mail from your Web Application. Your solution should use the least amount of memory as possible. Which data type should you choose?

bool

A .NET provider is a:

bridge between an application and a data source

The purpose of a data warehouse is to:

collect, consolidate, and organize data

public class Car { protected void engine() { } private int doors = 2; } In the code shown in the exhibit, the keywords public, protected and private:

determine the accessibility of this class and its members to code within other classes.

You need to execute a set of statements once, test for a condition, and then repeat execution only if the condition if true. Which loop structure should you use?

do

You need to represent a number that has decimal places requiring 15 digits of precision. Which 2 numeric data types could you use?

double & decimal

You create an if statement that specifies a condition. You need to include code that should execute if the condition is not true. What should you use?

else

The catch block of an error handler: ?

executes when an exception is thrown

You execute the following code: int a = 6; int b = 4; int y = 6; int z = 2; bool _result; _result = (a < (b - z) && (y > z)); What is the value of the variable named _result when the code has executed?

false

You want to execute a set of statements 10 times. Which loop structure should you use?

for

You need to iterate through a collection of strings and print each item into the collection. You do not know how many items are in the collection. You do not want to cast the collection to an IEnumerable. Which loop structure should you use?

foreach

In relational database design, the process of eliminating unnecessary duplication in the data is called:

normalization

Int a = 6; Int b = 4; Int c = 1; bool _result; Single answer; _result = (a % b > c); You execute the code shown in the exhibit. What is the value of the variable result when the code has executed?

true

You anticipate that an exception might occur in a block of code. Which type of statement should you use to handle the exception?

try-catch-finally

You need to execute a set of statements and retain control of execution if one of three exceptions occurs. Which decision structure should you use?

try-catch-finally

public class Cat { public string _color = "white"; public Cat(); } { public Cat (string color); } { _color = color.ToString(); } } Your application contains the Cat class shown in the exhibit. You execute the following code. Cat myKitten1 = new Cat(); Cat myKitten2 = new Cat("black"); Response.Write("One kitten is " + myKitten1.color + ".<br />"); Response.Write("The other kitten is " + myKitten2.color + ".<br />"); What text is displayed when the code has executed?

One kitten is white. The other kitten is black.

You are creating an application that routes technical support requests to employees. The application must route the requests in the order in which they were received. Which data structure should you use to store the requests?

Queue

What is a benefit of stored procedures in a database?

They reduce network traffic and execution time by compiling and storing SQL statements in the database.

An application has a graphical user interface (GUI) and runs on individual computers that do not have network connectivity. Which type of application is it?

Windows Forms

You have an Employee class. You need to expose a class member to hold the value of each employee's department. What should you create?

A public property

You are creating an application that will process ticket sales for a theater. Ticket requests must be taken in the same order in which they were received. Which data structure should you use?

A queue.

What information does a database connection string contain?

Database server, database name, and credentials

A class constructor has no parameters. What type of constructor is this?

Default

A class contains a public method named ComputeSalesTax that computes the sales tax based on a specified state abbreviation and a dollar amount. This eliminates the need for client code to know the sales tax rates for each state. Which object-oriented feature is this called?

Encapsulation

The Car class and the Truck class both inherit characteristics from the Vehicle class. However, the Truck class has methods that are unique to the Truck class, and the Car class has methods that are unique to the Car class. Methods belonging to these two classes can only be accessed by the code that is in the same class. Which object-oriented programming term describes this concept?

Encapsulation

In a Windows Forms application, which event is raised before a Windows Form is displayed for the first time?

Form.Load

Which of the following is a weakly typed, client-side scripting language?

JavaScript

Your company does not allow the use of ActiveX controls on its Web pages. Which language should you use to dynamically add buttons to one of the company's Web pages in the user's browser on the client side?

JavaScript

You are creating an application that must accept user input, perform resource-intensive processing, and display bar graphs in color. It will be used on computers that do not have internet or network connectivity. Which type of application should you create?

Windows Forms

You need to develop an application that provides a rich graphical user interface and that runs locally on users' desktops. Which type of application should you create?

Windows Forms

What type of application presents no user interface?

Windows service

You need to create an application that runs in the background and has no user interface. Which type of application should you create?

Windows service

You need to create an application that runs on startup. The application should run in the background and not interfere with people using the computer. Which type of application should you create?

Windows service

You want to display data from an XML file on your Web page. Which control provides the necessary information to access the XML file so that the application can read and display the data?

XmlDataSource

The primary purpose of Internet Information Services (IIS) is to:

host ASP.NET Web applications

bool parent = false; bool mother = false; bool brother = false; string salutation = "Hello"; if (parent == true) { if (mother == true) { salutation = "Hi mom!"; } else { salutation = "Hi dad!"; } } else { if (brother == true) { salutation = "Hey bro!"; } else { salutation = "Hey sis!"; } } When the code in the exhibit has been executed, what will the value of the variable solution be?

"Hey sis!"

You are a C# Web developer for a managed service provider. You used Visual Studio 2015 to design an ASP.NET web application for one of your clients. You need to deliver the complete web application to the client in package format so they can easily deploy the web application to their internal IIS web server. You decide to use the Publish Web Wizard to create the deployment package. Which THREE actions should you perform IN SEQUENCE? 1. Give the .publishsettings file for the website to the client. 2. Select the Debug configuration profile. 3. Deliver the package to the client 4. Choose the Web Deploy Package publish method 5. Select the release configuration profile 6. Choose the Web Deploy publish method

1. Choose the Web Deploy Package publish method 2. Select the Release configuration profile 3. Deliver the package to the client

You are the lead developer for an IT consulting firm. The firm has a new governmental contract for a 3-tier web application that will require a substantial development effort for at least the next year. The first names and job roles of you teams are as follows: -Karl: Quality assurance specialist -Sarah: Developer -Jeff: Solutions architect -Missy: Technical support specialist -Don: Business analyst You need to assign your five teammates to each phase of the application lifecycle for this software project to best meet the needs of the project. How should you assign the team? A team member may be used once, more than once, or not at all. 1. Requirements analysis 2. Design process 3. Software development 4. Software testing 5. Release management

1. Don 2. Jeff 3. Sarah 4. Karl 5. Missy

You are a C# programmer for an educational software company. You need to define a new class that allows students to work with rectangle shapes. Your class definition is as follows: class Rectangle { private double width; private double length; public Rectangle(double w, double l) { width = w; length = l; } public double FindArea() { return width * length; } } For each statement, select Yes if the statement is true. Otherwise, select No. 1. The length and width data fields do not limit access to their values 2. FindArea() is a class method 3. The values 3.14 and 42.22 can be used as length and width values for the Rectangle class.

1. No 2. Yes 3. Yes

You are a C# software developer for your company. You need to create an algorithm that meets the following requirements: -Uses the single-dimensional array data type -Initializes a variable named numbers that contains 5 members Your solution code is as follows: int[,] numbers = new int[5]; For each statement, select Yes if the statement is true. Otherwise, select No. 1. The numbers variable use the single-dimensional array data type. 2. The numbers variable contains 5 members. 3. The numbers variable stores numeric data.

1. No 2. Yes 3. Yes

You are a C# desktop application developer for your company. You use Visual Studio 2015 on a Windows 10 workstation. You are developing a Windows Service application that writes diagnostic information to the Windows Event Log. You need to install the service manually on your Windows 10 workstation so you can run the project. Which THREE actions should you perform IN SEQUENCE? 1. Run InstallUtil.exe 2. Press the F5 key from within Visual Studio 3. Open the Developer Command Prompt for Visual Studio 2015 as an administrator. 4. Navigate to the Visual Studio Installation directory 5. Open a standard Windows PowerShell console 6. Navigate to the directory where the compiled executable exists. 7. Run Set-Service

1. Open the Developer Command Prompt for Visual Studio 2015 as an administrator. 2. Navigate to the directory where the compiled executable exists. 3. Run InstallUtil.exe

You are a database developer for your company. All line of business databases reside on a Windows Server 2016 member server named SQL1 that runs an instance of the SQL Server 2016 database engine. You need to craft a Transact-SQL (T-SQL) query against the HR database that retrieves all projects associated with each employee. The business projects exist in the PROJECTS table, and the employee data exists in the EMPLOYEES table. The results should be sorted by employees last name. Which SIX T-SQL statements should you use IN SEQUENCE? 1. GROUP BY e.LastName 2. ON e.employeeID = p.employeeID 3. ORDER BY e.LastName 4. INNER JOIN hr.projects AS p 5. USE hr 6. USE sql1 7. SELECT * 8. FROM hr.employees AS e

1. USE hr 2. SELECT * 3. FROM hr.employees AS e 4. INNER JOIN hr.projects AS p 5. ON e.employeeID = p.employeeID 6. ORDER BY e.LastName

You are a C# programmer for an educational software company. You define the following class for use in a basic geometry application: class Rectangle:Shape { public override FindArea() { return width * length; } } For each statement, select Yes if the statement is true. Otherwise, select No. 1. Rectangle is a derived class. 2. The FindArea() method is an example of polymorphism. 3. Shape is a child class.

1. Yes 2. Yes 3. No

You are creating a Web-application for someone who sew custom made clothing. The application will use a simple shopping cart. Interested buyers can put together specifications for garments and place garments in the shopping cart to receive an estimate of the cost. Which classes should you create to model the requirements and minimize the number of classes?

ShoppingCart class, Garment class

Which communication protocol is used to describe messages in a Web service?

Simple Object Access Protocol (SOAP)

You implement a method to create an instance of a class named Shape and store it in a local variable. How do the stack and the heap participate in the creation of the Shape instance?

The Shape instance is created on the heap. The stack stores a pointer to the Shape instance.

When a single inheritance model is used:

a class can inherit from only one base class

You are a solutions developer for your company. You are asked to author a C# desktop application that will run on low-cost, commodity hardware. In your source code, you need to define a variable that will hold values between -32,768 and 32,767. The data type must minimize the memory footprint of the application and support maximum performance. Which data type should you choose for your variable?

short

You are a Web developer for a consulting business. One of your clients asks for a website that meets the following business requirements: -Form input validation -The ability to play video without the need for a separate plug-in -Responsive design that adapts to screen size -Secure connection You need to use the proper web development technologies to deliver the right solution for your client. Which technologies should you use? A web technology may be used once, more than once, or not at all. FTP, CSS, AppleScript, HTML, JavaScript, HTTPS 1. Form input validation 2. Video without a plugin 3. Responsive design 4. Secure connection

1. JavaScript 2. HTML 3. CSS 4. HTTPS

You are a C# programmer for a healthcare management organization. You have been asked to author a three-tier web application that performs complex business logic. After drafting your application flowchart, you determine the need to code decision structures to meet the following program requirements: -Take action if an expression evaluates to Boolean true. -Take action if an expression evaluates to Boolean true or false. -Perform efficient multi-way branching between several conditions depending on expression results. -Execute a block of statements until an expression evaluates to Boolean false. Which decision structures should you use?

1. if 2. if else 3. switch 4. while

int i = 0; int x = 0; for (i = 1; i < 10; i = i + 3) { x = i * 2; } You execute the code shown in the exhibit. What is the value of x after the code is executed?

14

The following integers are added to a stack in this order: 3, 8, 4, 6, 1. You perform the following operations on the stack: -Push 7 -Pop -Push 2 What is at the bottom of the stack after you perform these operations?

3

int x = 1; while (x < 3) { X = x + 1; } You execute the code shown in the exhibit. What is the value of x when the code is executed?

3

The following integers are added to a stack in this order: 4, 7, 9, 2, 6. You perform the following operations on the stack: -Pop -Pop -Push 8 -Pop -Push 3 What does the stack contain from top to bottom after the operations are performed?

3, 9, 7, 4

How many bytes does the Int32 type allocate?

4

Which language should you choose to change the background color of all <div> elements on a Web page?

Cascading Style Sheets (CSS)

Which statement about classes and structures is true? 1. Classes are value types, and structures are reference types. 2. Classes are allocated of the heap, and structures are allocated on the stack. 3. Classes are passed by value, and structures are passed by reference. 4. Classes are allocated on the stack, and structures are allocated on the heap.

Classes are allocated of the heap, and structures are allocated on the stack.

You open a command prompt and enter ftp. You are then presented a screen shown in the graphic exhibit. This is an example of which type of application?

Console

Which type of application typically does not have a graphical user interface (GUI) and is often invoked from a command prompt?

Console-based

You need to create an application that cannot have a graphical user interface, but it needs to accept user input. Which type of application should you create?

Console-based

A requirements document contains the following information: -A customer has one or more accounts -An account can belong to only one customer. Which class or classes should you create to model the requirements and minimize the number of classes?

Customer and Account

Which statement about Internet Information Services (IIS) is true? 1. IIS must be configured on the computer where a Web Application's files are located and on the computer where a Web applications database is located. 2. IIS must be configured on the computer that hosts a Web application 3. IIS must be configured on the computer that published a Web application 4. IIS must be configured on the computer where a Web application's files are located

IIS must be configured on the computer that hosts a Web application

A class named Employee contains a protected member named Salary. A class named Manager does not define the Salary member, but the Manager class can access the Salary member in the Employee class. Which object-oriented feature does this represent?

Inheritance

A class named Pet is derived from a class named Animal. The Dog class is derived from the Pet class and includes attributes belonging to the Pet class and the Animal class. What object-oriented programming term best describes this concept?

Inheritance

In a try-catch-finally block, where should you put code that must execute when a specific exception occurs?

Inside a catch block

In a try-catch-finally block, where should you put the code that must always execute regardless of whether an exception occurs?

Inside the finally block.

Which tool should you use to install a Windows service application in the Service Control Manager (SCM)?

Installer Tool (InstallUtil.exe)

The process of creating an object is called:

Instantiation

What is the purpose of a virtual directory in Microsoft Internet Information Services (IIS)? 1. It represents a logical disk for storing session-related data 2. It serves as a container for application pools 3. It provides access to different versions of an operating system 4. It acts as a logical directory to Web browsers for locating Web resources

It acts as a logical directory to Web browser for locating Web resources

Which of the following is a possible advantage of creating an index on a SQL Server database table? 1. It allows queries to execute more quickly 2. It makes creating views easier 3. It makes the database smaller and more efficient 4. Query execution remains unchanged

It allows queries to execute more quickly

Which of the following characteristics does a console application have? 1. It provides a rich graphical user interface (GUI) that accepts mouse and keyboard input. 2. It can run with minimal user interaction without mouse input. 3. It can share its functionality by being loaded into the processes of other applications. 4. It can start automatically by the Service Control Manager (SCM).

It can run with minimal user interaction without mouse input.

Which of the following is a characteristic of a Microsoft Windows service? 1. It can be described by using Extensible Application Markup Language (XAML) 2. It provides a rich graphical user interface that accepts mouse and keyboard input 3. It can start automatically and run in the background until the operating system is shut down 4. It can be hosted in Microsoft Internet Information Services (IIS)

It can start automatically and run in the background until the operating system is shut down

What is a multiple-document interface (MDI) application?

It consists of a parent form with multiple child forms.

Which of the following is a characteristic of a Web Service? 1. It can be started and stopped by end users 2. It can be managed in the Service Control Manager (SCM) 3. It provides a rich graphical user interface that can be shared by all types of client applications 4. It exposes functionality to users and applications over the Internet

It exposes functionality to users and applications over the Internet

You execute the following Structured Query Language (SQL) query: SELECT * FROM Users ORDER BY LastName, FirstName What happens when the query runs?

It selects all fields and all records from the Users table sorted by LastName and then FirstName

What is the purpose of a data warehouse?

It stores and organizes large amounts of data for analysis and retrieval purposes.

What is the purpose of a primary key in a relational database table?

It uniquely identifies a record in the table.

You create a console application. Which method must you implement?

Main

A Web application requires changes after it has been deployed. What term is used to describe this process?

Maintenence

Which of the following is a relational database management system (RDBMS)? 1. Microsoft Internet Information Services (IIS) 2. Service Control Manager (SCM) 3. Microsoft SQL Server 4. Microsoft Excel

Microsoft SQL Server

A database contains two tables named Employees and Payrecords. The two tables are joined on the EmployeeID field common to both tables. The EmployeeID uniquely identifies each employee. Each pay period, a record is entered into the table Payrecords for every employee that is paid. Which term describes the relationship between Employees and Payrecords?

One-to-Many

A class named Shape contains a method named CalculateArea that is declared as protected. Which classes can access the CalculateArea method?

Only the Shape class and all classes that inherit from Shape.

The AutoEventWireup attribute of the @ Page directive is set to true for a page. Which method should you implement in the code-behind file to be called whenever the page loads? 1. Page_Load 2. Load 3. PageLoad 4. Load_Page

Page_Load

The Car class and the Truck class both inherit the BlowHorn method from the Vehicle class, but when the BlowHorn method is invoked for an instance of the Truck class, the result is a loud blast. When the BlowHorn method is invoked for an instance of the Car class, the result is a soft beep. Which object-oriented programming term describes this concept?

Polymorphism

The Tricycle class and the Bicycle class are both derived from the ToysWithWheels class. Both inherit the WheelNumber property from the ToysWithWheels class. When an instance of the Tricycle class is instantiated, WheelNumber = 3. When an instance of the Bicycle class is instantiated, WheelNumber = 2. Which object-oriented programming term describes this concept?

Polymorphism

Two classes are derived from the same base class and both override the same inherited method to provide their own implementation. Which term best describes this concept?

Polymorphism

A relational database table named Product contains the following fields: ID Name Price Category You need to return only the Name and Category fields sorted by Category. Which SQL statement should you use? 1. SELECT Name, Category FROM Product WHERE Category > 'Category' 2. SELECT Name, Category FROM Product 3. SELECT Name, Category FROM Product ORDER BY Category 4. SELECT * FROM Product ORDER BY Category

SELECT Name, Category FROM Product ORDER BY Category

A database table named Book has the following fields: ISBN Title DatePublished PublisherID You need to retrieve the value of the PublisherID for all records where the ISBN field begins with 0972. Which SQL statement should you use? 1. SELECT Publisher WITH ISBN > '0972' 2. SELECT PublisherID FOR ISBN > '0972' 3. SELECT PublisherID WHERE ISBN LIKE '0972%' 4. SELECT PublisherID WHERE ISBN BEGINS '0972'

SELECT PublisherID WHERE ISBN LIKE '0972%'

A database table named Suggestions contains the following fields: SuggestionID SuggestionDate SuggestionText SubmittedBy Which Structured Query Language (SQL) query will correctly retrieve only the SuggestionDate and SuggestionText fields, with the most recent suggestion listed first? 1. SELECT FROM Suggestions VALUES (SuggestionDate, SuggestionText) SORT BY SuggestionDate DESC 2. SELECT SuggestionDate, SuggestionsText FROM Suggestions ORDER BY SuggestionsDate DESC 3. SELECT FROM Suggestions VALUES (SuggestionDate, SuggestionText) ORDER BY SuggestionDate DESC 4. SELECT SuggestionDate, SuggestionsText FROM Suggestions: ORDER BY SuggestionsDate DESC

SELECT SuggestionDate, SuggestionsText FROM Suggestions ORDER BY SuggestionsDate DESC

When hosting or consuming a Web service, what is the role of Simple Object Access Protocol (SOAP)?

SOAP is a communications protocol intended for exchanging information

In the lifecycle of ASP.NET Web page, which phase follows the PreRenderComplete phase? 1. Render 2. Preinit 3. Init 4. SaveStateComplete

SaveStateComplete

You are creating a Web application that processes ticket sales for a stadium. You need to verify that a seat is available before selling a ticket. What term describes the type of programming needed to ensure that the seat is available when a request is made?

Server-side

When a user logs on to a Web site, you need to remember the user's full name as long as the user is logged on and until the user closes his or her browser. Where should you store the users full name? 1. Application state 2. View state 3. Session state 4. Control state

Session state

Notepad is an example of: 1. Web service 2. Windows service 3. Multiple-Document interface (MDI) application. 4. Single-Document interface (SDI) application.

Single-Document interface (SDI) application.

A class hierarchy is defined as follows: SqlLogger inherits from DbLogger, and DbLogger inherits from Logger. Logger defines a method named WriteToLog. DbLogger and SqlLogger override this method. You declare a variable named appLogger of type DbLogger. You create an instance of SqlLogger and assign it to appLogger variable. You then call the WriteToLog method. What happens when you call this method?

The WriteToLog method of the SqlLogger class executes.

A class member is defined with the private access modifier can only be accessed from:

The class in which it is defined

Three concrete classes named Circle, Square and Triangle all inherit from a base class named Shape. The three concrete classes provide different implementations of a method named CalculateArea, which is defined in the Shape class. Which concept is representative of polymorphism?

The different implementations of the CalculateArea method

You have the following XHTML markup: <head> <title>This is the title</title> </head> <body> <h1>This is head one</h1> <br> <h2>This is head two</h2> </body> What will cause an error in this markup?

The line break tag is not closed

A requirements document contains the following information: -A vendor has zero or more products -A product can be sold by one or more vendors. Which class or classes should you create to model the requirements and minimize the number of classes?

Vendor and Product

A data structure that stores data on a Fist-In-First-Out (FIFO) basis is called:

a queue.

A data structure that stores data on a Last-In-First-Out (LIFO) basis is called:

a stack.

You want the members of a class to be accessible only to code that is within the same class. Which access modifier should you use?

private

In software development, a model that is created during the planning and specification phase is called a:

prototype

You want a Web control event to be processed on the computer that hosts the application. Which attribute setting should you include in the Web control? 1. runat="server" 2. AutoEventWireup="true" 3. AutoEventWireup="false" 4. runat="host"

runat="server"

Internet Information Services (IIS) maintains information on:

the location of Web site's files


Related study sets

thank you for arguing chapter 14-18

View Set

Chapter 12: Head and Neck, with Basic Vision and Hearing Basics

View Set

2ND TB (CHPT 9): How Individuals, Environments, and Health Behaviors Interact: Social Cognitive Theory

View Set

Final Exam 1 Iowa Accident and Health

View Set

HIST 1001 Final Sherri Johnson, HIST 2020 Sherri Johnson Final Exam

View Set