MIST 4630 Piercy Final Study Guide

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Suppose that a user enters the value 21 into a textbox called age. This value is sent along with the request to a JSP file. When the value is retrieved using the request.getParameter("age") method, what is the default data type for this method? a. request b. String c. text d. int

b. String

What does CSS stand for? a. Cascading Style Sheets b. Computer Style Sheets c. Color, Shape, Style d. Creative Style Sheets

a. Cascading Style Sheets

The AWS compute service that lets you rent virtual computers on which to run their own computer applications is known as ___________________. a. Elastic Compute Cloud (EC2) b. Flexible Tenant Processor (ftp) c. Simple Storage Solution (S3) d. Computer Processing Rental (CPR)

a. Elastic Compute Cloud (EC2)

Which of the following are created when the Web Server receives a request to hold any data that is sent from the client? a. Response Object b. Request Object c. Data Object d. Session Object

b. Request Object

For our purposes, Apache Tomcat serves as the Web Server component for testing our applications, locally. True / False

True

What does HTML stand for? a. Hyperlinks and Text Markup Language b. Hypertext Markup Language c. Home Tool Markup Language

b. Hypertext Markup Language

<%@ ... %>

Used for page to include a URL file

<%= ... %>

Used for single Java EXPRESSION to display RESULT

Which of the following is a risk or challenge that needs to be addressed when considering a move to Cloud Computing? (Select all that apply) - Potential security vulnerabilities - Reduced operational governance control - Limited portability between cloud providers - Regulatory and legal issues across multiple regions

- Potential security vulnerabilities - Reduced operational governance control - Limited portability between cloud providers - Regulatory and legal issues across multiple regions

After you set up an EC2 instance, you can access and manage it in which of the following ways? (Select all that apply) - Using the AWS Console - Programmatically via an API - Using commands from your computer terminal - Using remote viewing (RV)

- Using the AWS Console - Programmatically via an API - Using commands from your computer terminal

In order from inside to the outside, what are the components of the CSS box model? 1. content 2. padding 3. border 4. margin

1. content 2. padding 3. border 4. margin

How many keys do you need to include when setting up your AWS credentials in the Eclipse AWS Toolkit? 2 1 4 3

2

Which of the following delimiters in a JSP file signals to the server that some Java code is included in the file? <%...%> <...> </.../> <!-- ... -->

<%...%>

Which of the following delimiters in a JSP file signals to the server that that a Java expression will be printed to the response object? <% ... %> <!-- ... --> <%= ... %> </.../>

<%= ... %>

Which of the following statements can be used to connect to a local MySQL database named test? A) Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test"); B) Connection connection = Request.getConnection("mysql:jdbc://localhost/test"); C) Connection connection = DriverManager.getConnection(jdbc:mysql://localhost/test); D) Connection connection = DriverManager.connect("jdbc:mysql://localhost/test");

A) Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test");

Which of the following statements can be used to store a value that will persist from the time it is stored until a user is no longer actively visiting a site? A) HttpSession session = request.getSession(); session.setAttribute("student", student); B) request.setAttribute("student", student); C) HttpSession request = request.getRequest(); request.setAttribute("student", student); D) HttpSession session = session.setAttribute("student", student);

A) HttpSession session = request.getSession(); session.setAttribute("student", student);

JDBC stands for __________________. A) Java Database Connectivity B) Java Data Backup Connector C) Java Data Browser Code D) Java Database Code

A) Java Database Connectivity

Assume that you have the following statement:PreparedStatement ps = connection.prepareStatement("select firstName, mi, lastName from Student where firstName = ? and lastName = ?"; To set a value John to the first parameter, use _________. A) ps.setString(1, "John"); B) preparedStatement.setString(1, "John""); C) ps.setString(0, "John"); D) preparedStatement.setString(0, "John");

A) ps.setString(1, "John");

Which of the following statements will store an object called student temporarily so that it can be passed to and used by a view component? The object will no longer be available once the response is sent by the server. A) request.setAttribute("student", student); B) response.getAttribute("student"); C) session.setAttribute("student", student); D) cookie.setAttribute("student", student);.

A) request.setAttribute("student", student);

Which of the following state management techniques is useful for storing small amounts of data on the client side so that it can be retreived by the server during a later session? A) storing data as a cookie B) storing data as session attributes C) storing data as request attributes D) storing data in a database

A) storing data as a cookie

Given the following code:PreparedStatement ps = connection.prepareStatement("select firstName, mi, lastName from Student where lastName = ?";ps.setString(1, "Smith");ResultSet resultSet = ps.executeQuery();System.out.println(resultSet.getString(1)); What would be the result? A) resultSet.getString(1) returns the mi field in the result set. B) The program will have a runtime error, because the cursor in resultSet does not point to a row. You must use resultSet.next() to move the cursor to the first row in the result set. Subsequently, resultSet.next() moves the cursor to the next row in the result set. C) resultSet.getString(1) returns the firstName field in the result set. D) If the SQL SELECT statement returns no result, resultSet is null.

B) The program will have a runtime error, because the cursor in resultSet does not point to a row. You must use resultSet.next() to move the cursor to the first row in the result set. Subsequently, resultSet.next() moves the cursor to the next row in the result set.

Which of the following Eclipse Dynamic Web Project folders is the best place to import the Connector/J jar file? A) WebContent/Web-Inf B) WebContent/Web-Inf/lib C) WebContent D) src

B) WebContent/Web-Inf/lib

If a prepared statement preparedStatement is a SQL SELECT statement, you execute the statement using _________. A) preparedStatement.executeUpdate(); B) preparedStatement.executeQuery(); C) preparedStatement.execute(); D) preparedStatement.query();

B) preparedStatement.executeQuery();

Assume that a database contains several records for the last name of Smith. Analyze the following code:PreparedStatement ps = connection.prepareStatement("select firstName, mi, lastName from Student where lastName = ?";ps.setString(1, "Smith");ResultSet resultSet = ps.executeQuery();resultSet.next();System.out.println(resultSet.getString(1)); A) The program will have a runtime error, because the cursor in resultSet does not point to a row. You must use resultSet.next() to move the cursor to the first row in the result set. Subsequently, resultSet.next() moves the cursor to the next row in the result set. B) resultSet.getString(1) returns the firstName field in the result set. C) If the SQL SELECT statement returns no result, resultSet is null. D) resultSet.getString(1) returns the mi field in the result set.

B) resultSet.getString(1) returns the firstName field in the result set.

Which of the following state management techniques is best for storing large amounts of data that will persist for a relatively long timeframe? Question 4 options: A) storing data as session attributes B) storing data in a database C) storing data as a cookie D) storing data as request attributes

B) storing data in a database

In a relational data model, ________ provides the means for accessing and manipulating data. A) Language B) Integrity C) SQL D) Structure

C) SQL

Which of the following statements will retrieve an object called student that has been stored temporarily (until the response is sent) so that it can be used to create the view? Question 7 options: A) Student student = request.getAttribute("student"); B) request.setAttribute("student", student); C) Student student = (Student) request.getAttribute("student"); D) request.setAttribute("student", student);

C) Student student = (Student) request.getAttribute("student");

Which of the following servlet methods is the best place to include code that will retrieve servlet initialization parameters? Question 13 options: A) doGet() B) doPost() C) init() D) doInit()

C) init()

A database URL for a MySQL database named test on host panda.armstrong.edu is ________. Question 6 options: A) jdbc.mysql.//panda.armstrong.edu/test B) jdbc.mysql:///panda.armstrong.edu/test C) jdbc:mysql://panda.armstrong.edu/test D) jdbc:mysql:/panda.armstrong.edu/test

C) jdbc:mysql://panda.armstrong.edu/test

Which of the following state management techniques is useful for passing data between components only during one request/response event? A) storing data in a database B) storing data as a cookie C) storing data as request attributes D) storing data as session attributes

C) storing data as request attributes

Which of the following statements will retrieve a servlet initialization paramater and store it as a serlvet instance variable? Question 14 options: A) this.title = servlet.getInitParameter("Title"); B) this.title = request.getInitParameter("Title"); C) this.title = config.getInitParameter("Title"); D) this.title = config.getParameter("Title");

C) this.title = config.getInitParameter("Title");

Which of the following is the correct CSS syntax for setting the background of the page black? Question 15 options: A) body: color = black; B) { body; color: black; } C) { body: background-color = black; } D) body { background-color: black; }

D) body { background-color: black; }

Which of the following statements will allow us to access a session attribute and store it as a local variable? A) Student student = request.getAttribute("student"); B) Student student = session.getAttribute("student"); C) Student student = (Student) request.getAttribute("student"); D) Student student = (Student) session.getAttribute("student");

D) Student student = (Student) session.getAttribute("student");

A __________ is a stand-alone, software component that enables a Java application to interact with a database. A) MySql connector B) JDBC C) DB ECU D) database driver

D) database driver

Which of the following state management techniques is useful for keeping data persistent as long as a user keeps a session open to our application? A) storing data as a cookie B) storing data as request attributes C) storing data in a database D) storing data as session attributes

D) storing data as session attributes

Which of the following AWS services allows you to rent virtual computers on which to run your own computer applications? S3 EC2 SageMaker RDS

EC2

Which of the following are considered to be benefits of using EC2? (Select all that apply) Question 3 options: ELASTIC WEB-SCALE COMPUTING FLEXIBLE CLOUD HOSTING SERVICES INTEGRATED SECURE

ELASTIC WEB-SCALE COMPUTING FLEXIBLE CLOUD HOSTING SERVICES INTEGRATED SECURE

Which of the following AWS services allows you to deploy your dynamic applications without your having to manually set up servers or storage? S3 EC2 Elastic Beanstalk R2D2

Elastic Beanstalk

After starting EC2 instances or deploying to Elastic Beanstalk, you can leave those components running as long as you want without using AWS credit or incurring a charge. True / False

False

The request and response objects need to be declared before we can use them within our JSP code. True / False

False

The request and response objects persist as long as the user continues to send requests to the server side application. True / False

False

To store a cookie on the client, add it to the request object and, to retrieve a cookie from the client, you retrieve it off of the response object. True / False

False

True or False. The following HTML tags will create a table with 3 rows of two columns each. <table> <tr> <td> a </td> <td> b </td> </tr> <tr> <td> c </td> <td> d </td> </tr> </table>

False

Cloud computing is often divided into three levels of services - infrastructure-as-a-service (IAAS), platform-as-a-service (PAAS), and software-as-a-service (SAAS). Which of these levels of service deals primarily with the networks, servers and storage? SAAS IAAS PAAS

IAAS

<% ... %>

Java statements inside of HTML

Cloud computing is often divided into three levels of services - infrastructure-as-a-service (IAAS), platform-as-a-service (PAAS), and software-as-a-service (SAAS). Which of these levels of service deals primarily adds operating systems and middleware on top of servers network and storage? IAAS SAAS PAAS

PAAS

@WebServlet

Request URL to configure URL to servlet

Which of the following AWS services allows you simply to store and retrieve any amount of data at any time, from anywhere on the web? SageMaker RDS EC2 S3

S3

Which of the following AWS services will you use for posting and hosting your static web pages for the module assignment? RDS SageMaker EC2 S3

S3

Cloud computing is often divided into three levels of services - infrastructure-as-a-service (IAAS), platform-as-a-service (PAAS), and software-as-a-service (SAAS). Which of these levels of service allows you to run applications and work with data that is stored in the cloud? SAAS IAAS PAAS

SAAS

HTML CSS JavaScript

Structure Style Behavior

A JSP is capable of acting as both the controller and the view component of the MVC design pattern, but it is often used just to handle the view. True / False

True

A servlet is capable of handling both the controller and view concerns but it is best at handling the controller concern. True / False

True

Cloud services are generally considered to have increased availability and reliability than other types of IT infrastructure. True / False

True

Multiple cookies can be carried at one time by a request. True / False

True

Platform-as-a-Service provides more than just infrastructure by adding middleware, development tools, business intelligence (BI) services, database management systems, and more. True / False

True

The request and response objects are available to the doGet() and doPost() methods because they are passed as parameters for these methods by the Web server. True / False

True

We can set the initial state of a servlet using initialization parameters. True / False

True

When setting up an EC2 instance you should select the region. A region is a geographic area that contains one or more data centers with the hardware where your instance will "live." True/ False

True

With the MVC design pattern, it is possible to include multiple JSPs to provide different view options. True / False

True

You can think of Compute-as-a-Service (CaaS) as being the subset of Platform-as-a-Service (PaaS) that has a focus on computer processing. True / False

True

Which of the following CSS selectors can be used to select all elements with the class "intro"? a. .intro {...} b. #intro {...} c. * {...} d. class intro {...}

a. .intro {...}

Which of the following HTML tags makes text content a heading with the largest size? a. <h1>...</h1> b. <h6>...</h6> c. <heading>...</heading> d. <p>...</p>

a. <h1>...</h1>

Which of the following is the correct HTML for inserting an image? a. <img src="image.gif" alt="MyImage"> b. <img href="image.gif" alt="MyImage"> c. <img alt="MyImage">image.gif</img> d. <image src="image.gif" alt="MyImage">

a. <img src="image.gif" alt="MyImage">

With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using plain old java objects (POJOs)? a. Modeling our business components b. Handle client-side behavior. c. Create the appropriate response to send to the client. d. Receive a request and control which components act on the request.

a. Modeling our business components

Which of the following are created when the Web Server receives a request to hold the results that are to be sent back to the client? a. Response Object b. Request Object c. Data Object d. Session Object

a. Response Object

What is the name of the organization that develops the primary web standards of HTML and CSS? a. The World Wide Consortium (W3C) b. Google c. CERN d. Defense Advanced Research Project (DARPA)

a. The World Wide Consortium (W3C)

When setting up a servlet, we need to create a ___________ to the servlet that will be used to set up any hyperlinks or form actions so that they will send a request for the servlet. a. URL mapping b. hyperlink c. action submission d. method

a. URL mapping

What is the name of the servlet method that will execute when the following html form is received? <form name="guessForm" action="guess" method="post" > <label> First Name: </label> <input type="text" name="fName" value="" /><br /> <input type="submit" name="guessButton" value="Go" /> </form> a. doPost() b. submit() c. doGet() d. setName()

a. doPost()

When you submit a form using the HTTP _________ method, any data in the form is concatenated to the URL shown in the browser a. get b. post c. .getParameter() d. .getAttribute()

a. get

Which of the following CSS will add a background color for all <h1> elements? a. h1 {background-color:#FFFFFF;} b. h1.all {background-color:#FFFFFF;} c. h1#all {background-color:#FFFFFF;} d. all.h1 {background-color:#FFFFFF;}

a. h1 {background-color:#FFFFFF;}

When setting up an EC2 instance, you must specify a template that contains a software configuration for your instance. Which of the following is the AWS name for such a template. a. Automated Machine Template (AMT) b. Amazon Machine Image (AMI) c. Amazon Processor Plan (APP) d. Amazon Compute Design Controller (ACDC)

b. Amazon Machine Image (AMI)

With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using JSPs? a. Modeling our business components b. Create the appropriate response to send to the client. c. Handle client-side behavior. d. Receive a request and control which components act on the request.

b. Create the appropriate response to send to the client.

Which of the following Java statements can be used to retreive the data submitted by the textbox on this form as a String? <form name="guessForm" action="guess" method="get" > <label> First Name: </label> <input type="text" name="fName" value="" /><br /> <input type="submit" name="guessButton" value="Go" /> </form> a. String fName = request.getString("text"); b. String fName = request.getParameter("fName"); c. String fName = request.getParameter("text"); d. String fName = request.getString("fName");

b. String fName = request.getParameter("fName");

When adding a servlet to an Eclipse Dynamic Web Project, where is the best place to store the servlet within the project? a. Java Libraries b. a package in the src folder c. Web Content folder d. directly in the src folder

b. a package in the src folder

AWS __________ consist of one or more discrete data centers, each with redundant power, networking and connectivity, housed in separate facilities. a. regions b. availability zones c. edge locations d. spot instances

b. availability zones

How do you display a border like this:The top border = 10 pixelsThe bottom border = 5 pixelsThe left border = 20 pixelsThe right border = 1pixel? a. border-width:10px 5px 20px 1px; b. border-width:10px 1px 5px 20px; c. border:10px 1px 5px 20px; d. border:10px 5px 20px 1px;

b. border-width:10px 1px 5px 20px;

The allocating or releasing of more IT resources that are of the same type as current resources is referred to as ___________. a. on-premise scaling b. horizontal scaling c. service scaling d. vertical scaling

b. horizontal scaling

Which of the following is a correct tag for connected an HTML page to an external style sheet? a. <style type="text/css" href="styles.css"> b. <stylesheet>styles.css</stylesheet> c. <link ref="stylesheet" type="text/css" href="styles.css">

c. <link ref="stylesheet" type="text/css" href="styles.css">

What is the name of the portal that you should use to access the AWS Cloud services for your work in this course? a. Cloud Labs Offering Undergraduate Development b. Amazon Web Portal c. AWS Educate d. MyAWS

c. AWS Educate

With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using Java Servlets? a. Modeling our business components b. Handle client-side behavior. c. Receive a request and control which components act on the request. d. Create the appropriate response to send to the client.

c. Receive a request and control which components act on the request.

When you submit a form using the HTTP _________ method, any data in the form is added to the HTTP request message but not visible in the browser. a. get b. .getAttribute() c. post d .getParameter()

c. post

Which of the following characteristics of Cloud computing refers to the ability to increase and decrease the amount of Cloud resources that are used as needed? a. configurable b. ubiquitous c. scalability d. convenient

c. scalability

Which of the following is a correct format for a hyperlink to the Terry College web site? a. <a>http://www.terry.uga.edu</a> b. <a url="http://www.terry.uga.edu">The Terry College of Business</a> c. <a>The Terry College of Business</a> d. <a href="http://www.terry.uga.edu">The Terry College of Business</a>

d. <a href="http://www.terry.uga.edu">The Terry College of Business</a>

Which of the following HTML tags will create a button that when clicked will cause the action of a form to be implemented? a. <submit name="submit" value="Go" /> b. <input type="button" name="submit" value="Go" /> c. <input type="reset" name="submit" value="Go" /> d. <input type="submit" name="submit" value="Go" />

d. <input type="submit" name="submit" value="Go" />

Which of the following HTML tags is correct for making a textbox that is named "age"? a. <text name="age" /> b. <input type="name" text="age" /> c. <text type="input" name="age" /> d. <input type="text" name="age" />

d. <input type="text" name="age" />

Which of the following HTML tags would be used to create a drop-down list? a. <list>...</list> b. <input type="dropdown" /> c. <input type="list"> d. <select>...</select>

d. <select>...</select>

Which of the following HTML tags would be used to define a bulleted list? a. <list>...</list> b. <ol>...</ol> c. <bl>...</bl> d. <ul>...</ul>

d. <ul>...</ul>

Which of the following is a valid URL mapping annotation that appears in a servlet? a. doGet(urlPattern) b. doPost(urlPattern) c. @annotation(urlPatterns = { "/guess" }) d. @WebServlet(urlPatterns = { "/guess" })

d. @WebServlet(urlPatterns = { "/guess" })

The __________________ is a web application for managing Amazon Web Services that provides an interactive user interface for performing many AWS tasks. a. AWS Cloudwatch b. AWS Region Selector c. AWS Prime d. AWS Management Console

d. AWS Management Console

Where in an HTML document is the correct place to refer to an external style sheet? a. At the beginning of the document before the <html> tag. b. At the end of the document after the </html> tag. c. At d. In the <head> section.

d. In the <head> section.

Capital Expenses (CAPEX) refers to the costs of acquiring new infrastructure - for example, buying servers to set up on premises. Operating Expenses (OPEX) refers to the costs of ongoing ownership and maintenance. Which of the following is a true statement related to how Cloud computing can impact CAPEX and OPEX? a. Moving to cloud computing generally shifts OPEX to CAPEX. b. CAPEX is always higher than OPEX. c. Cloud Computing reduces OPEX to zero. d. Moving to cloud computing generally shifts CAPEX to OPEX.

d. Moving to cloud computing generally shifts CAPEX to OPEX.

Which of the following Java commands will declare and instance of a Java model class called User when included within a JSP or servlet file? a. user == instanceOf User b. <%@ page import="model.User" %> c. <%= user.declare() %> d. User user = new User();

d. User user = new User();

Which of the following CSS will

d. all.h1 {background-color:#FFFFFF;}

What is the name of the servlet method that will execute when the following html form is received? <form name="guessForm" action="guess" method="get" > <label> First Name: </label> <input type="text" name="fName" value="" /><br /> <input type="submit" name="guessButton" value="Go" /> </form> a. doPost() b. setName() c. submit() d. doGet()

d. doGet()

After posting your web pages to your AWS S3 bucket, which of the following represents the form of the URL to the home page of your static web site? a. http://s3.amazonaws.com/index.html b. https://<your.name>.AWS.com/index.html c. https://<your.name>.mist4630.bucket/index.html d. http://s3.amazonaws.com/your.name>.mist4630.bucket/index.html

d. http://s3.amazonaws.com/your.name>.mist4630.bucket/index.html

Which of the following are valid default file names for the welcome file of an Eclipse Java Dynamic Web Application? Select all that apply. index.html index.jsp Index.html Index.jsp default.jsp page1.jsp

index.html, index.jsp, default.jsp

Which of the following is a possible value to using the CSS position attribute to style an HTML element? (select all that apply) relative absolute left fixed float right

relative, absolute, fixed

Cookie

small text file in client machine with data sent to server for each request

init()

used to read persistent configuration data


Ensembles d'études connexes

Cellular Regulation ATI Questions

View Set

Scrum Guide-Scrum Events-Sprint Planning

View Set

Introduction to Computers Exam 1

View Set