csa

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A website manager is setting up a website to host on a web server named webserver1 in a shared directory named toystoreprod for the website: http://thetoystore.net. Using the dropdown arrows, choose the virtual directories needed to create the wanted URLs for the website.

/thetoystoreprod /toystoreprod/images

What is the locationX of player2?

0

Evaluate the following code. Line numbers are for reference only: 1 static class BlueShirt { 2 public static double value = 39.99; 3 public static string BlueShirtMessage) { 4 return "This shirt is new to our line." 5 6 } 7 public class NewShirts 8 { 9 static void Main(String[] args) 10 { 11 12 Console.WriteLine($"The Blue Shirt costs {BlueShirt.value}"); BlueShirt blueShirt1 = new BlueShirt(); 13 14 } Which line number in this code will cause an error?

12

In which normal form is this table?

1NF

When building a webpage, which tag goes immediately after the <!DOCTYPE> declaration?

<html>

You are working with several classes. Instructions: For each of the following statements, select Yes if the statement is true and No if it is false.

A class that inherits functionality from a base class is called a derived class.

For each statement regarding foreign keys and referential integrity, indicate a Yes if the statement is true and No if the statement is false.

A foreign key represents the many side of a one-to-many relationship.

What is displayed when you display a web .api web service using a web browser?

A listing of methods that are available with the web service

For each of the following statements regarding primary keys in a database table, indicate Yes if the statement is true and No if the statement is false.

A primary key ensures each record in a table is unique. A primary key can consist of multiple fields.

For each statement regarding transactions, select Yes if the statement is true and No if the statement is false.

A transaction combines multiple statements into one atomic action. A transaction can be rolled back before it is committed.

What can be done in the Developer Tools portion of a web browser? (Choose two)

A webpage's CSS can be examined. Breakpoints can be set for JavaScript code.

Which method of software development involves breaking development up into phases, constantly collaborating with stakeholders, and continuous improvement at every stage?

Agile

For each statement regarding transactions, indicate Yes if the statement is true and No if the statement is false.

An Exclusive Lock helps provide concurrency to transactions. When a transaction is committed, all changes made within the transaction take place.

The following class to calculate the area of a room has been created as follows: class AreaRect { public double width; public double height; public double getArea() { return width * height } What line of code is needed to instantiate an instance of the AreaRect class with the name, areaRect1?

AreaRect areaRect1 = new AreaRect);

A SQL database developer is creating a table with the following code: CREATE TABLE Recruit ( RecruitID int, LastName varchar (30), FirstName varchar (25), InterviewDate ) The developer wants to make sure the interview date is scheduled for a future date. What code should be added to the InterviewDate field to accomplish this need?

CHECK (InterviewDate>=GETDATE())

A developer for a shoe store database wants to build a stored procedure to retrieve shoes from the Shoes table according to the ShoeBrand an employee specifies. Which SQL statement is the correct statement for creating this stored procedure?

CREATE PROCEDURE selectShoes @brand nvarchar(20) AS SELECT * FROM Shoes WHERE ShoeBrand = @brand;

A developer needs to build a query that updates a list of products row-by-row. What should the developer build to accomplish this need?

CURSOR

A developer is thinking of using Frames on webpages to make content easier to update on those webpages. What are three major risks of using Frames on webpages?

Clickjacking Cross-frame scripting Malicious code injections

You are writing a web application that processes car rentals. Which type of programming should you use to display certain items when only dealing with visuals on the web application?

Client-side

A new developer wants to copy a GitHub repository locally so that the developer can work with the files within the repository. What should the developer do with the repository?

Clone the repository

For each statement on entity frameworks, indicate whether the statement applies to using a code-first approach or a database-first approach.

Code first - A database can be created based on entity classes and configurations A database model can be updated through migration.

In programming, what type of table is this table?

Decision table

Coding in which considerations are made for unexpected situations and to where assumptions are eliminated in code is known as which type of coding?

Defensive coding

A developer wants to create an event to have an object signal an action's occurrence. What does the developer need to create before creating the event?

Delegate

A new developer is learning the importance of planning an app before sitting down to write code for the app. Which type of shape on a flowchart represents a decision point within the logic of an app?

Diamond

You are developing an app which needs to store data in key value pairs, similar to that of a JSON file. What data structure should you use to build the file that will store this data?

Dictionary

A developer is building a desktop app that needs to run on multiple platforms on multiple operating systems. How should the developer build and distribute the app?

Distribute the app in a container

A database developer needs to build a NoSQL database containing information on users. The information varies greatly by users with many different users having many different characteristics. Which type of NoSQL database should the developer build?

Document

A new database designer is learning about database planning, specifically ERDs. For each of the following statements regarding ERDs, indicate Yes if the

Entities represent tables in a database. Attributes represent entity properties.

For each of the following statements regarding memory heaps, select Yes if the statement is true and No if it is false.

For memory heaps, data can be stored and removed in any order. Memory allocation is dynamic in nature.

For each statement regarding generic classes in code, indicate a Yes if the statement is true and a No if the statement is false.

Generic classes have operations that are not specific to a data type. Generic classes can have generic methods.

Which software tool provides Internet hosting for software development and version control and the ability to check out and check in files.

GitHub

A developer wants to make sure an output document from an app is not altered in any way, shape, or form as it goes from the app to a destination. Which form of encryption is used to encrypt digital signatures?

Hashing

Which two keywords are DML keyword in SQL? (Choose two)

INSERT DELETE

You have a character class in your game. You will need several obiects to be able to see the characters type in your code. What should you code for the character class so that other objects can see the protected information?

Implement setters and getters for the character type

Look at this database table and the order details it holds: OrderDetaillD Which two fields need to be broken out into another table to make this table fit 3NF normalization?

ItemID Price

"name": "Stingray" "color": "Magenta" } is an example of which type of code?

JSON

{ "name": "Stingray" "color": "Magenta" } is an example of which type of code?

JSON

A web programmer needs to have a portion of a webpage update with the current time any time the webpage is displayed or refreshed. Which client-side language should the programmer use for this portion of the webpage?

JavaScript

Which two types of databases are prominent in the NoSQL family of databases? (Choose two)

Key-value databases Document databases

Which database access method is being employed in this code example to retrieve data from a products table in a database? int [] prodNums = {1, 5, 6, 11}; IEnumberable<int> getProds = from prodNum in prodNums where prodNum > 5 select prodNum;

LINQ

A new developer is learning about searching algorithms. Use the dropdown arrows to match the searching algorithm to its description.

Linear Binary

A web developer wants to store information on a client device without having to use cookies and have the data set to an expiration date. What form of storage should the developer use?

Local storage

Evaluate the following code: class Program { private static int WriteToConsole (int NumWrites) for (int i = NumWrites; i < 8; i = WriteToConsole(i + 1)) Console.WriteLine("Looped {0} times.", i); return NumWrites; static void Main () { WriteToConsole(6); } } What does the console show after running this code?

Looped 6 times. Looped 7 times. Looped 7 times.

Using drag and drop, match each architectural pattern to a characteristic describing that pattern.

MVC - The controller is the entry point for an application MVVM - The view is the entry point for an application. SPA - An interface can be updated without a full-page request being sent to a web server.

Which architectural pattern facilitates separating developing the GUI of an app from developing the business logic of the app in such a way as to ensure the view is not dependent on a specific model platform?

MWVM

A developer pulls a branch in GitHub and notices a message stating that there are conflicts that must be resolved. Which type of conflict can be resolved on GitHub using the command line?

Merge conflicts

You have a base class named Champion in your game. The Champion class has a protected property named level and a friend property named attackSpeed. In the same project, you also have a class named Minion. For each of the following statements, select Yes if the statement is true and No if it is false.

Methods in the in Champion class can access the level propertv. Methods in the Minion class can access the attackSpeed propert.

A developer needs a token-based authorization mechanism for REST Web API. What should the developer use to build that token?

OAuth

Evaluate the following code: class Program § static int Arealint h) { int area = h * h; return area; } static int Area(int h, int w) { int area = h * W; return area; } static void Main(String[] args) int areal = Area (5); Console.WriteLine ("The area of the square is "+ areal); int area2 = Area (5,7); Console. WriteLine("The area of the rectangle is " + area2); } Which aspect of polymorphism is being used in this code?

Overloading

A web developer wants to make sure information on a form, when submitted, is sent to a web server, with each instance creating a resource on the server. Which HTTP method should be invoked to accomplish this task?

POST

In the context of ASP.NET webpages, what stage needs to occur before an actual page life cycle begins?

Page request

In connection pooling, what maintains ownership of the physical connection and manages database connections?

Pooler

A JavaScript developer wants a webpage to display one block of text when a test in asynchronous code is successful and another block of text when a test fails. The developer has built this code so far: let myTest = new //keyword (function (myTestSuccess, myTestFailure) < let x = 0; if ( = 5) { myTestSuccess ("OK"); } else { myTestFailure ("Error"); } }); What kevword should replace the //kevword comment to fulfill the need for this code?

Promise

What is used within a computer to store temporary instructions within an app?

RAM

What type of data format is present in a SQL Server database?

Relational

A developing team wants to use SDLC management for a group of app container-based projects. What are the first two steps in SDLC management?

Requirement analysis Planning and design

Which architectural pattern features a dynamic rewrite of a web page from a web server rather than having a web browser reload a web page to get new content?

SPA

For a business hosting its own web server, in what portion of the network should the web server be placed?

Screened subnet

A new developer is looking for ways in which to sort data efficiently. Drag each sorting algorithm to its definition.

Selection sort - The smallest element is saved as a variable, and then each element gets a position within a list. Bubble sort - The highest element is placed at the end of a dataset and then each subsequently lower element is placed on the list. Merge sort - Datasets are divided into smaller datasets, sorted, and then joined. Quick sort - Elements are pivoted into a position within the sort.

You are writing a Web application that processes car rentals. Which type of programming should you use to make sure that the car is still available when the request is made and that data requests are not duplicated on the server hosting the app?

Server-side

A developer wants to store a user's identity on a web server while that user is inside a web application. The developer has started this code example: protected void btSubmit_Click(object sender, EventArgs e) { I/Indicate state["UserName"] = txtName. Text; Response.Redirect("Home.aspx"); } What word is needed to replace the Indicate state comment to ensure that the user's identity is stored while in the web application?

Session

A new programmer is trying to use the most efficient data structure given a situation. For each statement regarding data structures, indicate Yes if the statement is true and No if the statement is false.

Stacks use the LIFO method on data elements. Queues remove elements from the beginning of their structures.

For each statement on the concepts on garbage collection, indicate Yes if the statement is true and No if the statement is false.

The C.Collect method invokes garbage collection.

A developer is building an app to where the app and data need to be centrally managed and the interface should be web-based. Given these conditions, how should the app be built and distributed?

The app should be hosted in the cloud.

• For each statement on allocation of memory for data types, indicate Yes if the statement is true and No if the statement is false.

The char data type uses 1 byte of memory. The integer data type uses 4 bytes of memory.

Evaluate the following code: class Boat { public string brand = "Speed"; public void horn() { Console.WriteLine "Boom"); } class Sailboat: Boat public string sailColor = "White"; } { class Program static void Main(string[] args) Sailboat mySailboat = new Sailboat (); Boat myBoat = new Boat (); } } For each statement about the code, indicate Yes if the statement is true and No if the statement is false.

The horn method can be called on the mySailboat obiect. The sailColor string can be invoked on the mySailboat object.

Evaluate the following code: int i =0; while (i <= 8) { Console.WriteLine(i); it+; }

The output from the code will be 0 1 2 3 4 5 6 7 8. i++ adds 1 to i on each iteration through the loop.

For each of the following statements, select Yes if the statement is true and No if it is false. LevelUp

The speed variable can be used in the Character class and any class that inherits from the Character class.

A developer needs to have records deleted from an assets table copied to a backup table when these deletions occur. What should the developer create to enforce this business rule?

Trigger

What block of a try-catch-finally loop should include the code that may throw an exception?

Try

Which type of test uses the Assert. Fail() method to fail a test that is incomplete or not implemented?

Unit test

What are two mitigation techniques that can be implemented on a website to help prevent CSRF attacks?

Use same-site cookies Use anti-forgery tokens

For each statement regarding the implementation and deployment phases of SDLC management, indicate a Yes if the statement is true and a No if the statement is false.

User training is done during the Implementation phase.

A developer has several calculation methods within a class that need to be used among several web apps. What should the developer create so that other developers can easily use these methods within their apps.

Web service

In testing, you are testing the internal workings of the application, not functionality or acceptance.

White box

Evaluate the following code example and then indicate a Yes for each true statement regarding the code and its intent and No for each false statement regarding the code and its intent. function loadDoc () { var xhttp = new XMLHttpRequest () ; xhttp.onreadystatechange = function () { if (this.readyState == 3 && this.status == 200) { document.getElementById("result").innerHTML = this.responseText; }; xhttp. open ("GET", "demo.txt", true); xhttp. send ();

XHR (XML HttpRequest) is part of AJAX (Asynchronous JavaScript and XML).The status of 200 indicates a request has succeeded.

What kind of message is used to invoke a web service from an app?

XML

A new web developer wants to add an event handler for this button, which will run a function. The button is coded as follows: btn.//need event handler("click",calcArea; What code needs to replace the //need event handler comment to have the button run the calcArea function when clicked?

addEventListener

Which statement is the correct syntax for creating a class named Shirt with a string variable named, material, set to cotton?

class Shirt { string material = "cotton"; }

Some programming languages support the eval expression. For which of the following expressions is the eval function typically used?

eval("sum([4,6,91)")

A developer needs to run a loop a specific number of times. Which type of loop should the developer construct?

for

A customer service department wants to give rewards to their best customers. You are building an app to make this happen and the requirements for customers to earn bonuses are as follows: Gold customers get $50 in bonus money Silver customers get $25 in bonus money Bronze customers get $10 in bonus money Which two starters for pseudocode examples best fulfill the requirements of the app?

if/else if switch

A programmer wants to create an object that cannot be changed after it has been created. This is an example of which type of object?

immutable

A developer wants to create default messages to use within an app, using abstract methods. Which part of polymorphism would best suit this app requirement?

interface

A website manager is looking to host and publish a web application. Using the dropdown lists, answer each question regarding publishing applications?

on the server that hosts create and host web applications

You are designing a class, and your members need to be accessible only within its class or by derived class instances. What access modifier should you use when declaring the members of your class and to encapsulate the members within the class?

protected

A function to retrieve the total value of inventory for a product is written as follows: CREATE FUNCTION totalValue (AProductID int) RETURNS INT AS BEGIN DECLARE total decimal; SELECT @total = UnitsInStock * Price FROM Inventory WHERE ProductID = @ProductID RETURN @total END; Which type of function is in use in this example?

scalar

A developer is working on this partial code example to display an error message if someone tries to open a read-only file for writing purposes: if (!textFile.CanWrite) / need error message here to say "The file cannot be read-only" Choose the correct line of code to display the wanted error message.

throw new InvalidOperationException("The file cannot be read-only");

A developer is testing the following code: class Program { static void Main(string[] args) { int x=15; int y=3; int z; Console.Write(x/y); Console. Write("Thank you for using this app."); } } The developer wants to display an error message if a person attempts to divide by zero and wants to always display the thank you message. What type of block should the developer set up for this code?

try-catch-finally block

A database developer wants to speed up searches on a LocationID field in a table named Inventory. LocationID is not the primary key of the Inventory table. Choose the code snippet that will create the proper index, named NDX_Inventory_LocationID, on the table.

© CREATE NONCLUSTERED INDEX NDX_ Inventory_ Location|D ON Inventory (LocationID);

In your Product table you have the following fields: id productName productPrice You want to retrieve all the data from Product. You also want the result to be in alphabetical order according to productName and then id. Which statement is correct?

© SELECT * FROM Product ORDER BY productName, id

What will be displaved in the console screen? fire

• Child... Base...

In your Order table you have the following fields: id datePlaced dateCompleted amount Which statement will retrieve only the id, datePlaced, and amount?

• SELECT id, datePlaced, amount FROM Order

Which two statements are true regarding the check-in and check-out features within GitHub?

• The Check-out feature switches a person from one branch to another. The Check-in feature uploads code to the main branch repository.

Which statement about this code is true? pants

• The size method can be overridden when a class is inherited from the Pants class.

A business has moved one of its offices and wants to replace the old location, Fremont, with its new location, San Jose for all its inventory. Which SQL statement accomplishes that task?

• UPDATE Inventory SET Location = 'San Jose' WHERE Location = 'Fremont'

A new database developer is looking at a table containing product information and wants to know which field or fields should be indexed from that table. What should the developer find out about the table to help determine what should be indexed?

• Whether a field is used in criteria for queries

You are writing a web application and want to save a person's first name on the person's client device and have the first name appear until December 31, 2022 whenever the person visits the web app. Which code example will properly store the cookie and its expiration date?

• document.cookie = "firstName-Stacy; expires= Sat, 31 Dec 2022 12:00:00 UTC";

You need to create this background by using CSS:

• radial-gradient (white, black);


Set pelajaran terkait

ANTH 2280 Medical Anthropology Final Exam

View Set

Maternity and Child Bearing Test #1

View Set

(Chapter 7) - The Courts and the Judiciary

View Set

NSG 3660 Optional Prep U: Infection Exam 1

View Set

Ecology and the Environment: L14

View Set