Create a web application for sheridan restaurant

Assignment Help JAVA Programming
Reference no: EM13163887

Description:

Create a web application for Sheridan Restaurant Reviews that contains the following functionality:

• Display a table of all restaurants based on the city entered by the user and whether the restaurants allow take-out orders or not

• Allow the user to update the ratings of a restaurant

1. Database - Restaurants.sql

The provided script does the following:

- Creates a new database called RestaurantReviews
- Creates a new table called Review and populates it with some records:

o ReviewId - An auto-incremented value that represents this table's primary key
o Restaurant - The name of the restaurant
o Food - The restaurant's score for food
o Service - The restaurant's score for service
o Price - The restaurant's score for menu prices
o Location - The city where the restaurant is located
o Cuisine - The type of cuisine served at the restaurant
o TakeOut - A true value indicates that the restaurant allows for take-out orders

2. Your Web Application

a) Make sure the DBConnection and MySQL JDBC Driver libraries are imported in your new project.

b) Modify index.html by adding two HTML forms - one for each function within the application.

60_Create a web application for Sheridan Restaurant.png

• Each form should send a request to an appropriate servlet
• The Price Rating field when updating a restaurant review should be a dropdown list with the values 1, 2, 3, 4, 5 in that order

c) Your database configuration must be stored as a series of context-initialization parameters.

d) Your solution must have a ServletContextListener that does the following when the application loads:

• Get the database configuration from the ServletContext
• Construct a new DBConnection object based on the database configuration
• Store the DBConnection object as a ServletContext attribute

e) Create a JavaBean that maps with the Review table of the database

f) Create a DAO class that contains methods that do the following:

• Get restaurants by location. This method should have parameters for a Connection object, the city, and whether to return restaurants that allow take-out orders. Your results should be ordered by descending food rating, then descending service rating.

The method should return a list of Review beans.

• Update a restaurant review. This method should have parameters for a Connection object and the values required to update a restaurant review's ratings. The method should return true if the new review was successfully updated, false otherwise.

g) Create a servlet that handles requests to get a list of restaurants by location

• The request should be forwarded to a JSP which will display a table of those restaurants

h) Create a servlet that handles requests to update a restaurant's review

• Forward the request to index.html if the restaurant review was successfully updated
• Forward the request to an error page if the restaurant review was not updated

i) Create a JSP that displays a table of all restaurants that match the selected criteria. Below is the sample page if the user wanted to view all restaurants in Brampton that allow take-out:

22_Create a web application for Sheridan Restaurant1.png

 

Reference no: EM13163887

Questions Cloud

Medical technician uses a pair of four inch long tweezers : A medical technician uses a pair of four inch long tweezers. If more than 1/5 knew of force is applied to the silver, it will break and become difficult to remove. Using a static equlibrium calculations, calculate how far from the  fulcrum the tweez..
Compute the new ph of the solution : Now take another 37 mL of the 0.50 M pH 6.83 buffer and add 1.3 mL of 1.00 M NaOH. Using steps similar to those above, calculate the new pH of the solution.
Toy maker sells a large amount of toys : Because a toy maker sells a large amount of toys, it is able to acquire plastic products to make the toys at a cheaper price than the competition. The toy maker is taking advantage of:
What is the theoretical yield of aspirin in the reaction : What is the theoretical yield of aspirin in the reaction of 3.60 grams of salicylic acid with excess acetic anhydride?
Create a web application for sheridan restaurant : Create a web application for Sheridan Restaurant Reviews that contains the following functionality - Display a table of all restaurants based on the city entered by the user
How will this influence the efficiency of ion exchange : if the level of solution in the column drops below the level of the resin, channels will be formed in the resin column.How will this influence the efficiency of ion exchange in the column?
Afford national health care insurance : If politicians are overly biased in their feelings, how might change take place, do we as a nation need change, can we afford national health care insurance, who would run it, would it be all inclusive?
What is the mass of the fishing weight in grams : The temperature of a lead fishing weight rises from 15 oC to 45 oC as it absorbs 22.5 kJ of heat. What is the mass of the fishing weight in grams? Heat capacity of lead is 0.128 J/g oC.
Define the henderson hasselbalch equation : What concentrations of [K2HPO4] and [KH2PO4] will you need to make the total concentration 0.50 M? 3.) How many moles of K2HPO4 and KH2PO4 will you need? 4.) What mass of K2HPO4 and KH2PO4 will you need?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to evaluate postfix expressions

Write a java program to evaluate postfix expressions containing complex numbers using a stack. This program should contain two classes.

  Java code using jframe

Write a Java code using JFrame. This code needs to manipulate 4 shapes(2 rectangles and 2 squares) in a 400x400 JFrame. This needs to manipulate the shapes in 3 different ways, using 3 different methods. One for translating a shape, one for proportio..

  Create the html form and call the servlet to print out

1. write a calculator Servlet that adds, subtract, multiples and divides. Create the html form and call the servlet to print out the answer

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Write down the java code for the bank

Write down the java code for the bank of Fraud. User is presented with menu which looks something like this: 1. Deposit 2. Withdrawal 3. Check Balance 4. Exit.

  Method named isallvowels that returns

Write a method named isAllVowels that returns whether a String consists entirely of vowels (a, e, i, o, or u, case-insensitively). If every character of the String is a vowel, your method should return true. If any character of the String is a non-vo..

  Prepare address book java application

Prepare an application that reads the contents of your address book file and prepare a user guide that includes a description of the functionality of your overall address book system.

  Write a java program to implement the finite field

Write a program called "GF2.java" to implement the finite field GF(p n ) where p is a prime number and n is a positive integer.  You also need to write four methods to realize "+", "-", "´", and "/".

  Client server chat system

Threading and GUI design using Java's network library, threading system, and swing user interlace libraries to implement a basic chat client and saver system. Thc system will allow multiple. remote users to send and receive messages across the net..

  Java program to print strings given at command line

Write down program Average.java to print strings which it is given at command line, one per line. If nothing is given at command line, then print "No arguments".

  Write java program using array list object

Write a java program (using eclipse) using ArrayList object to allow the professor to enter student's name, his or her's four test scores.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd