MIST 4630 MVC QUIZ, MIST Alexa & Lambda, MIST full stack, mist web standards
Which of the following is a true statement about the MVC design pattern?
******The view component is responsible for creating and formatting the response message.***** The view component is responsible for receiving and handling the request message. The controller component is responsible for creating and formatting the response message. The request and response objects are only directly available to Java classes in the model.
Which of the following is an advantage of using separation of concerns when creating web applications? (Check all that apply)
- maintainability - extensibility - reusability
In order from inside to the outside, what are the components of the CSS box model?
1. content 2. padding 3. border 4. margin
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 HTML tags makes text content a heading with the largest size?
<h1>...</h1>
Which of the following is the correct HTML for inserting an image?
<img src="image.gif" alt="MyImage">
Which of the following is a correct tag for connecting an HTML page to an external style sheet?
<link rel="stylesheet" type="text/css" href="styles.css">
Which of the following HTML tags would be used to create a drop-down list?
<select>...</select>
Which of the following HTML tags would be used to define a bulleted list?
<ul>...</ul>
Which of the following is a valid URL mapping annotation that appears in a servlet?
@WebServlet(urlPatterns = { "/guess" })
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", uname, pwd); B. Connection connection = DriverManager.connect("jdbc:mysql://localhost/test", uname, pwd); C. Connection connection = Request.getConnection("mysql:jdbc://localhost/test", uname, pwd); D. Connection connection = DriverManager.getConnection(jdbc:mysql://localhost/test, uname, pwd);
A. Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/test", uname, pwd);
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. 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 mi field 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.
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.
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.
AMI
The ___________ is a collection of self-service APIs, tools, documentation, and code samples that makes it fast and easy for you to add skills to Alexa Alexa Skills Kit (ASK) Alexa API Collection (AAC) Natural Language Understanding (NLU) Alexa Voice Service (AVS)
Alexa Skills Kit (ASK)
To connect your Alexa interface to your Lambda function, you need to provide the skill with the Lambda's _________________. JavaScript Object Notation (JSON) Amazon Resource Name (ARN) Extensible Markup Language (XML) Application Program Interface (API)
Amazon Resource Name (ARN) (if not, json)
A HTTP response message is:
Created by the controller and takes the data from the server-side to the client-side. Created by the webserver and takes the results from the controller to the view component. Created by the server-side and takes the results back to the browser. Created by the browser and takes user input to the server-side. ********none of the above*********
The request and response objects persist as long as the user continues to send requests to the server side application.
False
When Dynamic Applications are made using the MVC design model, Java classes in the model are usually assigned a unique url mapping.
False
Select the characteristics or capabilities that are necessary in order to consider a service to be serverless (Select all that apply) Flexible scaling No server management Always triggered using an API High availability No idle capacity
Flexible scaling No server management High availability No idle capacity
Match the Web Standards concern with the Web Standards technology that is best for handling that concern.
HTML -structure CSS - style Javascript - behavior
What does HTML stand for?
Hypertext Markup Language
Where in an HTML document is the correct place to refer to an external style sheet?
In the <head> section
Which of the below tasks are required when deploying any basic dynamic web application (i.e. the Amortization app) developed using the technologies that we used in MIST4630 to an EC2 instance? Setting up the RDS instance Installing JDK on the EC2 instance Exporting the project from Eclipse into a set of private/public keys Setting up the Beanstalk instance Creating a connection between the Lambda function and S3 Installing Tomcat on the Beanstalk instance Setting up the S3 instance
Installing JDK on the EC2 instance
Requests and responses between the Alexa skill and the Lambda function are sent using which of the following data format languages?
JSON
JDBC stands for __________________.
Java Database Connectivity
With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using JSPs?
Modeling our business components
With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using plain old java objects (POJOs)?
Modeling our business components
Which of the following application components are generally provided by Platform-as-a-Service (PaaS)? Select all that apply. Hosted applications Networking components Operating systems Data Center Servers and storage Development tools, DBMS, business analytics
Networking components Operating systems Data Center Servers and storage Development tools, DBMS, business analytics
Lambda supports which of the listed programming languages ... Node.js Python Java Fortran
Node.js Python Java
A request object exists:
Only in the server-side
A complete development and deployment environment in the cloud is known as
PaaS
Which of the following is considered to be an advantage of serverless computing? (Select all that apply) Quicker turnaround Simplified scalability Greater control of server configuration Lower costs Simplified backed code
Quicker turnaround Simplified scalability Lower costs Simplified backed code
With the MVC design pattern, which of the following server side separation of concerns will be generally implemented using Java Servlets?
Receive a request and control which components act on the request.
Which of the following are created when the Web Server receives a request to hold any data that is sent from the client?
Request Object
Which of the following are valid Lambda event triggers (Select 3)? S3 API Gateway SNS ECS
S3 API Gateway SNS
In a relational data model, ________ provides the means for accessing and manipulating data.
SQL
___________________ is a design principle for separating a computer program into distinct sections such that each section addresses a separate concern.
Separation of Concerns
Which of the following Java statements can be used to retrieve 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>
String fName = request.getParameter("fName");
(T/F): Deploying a web project to the Cloud using Elastic Beanstalk requires much less work than configuring and deploying directly to an EC2 instance.
True
Data that is sent from the client to the server are stored on the request object as parameters?
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
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
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.
URL mapping
Which of the following CSS will add a background color for all <h1> elements?
h1 {background-color:#FFFFFF;}
With an Alexa skill, an __________ defines a specific behavior and takes user input to executes some code based on it. instance invocation intent utterance
intent
A database URL for a MySQL database named test on host panda.armstrong.edu is ________. dbc:mysql:/panda.armstrong.edu/test jdbc.mysql.//panda.armstrong.edu/test jdbc.mysql:///panda.armstrong.edu/test jdbc:mysql://panda.armstrong.edu/test
jdbc:mysql://panda.armstrong.edu/test
The voice design checklist includes key components to a great user experience. Select all that apply. make it clear how customers can benefit from your skill watch customers raise their voice at Alexa hide your skill so customers have to work hard to find it handle unexpected user utterances gracefully design for natural language conversation
make it clear how customers can benefit from your skill handle unexpected user utterances gracefully design for natural language conversation
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.
post
If a prepared statement preparedStatement is a SQL SELECT statement, you execute the SQL query statement using _________. preparedStatement.execute(); preparedStatement.query(); preparedStatement.executeQuery(); preparedStatement.executeUpdate();
preparedStatement.executeQuery();
If a prepared statement preparedStatement is a SQL Insert statement, you execute the statement using _________. preparedStatement.executeUpdate(); preparedStatement.query(); preparedStatement.execute(); preparedStatement.executeQuery();
preparedStatement.executeUpdate();
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?
response object
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. 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. If the SQL SELECT statement returns no result, resultSet is null. D. resultSet.getString(1) returns the firstName field in the result set.
resultSet.getString(1) returns the firstName field in the result set.
Which of the following methods will move the cursor for the ResultSet rs one record forward? rs.next() rs.close() rs.last() rs. getRow()
rs.next()
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?
string
Which of the following are true statements related to building an Alexa skill. (Select all that apply) the interaction model defines what functionalities or behaviors the skill is able to handle the hosted Service include the he programming logic, hosted on the internet, that responds to a user's requests skills contain two parts - the interaction model (frontend) and the hosted service (backend) a skill only requires a good interaction model to work
the interaction model defines what functionalities or behaviors the skill is able to handle the hosted Service include the he programming logic, hosted on the internet, that responds to a user's requests skills contain two parts - the interaction model (frontend) and the hosted service (backend)
Assume that you move the cursor of a ResultSet rs forward one record, but there are no more records there. What would be the result? the rs.next() method would return a null value a NoRecordFound exception the rs.next() method would return a value of false the rs.next() method would return a value of true
the rs.next() method would return a value of false
Amazon EC2 is integrated with most AWS services such as Amazon Simple Storage Service (Amazon S3), Amazon Relational Database Service (Amazon RDS), and Amazon Virtual Private Cloud (Amazon VPC).
true
Before a skill can be published for users, it must comply with and pass a certification process.
true
For our purposes, Apache Tomcat serves as the Web Server component for testing our applications, locally.
true
Serverless applications are ones that don't require you to provision or manage any servers. You can focus on your core product and business logic instead of responsibilities like operating system (OS) access control, OS patching, provisioning, right-sizing, scaling, and availability.
true
T/F: All Alexa skills, like web or mobile applications have two parts - the interaction model (frontend) and the hosted service (backend).
true
T/F: S3 is a serverless storage service
true
T/F: Serverless is a subset of FaaS and, hence, a subset of Event-driven computing.
true
T/F: When a Lambda function is invoked, code execution begins at what is called the handler.
true
T/F: When a Lambda function is invoked, code execution begins at what is called the handler. The handler is a specific function (segment of code) that you've created and included in your code.
true
There is a coding IDE directly in AWS Lambda web interface
true
With the MVC design pattern, it is possible to include multiple JSPs to provide different view options.
true
Every Alexa skill, custom or built-in, has a unique invocation name
true (?? ask about)
There are four parts to a phrase when interacting with an Alexa skill. They are the wake word, the starting phrase, the invocation name, and the utterance.
true (launch word, not starting phrase)
A ________________ is a technology that allows people to use their voices to interact with computers and devices. voice user interface smart voice recognizer cortanic sirilizable alexicon natural language processor
voice user interface
Which of the following are standards components of an sentence that calls an Alexa skill? Select all that apply. wake word invocation starting phrase utterance salutation
wake word invocation starting phrase utterance
Which of the following Eclipse Dynamic Web Project folders is the best place to import the Connector/J jar file? webapps/Web-Inf webapps webapps/Web-Inf/lib src
webapps/Web-Inf/lib
Which of the following is considered to be an advantage that is derived from the use standardizing the use of web technologies? (Check all that apply)
- MAKING THE WEB A MORE ACCESSIBLE PLACE - HELPING MAINTAIN BETTER SEO (SEARCH ENGINE OPTIMIZATION) - HELPING MAKE SOURCE CODE SIMPLER; REDUCING DEVELOPMENT AND MAINTENANCE TIME - ALLOWING FOR BACKWARD COMPATIBILITY AND VALIDATION - KEEPING THE WEB FREE AND ACCESSIBLE TO ALL
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 - fixed
Which of the following CSS selectors can be used to select all elements with the class "intro"?
.intro {...}
Which of the following is a correct format for a hyperlink to the Terry College web site?
<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?
<input type="submit" name="submit" value="Go" />
Which of the following HTML tags is correct for making a textbox that is named "age"?
<input type="text" name="age" />
Which HTML tag is used to specify an internal style sheet?
<style>...</style>
Which of the following is true about PaaS? A. Coding time for PaaS often takes longer. B. Focusses only on the development portion of web applications. C. PaaS can make it easier to develop for multiple platforms. D. PaaS tools are often less sophisticated than with IaaS.
C. PaaS can make it easier to develop for multiple platforms.
What is the return value from: preparedStatement.executeUpdate("insert into T values (100, 'Smith')") ? A. void B. a value indicating whether the SQL statement has been executed successfully C. an int value indicating how many rows are effected from the method invocation D. an object that contains the status of the execution
C. an int value indicating how many rows are effected from the method invocation
What does CSS stand for?
Cascading Style Sheets
Which of the following are considered to be benefits of using EC2? (Select all that apply)
ELASTIC WEB-SCALE COMPUTING FLEXIBLE CLOUD HOSTING SERVICES INTEGRATED SECURE
The core AWS compute service that lets you rent virtual computers on which to run their own computer applications is known as ___________________.
Ec2
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 (only 2 rows)
T/F: Only Java web applications can be hosted in an Elastic Beanstalk environment.
False
The request and response objects need to be declared before we can use them within our JSP code.
False
The request.getParameter() method will return the data type Object.
False
What is the name of the organization that develops the primary web standards of HTML and CSS?
The World Wide Consortium (W3C)
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?
User user = new User();
After you set up an EC2 instance, you can access and manage it in which of the following ways? (Select all that apply)
Using commands from your computer terminal Using the AWS Console Programmatically via an API
Considering the below code and Student table in the database, what will be the returned [value, type] after running the ps.executeUpdate() instruction? Code: PreparedStatement ps = connection.prepareStatement("update Students set CanAttend = 'Yes' where Age > 21);ResultSet resultSet;ps.executeUpdate(); Student table: ID Name Age CanAttend 1 John 18 Yes 2 Juan 19 Yes 3 Ying 21 Yes 4 John 22 No ------- [4,Integer] [1,Integer] [4,String] None of the above [4,ReultsSet] [1,String] [1,ReultsSet]
[1, integer]
When adding a servlet to an Eclipse Dynamic Web Project, where is the best place to store the servlet within the project?
a package in the src/java folder
An Elastic Beanstalk ___________ is a logical collection of Elastic Beanstalk components, including environments, versions, and environment configurations. In Elastic Beanstalk an application is conceptually similar to a folder.
application
Which of the following is the correct CSS syntax for setting the background of the page black?
body { background-color: black;}
Which of the following CSS statements will display a border with the following characteristics: The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixel?
border-width:10px 1px 5px 20px;
A __________ is a stand-alone, software component that enables a Java application to interact with a database. database driver JDBC DB ECU RDS
database driver
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="" /> <input type="submit" name="guessButton" value="Go" /></form>
doGet()
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="" /> <input type="submit" name="guessButton" value="Go" /></form>
doPost()
With AWS Elastic Beanstalk, an _____________ is a collection of AWS resources running an application version.
environment
The ____________ designates the type of application that the environment runs, and determines what resources Elastic Beanstalk provisions to support it
environment tier
When you launch an Elastic Beanstalk environment, the _________________ designates the type of application that the environment runs, and determines what resources Elastic Beanstalk provisions to support it.
environment tier
Function as a Server is ... an unmanaged environment Lambda container image event driven computing
event driven computing lambda
An HTTP get message can carry a larger amount of data than an HTTP post message.
false
In general, separation of concerns allows us to obtain high coupling and low cohesion.
false (other way around)
When you submit a form using the HTTP _________ method, any data in the form is concatenated to the URL shown in the browser.
get
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 _________. ps.setString(1, "John"); preparedStatement.setString(0, "John"); preparedStatement.setString(1, "John""); ps.setString(0, "John");
ps.setString(1, "John");
In the doGet method of a servlet, we have constructed our results, and stored those in a resultsToBeDisplayed variable of type String. Now, we want to load this variable to the request object to be able to access it in our view component files. Which of the following are valid ways of doing so. Select all that apply.
request.setAttribute("results", - resultsToBeDisplayed)
(T/F): The Elastic Beanstalk service is an example of Platform-as-a-Service (PaaS).
true
T/F: DynamoDB is a serverless database service
true