(b) Write a JSP to calculate the movie ticket, given the adult ticket is RM13.00/person and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(b) Write a JSP to calculate the movie ticket, given the adult ticket is RM13.00/person and the child ticket is RM7.00/person. The JSP should also return the booking information made by the customer as shown in the Figure 2. Design a method as below: public double calculate (String adult, String Child){ Information key-in by the user Generated output after the user click "CHECK OUT" Online Movie Ticket Booking Order Received! Thank You! Please collect your ticket 1 hour before the movie start. Customer Name: Kiu Ching Chieh Customer Email: kiucc@ucsiuniversity.edu Customer Contact 013-33445566 Name: Kiu Ching Chieh Email: kiucc@ucsiuniversity.edu.my Contact: 013-33445566 Movie: Despicable Me 2 Movie: Despicable Me 2 Cinema: Sunway Piraymid Payment Mode: By Cash Adult Ticket 3 Child Ticket 3 Mid Valley KLCC Sunway Piraymid Adult Ticket: 3 nos @ RM13.00 Child Ticket: 3 nos @ RM7.00 Cinema: Payment Method: O Credit Card Cash CHECK OUT 1 1 3 Total:QM40.0 Page (c) Each customer can only make a booking of 10 ticket per-transaction. Improve the JSP code to prompt the error message to a customer if he orders more than 10 tickets in one booking (as shown in Figure 3). Error: Ticket is limited to 10 nos per-transaction Tip: o error.jsp to display this message o controller.jsp to handle the user input Yes or No Do you want to make a new booking? Yes No Submit If a customer checks Yes, the Submit button If a customer checks No, the Submit button will divert the order form to a customer displays thank you message to a customer Online Movie Ticket Booking Thank you for using the online movie ticketing system. Customer Name: Customer Email Customer Contact Μοvie Blind Detective - Adult Ticket: Child Ticket: Page OMid Valley OKLCC Suway Piraymid Cinema (b) Write a JSP to calculate the movie ticket, given the adult ticket is RM13.00/person and the child ticket is RM7.00/person. The JSP should also return the booking information made by the customer as shown in the Figure 2. Design a method as below: public double calculate (String adult, String Child){ Information key-in by the user Generated output after the user click "CHECK OUT" Online Movie Ticket Booking Order Received! Thank You! Please collect your ticket 1 hour before the movie start. Customer Name: Kiu Ching Chieh Customer Email: kiucc@ucsiuniversity.edu Customer Contact 013-33445566 Name: Kiu Ching Chieh Email: kiucc@ucsiuniversity.edu.my Contact: 013-33445566 Movie: Despicable Me 2 Movie: Despicable Me 2 Cinema: Sunway Piraymid Payment Mode: By Cash Adult Ticket 3 Child Ticket 3 Mid Valley KLCC Sunway Piraymid Adult Ticket: 3 nos @ RM13.00 Child Ticket: 3 nos @ RM7.00 Cinema: Payment Method: O Credit Card Cash CHECK OUT 1 1 3 Total:QM40.0 Page (c) Each customer can only make a booking of 10 ticket per-transaction. Improve the JSP code to prompt the error message to a customer if he orders more than 10 tickets in one booking (as shown in Figure 3). Error: Ticket is limited to 10 nos per-transaction Tip: o error.jsp to display this message o controller.jsp to handle the user input Yes or No Do you want to make a new booking? Yes No Submit If a customer checks Yes, the Submit button If a customer checks No, the Submit button will divert the order form to a customer displays thank you message to a customer Online Movie Ticket Booking Thank you for using the online movie ticketing system. Customer Name: Customer Email Customer Contact Μοvie Blind Detective - Adult Ticket: Child Ticket: Page OMid Valley OKLCC Suway Piraymid Cinema
Expert Answer:
Answer rating: 100% (QA)
Ans b public double calculateString adult String Child int adch ad IntegerparseIntadult ch Intege... View the full answer
Related Book For
College Algebra Graphs and Models
ISBN: 978-0321845405
5th edition
Authors: Marvin L. Bittinger, Judith A. Beecher, David J. Ellenbogen, Judith A. Penna
Posted Date:
Students also viewed these programming questions
-
A cast-steel C frame as shown in the figure has a rectangular cross section of 1 in by 1.6 in, with a 0.4-in-radius semicircular notch on both sides that forms midflank fluting as shown. Estimate A,...
-
A cast-steel C frame as shown in the figure has a rectangular cross section of 1.25 in by 2 in, with a 0.5-in-radius semicircular notch on both sides that forms midflank fluting as shown. Estimate A,...
-
A shock mount constructed as shown in the figure is used to support a delicate instrument. The mount consists of an outer steel tube with inside diameter b, a central steel bar of diameter d that...
-
Elena, a student in F-1 immigration status from Romania, is on the basketball team. She arrived in the U.S. on June 18, 2023 on a full athletic scholarship that includes $10,000 for her room and...
-
Answer Exercise 11 for a 4 4 chessboard. [Replace each "nine" in part (b) with "sixteen."] (a) In how many ways can we paint the cells of a 3 3 chessboard using red and blue paint? (The back of the...
-
A long narrow horizontal opaque rectangular object of width 0.70 mm is illuminated by 600-nm light. Consider a point-P, at the level of the lower edge of the object, 1.0 m from it. Determine the...
-
Mr. Tam is the front man for the Asian American dance-rock band The Slants. Mr. Tam named his band The Slants to reclaim and take ownership of Asian stereotypes. The band draws inspiration for its...
-
The Flamingo Grill is an upscale restaurant located in St. Petersburg, Florida. To help plan an advertising campaign for the coming season, Flamingos management team hired the advertising firm of...
-
(1) (a) Discretize the 2D Poisson equation Vu(x, y) = Uxx + Uyy = = p(x, y) with second-order accurate central differences with Ax = the given charge density. Ay=h. p(x, y) is (b) Express uij in...
-
Bright Sparks Electrical - Bank Register Report: Now that you have completed the journals for the month, you need to prepare the Bank Register Report in the template below. Not all general journals...
-
Paul E. Smith and Mary A. Crimp, each age 42, married on September 7, 2015. Paul and Mary will file a joint return for 2018. Paul's Social Security number is 111-11-1112. Mary's Social Security...
-
2. As shown in the figure, 20 ft3 of air at T = 600 R, 100 lbf/in undergoes a polytropic expansion to a final pressure of 51.4 lbf/in. The process follows pV12 = constant. The work is W= 194.34 Btu....
-
Jamee owns a small hair salon. This is their income statement for the month of July. They had 235 customers this month. What is their full cost on their contribution margin for the month of July?...
-
Problem 2: A 30-tooth pinion drives a 128-tooth gear. Given a diametral pitch of 16 and a pressure angle of 25, find the contact ratio. How does this ratio compare to the recommended contact ratio?...
-
A hollow cubical box is 0.980 m on an edge. This box is floating in a lake with 1/2 of its height beneath the surface. The walls of the box have a negligible thickness. Water is poured into the box....
-
What was the immediate financial benefit to Samuel Waksal of selling 135,000 shares of ImClone stock on December 27, based on insider information, rather than waiting until the information was known...
-
FIND ANY ONE COMTEMPARY ISSUE IN THE REGULATORY SECTOR OF GHANA PUBLISHED IN THE PAPERS FROM 1957 TILL 2010 WHICH IS RECURRENT OR STILL RELEVANT TODAY. STATE 5 REASONS WHY IT IS STILL RELEVNT OR...
-
Troy is a qualified radiologist who operates a successful radiology practice from purpose- built rooms attached to his house. Troy works in the practice three days a week, and the other two days he...
-
Find the zeros of the function. a. f(x) =- 4/3x + 8 b. g(x) = x2 - 8x - 33
-
Given that f(x) = x2 - 1, g(x) = 4x + 3, and h(x) = 3x2 + 2x + 4, find each of the following. (a) (go h) (2) (b) (fo g) (- 1) (c) (ho f) (1)
-
The parking lot behind Kai's Kafé has a perimeter of 210 m. The width is three-fourths of the length. What are the dimensions of the parking lot?
-
A repressor is a __________ that _________ transcription. a. small effector molecule, inhibits b. small effector molecule, enhances c. regulatory protein, inhibits d. regulatory protein, enhances
-
If a tRNA has an anticodon with the sequence 3-GAC-5, which amino acid does it carry? a. Aspartic acid c. Leucine b. Valine d. Glutamine
-
Lets suppose a researcher mixed together nucleotides with the following percentages of bases: 30% G, 30% C, and 40% A. If RNA was made via polynucleotide phosphorylase, what percentage of the codons...
Study smarter with the SolutionInn App