Professional Documents
Culture Documents
1.0 Introduction
The first page of the application is showpage.jsp page, this page should have the below form
components.
Component Component Type Component ID
Customer Name Textbox customerName
Contact Number Textbox contactNumber
Hall Type Drop down hallType
Adult Count For Veg Textbox adultVegCount
Kids Count For Veg Textbox kidsVegCount
Adult Count For Textbox adultNonVegCount
NonVeg
Kids Count For NonVeg Textbox kidsNonVegCount
CalculateCost Submit submit
In the same page we have the provision to choose language English, German and French. By
default, the page content will be displayed in English. If we choose the language as French the
label content and the error message in the page should displayed in French and if we choose the
language as German the label content and the error message in the page should displayed in
German. Ensure you implement the concept of Internationalization.
In the showpage.jsp page, ensure you use the component type and id correctly as specified in
the above table.
The values in the hallType drop-down must be auto populated from the controller with the
values as given in the below table. They should not be populated / hardcoded inside the JSP.
hallType
AC
NonAC
The CalculateCost button, on-click after all successful validations (Refer 2.2 for validation),
must generate the total Bill amount based on the hall type and kids, adult count under
vegetarian and non-vegetarian categories in the billdesk.jsp file. In this page the message
should be displayed as “Thanks for Booking!!! Total Amount to be paid is
Rs.<<totalCost>>”. The result should be rendered inside the <h2> tag. Refer 2.3 for the logic
to be followed for doing calculation.
2.2 Business Validation
For example:
If the hall Type is AC then, extra Rs.500 has to be added to the total bill amount,
adultVegCount = 2, kidsVegCount=0, adultNonVegCount = 3, kidsNonVegCount = 1, hallType
=”AC”
totalCost = (2 * 599.0 + 0 + 3 * 699.0 + 1 * 349.0 ) + 500.0 = (1198.0 + 0.0 + 2097.0 +349.0)
+500.0 and
totalCost = totalCost + 500.0 = 3644.0 + 500.0 = 4144.0
Calculate the total Bill amount and display the same in billdesk.jsp.
Inside the populateHallType method you should add all the 2-hall type into the Map and return
the Map.
BookService class should be autowired inside the Controller via annotations
calculateTotalCost method in BookService class must calculate the total Bill amount based on
the hallType and the number of persons count provided by the user.
3.0.2 Service
BookService class should be configured via annotation as Service
3.0.3 Model
3.0.4 Internationalization
Override the methods in InternationalizationConfig class provided as part of the code skeleton
to support Internationalization.
Note: For the LocaleChangeInterceptor, to internationalize the page based on the new Locale,
use the parameter "language".
Hint: Request from the UI (showpage.jsp) for all the three hyperlinks have language parameter
added to a request. Do not modify/change the hyper link /the values already provided as part of
the code skeleton in the showpage.jsp