JSP and MySQL Assignment 1. Create a database called premiergardens2

 

JSP and MySQL Assignment

1.      Create a database called premiergardens2 using MySQL.

2.      Create a table inventory in the premiergardens2 database.

3.      Create the following fields for the inventory table – toolid CHAR(5) (Primary Key), toolname CHAR(30), wholesale DECIMAL(7,2), retail DECIMAL(7,2), sold INTEGER, and inventory INTEGER.

4.      Create a front-end HTML form, insertinventory.html, with text fields that will allow you to enter the following data into the inventory table.  Do not hard code this information.  Please insert one record at a time in the inventory table using a JSP script inserttools.jsp.

toolid
 

toolname
 

wholesale
 

retail
 

sold
 

inventory

TS234
 

Tractor Scooter
 

85.03
 

97.95
 

122
 

26

GH178
 

Greenhouse
 

82.19
 

119.59
 

9
 

155

ED829
 

Edger
 

83.22
 

115.99
 

55
 

115

HS398
 

Hot Stick
 

212.44
 

318.99
 

26
 

75

PS098
 

Pole Saw
 

226.99
 

342.95
 

33
 

15

5. Write a JSP script, displaytools.jsp, that will display all of the records in the inventory table.

6. Create a front-end HTML form that simulates the sale of tools, selltools.html. 

7. Write a JSP script, toolsales.jsp, that will run one update query for sold and a second update query for inventory.  Thus, when the user selects an item, decrement the number of items in inventory and then increment the number of items sold.

8. Run the script created in step 5. to verify that the values are updated.

9.  Create a front-end HTML form, profits.html, that will have radio buttons that will allow the users to query the database table.

            a. Show the total profit and number sold for the tractor scooter.

            b. Show the total profit and number sold for greenhouse.

            c. Show the total profit and number sold for edger.

            d. Show the total profit and number sold for hot stick.

            e. Show the total profit and number sold for pole saw.

            f. Show the total profit and number sold for all items.

10. Write a JSP script gardenprofits.jsp.  You must run a different SELECT query for each tool.  The profit is computed as sold * (retail – wholesale).

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Two populations of rodents have been physically separated by a

Two populations of rodents have been physically separated by a large lake for many generations. The shore on one side of the lake is drier and has very different vegetation from that on the other side. The lake is drained by humans to irrigate crops, and now the rodent population

PLEASE SEE THE ATTACHMENT FOR DETAILED INSTRUCTIONS Week 06 Assignment

PLEASE SEE THE ATTACHMENT FOR DETAILED INSTRUCTIONS Week 06 Assignment – Failure modes and effects analysis (FMEA) Purpose: This assignment provides students with the opportunity to identify a high-risk process in the practice setting and then conduct a failure modes and effects analysis (FMEA). The FMEA is a systematic, proactive

As you prepare to transition from an academic student to

As you prepare to transition from an academic student to a newly graduated nurse in clinical practice, consider the following: What two provisions in the ANA’s Code of Ethics for Nurses may help you in this transition? Expand on your chosen provisions and describe how adopting them into your clinical

Defend or critique the primary alternative sources of health care

Defend or critique the primary alternative sources of health care funding in the United States. Analyze the main effect on the resource owner of one of the following means of financing health care: insurance premiums, tax subsidies, and mandated benefits. Provide at least one example that illustrates the selected effect

Write a paragraph replying to this reflection from a student.

Write a paragraph replying to this reflection from a student. You need to agree or disagree, I encourage you to keep it concise but robust. Preserving Procreative Potential with a SmART Prenuptial Agreement is an article that talks about what should happen with an embryo that has been frozen from two

Climat change litigation: What does the term ‘climate change

What does the term ‘climate change litigation’ encompass and to what extent does it have the capacity to compensate for the deficiencies in regulation?     Journal to use:  Journal of Environmental Law (the leading journal) • Environmental Law Review • Journal of Planning and Environment Law • Planning and

Due Thursday Reflecting on the reactions to prior disasters can

  Due Thursday  Reflecting on the reactions to prior disasters can help leaders in emergency management learn from successes and failures to improve process and procedures. Watch the “When the Levees Broke: Part 1” video segments from the University Library. Respond to the following in a minimum of 175 words:

In the video, you see (a) junior staff who communicates

In the video, you see (a) junior staff who communicates with the client, (b) the client – Margo, (c) partner, (d) audit senior (who is sitting next to the junior staff). Pick one person you either connect with the most or aspire to be in your career. Explain why you picked

The Travels of Sir John Mandeville

Description Must use the sources: Provincializing Europe by Dipesh Chakrabarty World Histories by Marnie Hughes Warrington Herodotus Diodorus William of Tyre Geoffrey de Villerhardouin Travels of Sir John Mandeville Prompt: In the first half of the quarter, we are focusing on the development of Western historiography from the Classical Greek

You are the lead digital investigator for XYZ Corp. You

You are the lead digital investigator for XYZ Corp. You are called to the scene of a crime involving a computer and asked to examine the unit. You observe the following. The time and date in log files appear to be manipulated There are three folders located on the device

Chapter-12 topic Discussions and questions: 1. Can the repeated-measures ANOVA

   Chapter-12 topic Discussions and questions: 1.  Can the repeated-measures ANOVA technique in can be used to analyze a design with only one independent variable? Explain your answer in detail. 2. Is Tukey HSD test appropriate for data analyzed with a repeated-measures ANOVA? Explain your answer in detail. Data Set

PDFs are the most widely used format in document management.

 PDFs are the most widely used format in document management. Therefore, many people opt for PDFs and convert their screenshots to this format. The more conversions we perform, the more details matter. Thorough and useful tips on how to render PDF in HTML include working with images, files for print,

As you consider the reputation service and the needs of

  As you consider the reputation service and the needs of customers or individual consumers, as well as, perhaps, large organizations that are security conscious like our fictitious enterprise, Digital Diskus, what will be the expectations and requirements of the customers? Will consumers’ needs be different from those of enterprises? Who

Please refer to War, Peace and Prosperity in the Name

Please refer to War, Peace and Prosperity in the Name of God (WPP) to answer one of the following questions: 1) What do the conventional sociology and political science literatures argue about the role of religion in sociopolitical stability and why? According to the book, how do Abrahamic monotheisms factor