98-361 full Q's
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?
<asp:Button runat="server"/>
you need to define a JavaScript function on a web-page. In which HTML tag should you enclose the function
<scipt>
what term is used to describe a class that serves as a starting point for new classes?
Base class
you need to model an "is a" relationship. what should you do?
Create a class that inherits from another class
in a windows forms application, which event is raised before a windows form is displayed for the first time?
Form.Load
which tool or application is used to host web sites?
Internet information services (IIS)
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?
SELECT Name, Category FROM Product ORDER BY Category
your company uses the waterfall 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.
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
how should you configure your application's project to communicate with an XML web services?
add the .wsdl file as a web referenceto your project
the finally block of an exception handler is:
always executed when the code leaves any part of the try statement. except when a StackOverflowException is thrown
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
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 possible. which data type should you use?
bool
a .NET data provider is a:
bridge between an application and a data source.
which statement about classes and structures is true?
classes are allocated on the heap, and structures are allocated on the stack
the purpose of the a data warehouse id to:
collect, consolidate, and organize data.
you need to execute a set of statements once, test for a condition, and then repeat execution only if the condition is true. which loop should you use?
do
you need to represent a number that has decimal places requiring 15 digits of precision. which numeric data types could you use?(choose 2)
double and float
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 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 code that is in the same class. which object-oriented programming term describes this concept.
encapsulation
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 cute a set of statements 10 times. which loop should you use?
for
you need to iterate through a collection of strings and print each item in the collection. you do not know how many items are in the collection. you do not want to cast the collection to IFnumerable. which loop structure should you use?
foreach
the primary purpose of internet information sevices (IIS) is to:
host ASP.NET web applications
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 per 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 do 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 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
in relational database design, the process of eliminating unnecessary duplication in the data is called:
normalization
a class named shape contains a ,method named calculate area that is declared as protected. which classes can access the calculateArea mehtod?
only the shape class and all classes that inherit from shape
the car class and the truck class bot inherit from 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
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 diplayed when the code is executed?
One kitten is white. the other kitten is black.
Exhibit 1 int x = 1; while(x<3) { X = x+1 }
3
a data structure that stores data on a last-in first-out (LIFO) basis is called:
A stack
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
what must you use to instantiate a class
constructor
what term best describes a procedure that is automatically invoked when an object is first instantiated?
constructor
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
what information does a database connection string contain?
database server, database, and credentials
a class constructor has no paramaters. what type of constructor is this?
default
in the code shown in the exhibit, the keywords public, protected, and private:
determine the accessibility of the class and its members to code within other classes.
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 salutation be?
"hey Sis!"
you are the lead developer for an IT consulting firm. the firm has a new governmental contact foe 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 your team 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? To answer, drag the most appropriate team member to each application lifecycle management (ALM) stage. A team member may be assigned once, more than once, or not at all. 1.requirement 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 the 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 employee last name. which six T-SQL statements should you use in sequence? to answer, move the appropriate statements form the list of possible statements to the answer area and arrange them in the correct order. 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# 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? to answer, move the appropriate actions from the list of possible actions to the answer area and arrange them in the correct order -give the .publishsettings file for the website to the client -select the debug configuration profile -deliver the package to the client -choose the web deploy package publish method -select the release configuration profile -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 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 I) { width = w; lenght = 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 Reactangle class.
1.no 2.yes 3.yes
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
what must you use as the condition of an if statement?
a Boolean expression
when a single inheritance model is used:
a class can inherit from only one base class
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 lifecycle.
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? to answer drag the appropriate decision structures to each program requirement. a decision structure may be used once, more than once, or not at all.
if = action if expression evaluates to true if else = action if expression evaluates to true or false switch = efficient multi-way branching while = action until expression evaluates to false.
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? to answer, drag the most appropriate web technology to each business requirement. A web technology may be used once, more than once, or not at all 1. Form input validation 2.video without a plug-in 3.responsive design 4.secure connection
1. javascript 2.HTML 3.CSS 4.HTTPS
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 uses 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 windows 10 workstation. you are developing a windows service application that writes diagnostics 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? to answer, move the appropriate actions from the list of possible actions to the answer area and arrange them in the correct order. 1.Run InstallUtil.exe 2.press the f5 key from within visual studio 3.open the developer command prompt for visual studio 2015 as 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 administrator 2.navigate to the directory where the compiled executable exists 3.Run InstallUtil.exe
Exhibit 2 int i + 0; int x=0; for(I=1; I<10; I = I+3) { X = I*2 }
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 yo perform these operations?
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 use to change the background color of all <div> elements on a web page?
Cascading style sheet (CSS)
you open a command prompt and enter ftp. you are then presented with 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 class contains a pubic method named ComputeSalesTax that computes the sales tax based on specified a 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
which statement about internet information services (IIS) is true?
IIS must be configured on the computer that hosts a web application.
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 create a console application. which method must you implement?
Main
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
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?
Page_Load
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 thr ISBN field begins with 0972 which SQL statement should you use?
SELECT PublisherID WHERE ISBN LIKE '0972%'
A database named Suggestions contains the following fields SuggestionID SuggestionDate SuggestionText SuggestionDy which structured query language (SQL) query will correctly retrieve only the suggestioDate and suggestionText fields. with the most recent suggestion listed first?
SELECT SuggestionDate,SuggestionText FROM Suggestions ORDER BY SuggestionDate DESC
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
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 an ASP.NET web page . which phase follows the PreRenderComplete phase?
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 user's full name?
Session State
you are creating a web application for someone who sews 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 the classes?
ShoppingCart class, Garment class
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
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.
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
a data structure that stores data on a first-In First-Out (FIFO) basis is called.
a queue
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 is the purpose of a virtual directory in Microsoft internet information services (IIS)?
it acts as a logical directory to web browsers for location web resources
which of the following is a possible advantage of creating an index on a SQL server database table?
it allows queries to execute more quickly
which of the following characteristics does a console application have?
it can run with minimal user interaction without mouse input
which of the following is a characteristic of a Microsoft windows service
it can start automatically and run in the background until the operating system is shut down
what is 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?
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 source name (DSN)?
it stores and centralizes connection information for a data source.
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
a web application requires changes after it has been deployed. what term is used to describe this process?
maintenance
which of the following is a relational database management system (RDBMS)?
microsoft SQL Server
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, Wheel number = 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
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 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
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?
runat="server"
which communication protocol is used to describe messages in a web service?
simple object access protocol (SOAP)
notepad is an example of a:
single-document interface (SDI) application
a class hierarchy is defined as follows: SqlLogger inherits from DbLogger inherits from logger. logger defines a method named WriteTolog. DbLogger and SqlOverride this method. you declare a variable named appLogger of type DbLogger. you create an instance of SqlLogger and assign it to the appLogger of type DbLogger. you create an instance of SqlLogger and assign it to the 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 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.
internet information services (IIS) maintains information on:
the location of web sites's files
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?
the shape instance is created on the heap. the stack stores a pointer tho the shape instance
what is the benefit of sorted 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. what type of application is it?
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
windows service
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 crreate
windows-forms