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

Provide an example of a vertical or horizontal integration strategy

Provide an example of a vertical or horizontal integration strategy that a firm applied it based on the reading from our Thompson text and the associated other material.  How did the integration aid the company in building competitive advantage? Explain what the advantages and disadvantages of applying that integration strategy are in

Introduction/Background: Provide context for the research article. What led the

 Introduction/Background: Provide context for the research article. What led the author(s) to write the piece? What key concepts were explored? Were there weaknesses in prior research that led the author to the current hypothesis or research question? Methodology: Describe how the data was gathered and analyzed. What research questions or

Universities now have full-time police departments on their campuses for

  Universities now have full-time police departments on their campuses for the purpose of protecting students, faculty, staff, and visitors.  Larger universities and most state university systems have campus police departments that are set up like many metropolitan police agencies. You are an intern with a detectives’ unit on a major

Need assistance reviewing, and revising the final version of a

Need assistance reviewing, and revising the final version of a business plan. The key to this assignment is to use the feedback received throughout the course to polish the plan to the point that you could confidently show it to investors and potential partners or customers. One new piece you

Working with Latino Families

Latino and Hispanic cultures are rich, diverse and dynamic. Select one aspect of family functioning (parenting, home-school connection, marital stability, sibling relationships, etc.). Discuss how Latino families fair in this area of functioning and explain how aspects of Latino culture influences families. 1. A description of the cultural strengths, values

Directions: Please use your textbook to answer the question below using your own words. Explain in your own words the different types of anesthesia, including what types of procedures each are used Nursing Assignment Help

Directions: Please use your textbook to answer the question below using your own words. Explain in your own words the different types of anesthesia, including what types of procedures each are used for. Write one well-written paragraph and answer the above questions to earn 10 points. Expert Solution Preview Anesthesia

Perform an academic search and locate articles from peer-reviewed journals

Perform an academic search and locate articles from peer-reviewed journals that discuss a health disparity found in the Asian American or Native American communities. Discuss your findings and the impact APNs can make to eliminate these disparities.  Post your initial response by Wednesday at midnight. Respond to one student by Sunday

This discussion is for you to gain more information about

This discussion is for you to gain more information about possible social work professional positions and to further your exploration of social work as a career. For this week’s reading section in Grobman’s More Days in the Lives of Social Workers: 62 Professionals Tell “Real-Life” Stories From Social Work Practice, please

Write a 2-3 page article review in which you discuss

Write a 2-3 page article review in which you discuss privacy in the workplace. Introduction From an HR perspective, the topic of privacy in the workplace is often related to pre-employment background checks and the use of technology. During the pre-employment period, privacy can become a concern because employers investigate

Respond to at least two of your colleagues* on two

  Respond to at least two of your colleagues* on two different days, asking questions to help clarify the scenario and application of data, or offering additional/alternative ideas for the application of nursing informatics principles. *Note: Throughout this program, your fellow students are referred to as colleagues.   According to Walden University, nursing

APA FORMAT & REFERENCES EACH QUESTIONS 400 words or more

APA FORMAT & REFERENCES EACH QUESTIONS 400 words or more Question 1 PROTOTYPE INTERFACE DESIGN FOR MOBILE APPLICATION  Use one  of the online drawing tools  ( see the list below)  to develop an prototype interface  for the following case. You will be proving prototype interface design for GoldStar Bank’s Mobile

Part 1: Reference Sheet Using your school’s budget and CIP/SIP,

  Part 1: Reference Sheet Using your school’s budget and CIP/SIP, develop a reference sheet that identifies a total of 7-10 school budget line items across three or more budget account categories and align them to the school’s vision, mission, and CIP/SIP. Remember the CIP/SIP should drive the budget.   Use

National Health Coverage Plans, Reimbursements, and Quality Nursing Assignment Help

National Health Coverage Plans, Reimbursements, and Quality Instructions Baccalaureate education includes learning opportunities of healthcare policy, finance, and regulatory environments (AACN, 2008).   Introduction & Healthcare Coverage and Vulnerable Populations  Describe the importance of healthcare coverage (insurance).  End with a clearly worded purpose statement for this project. Discuss two ways healthcare coverage

Merck Case Due: Beginning of class on Tuesday, January 18.

  Merck Case Due: Beginning of class on Tuesday, January 18. Deliverable: A word document limited to two pages single-spaced maximum (12 point font, 1 inch margins). Material limited to that in the case report only. Work with others: Discuss with fellow students but provide your own individual reports. 2

Assume you are employed by the Midtown Rehabilitation Center, the

 Assume you are employed by the Midtown Rehabilitation Center, the agency discussed in the textbook, as an intake interviewer. How do you answer the following questions that your client has during the initial meeting? For this forum, your initial response can be formatted in bullet points to address each question.