Professional Documents
Culture Documents
Classic Yoga Center
Classic Yoga Center
1.0Introduction
The first page of the application is enrollment.jsp page, this page should have the below form
components.
Component Component Type Component ID
Participant name Textbox participantName
Phone Number Textbox phoneNumber
Package Name Drop down packagetName
Number of sessions/week Textbox sessionsPerWeek
Package cost 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 enrollmentPage.jsp page, ensure you use the component type and id correctly as
specified in the above table.
The values in the packageName 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.
Package Name
Asanas
Pranayama
Kriyas
Meditation
TeachingPractice
The package cost button, on-click after all successful validations (Refer 2.2 for validation), must
generate the package cost based on the package and the sessionsPerWeek in the estimationPage.jsp
file. In this page the message should be displayed as “Welcome <<participant name>>, Cost for
<<package name>>is Rs. .<<packageCost>>”. The result should be rendered inside the <h2> tag.
Refer 2.3 for the logic to be followed for doing calculation.
2.2Business Validation
Note: The messages have to be retrieved from the appropriate properties file. The Property file
has been given as part of code skeleton. Do not change/modify the property file
2.2Control Flow
By giving the request /enrollmentPage from the browser (Eg:
http://localhost:8080/enrollmentPage),the user should be redirected to the enrollmentPage.jsp
User will enter the Participant name, Phone number, choose the package name and enter
sessionsPerWeek.
On clicking package cost button, Participant name, Phone number and the sessionsPerWeek
should be validated as per the business rules & validations.
The package cost should be calculated and displayed in the page is estimationPage.jsp
2.3 Business Rules
Amount for each product is given in the table below.
Cost per session
Package Name
Asanas Rs.250.0
Pranayama Rs.150.0
Kriyas Rs.225.0
Meditation Rs.299.0
TeachingPractic
Rs.399.0
e
For example:
If the package name is Asanas and sessionsPerWeek is 3 then
cost = 3*250.0*4=3000.0
Calculate the package cost and display the same in estimationPage.jsp.
3.0Component Specification
3.0.1Controller
The PackageController should be configured via annotation as a Controller
PackageController
Attribute Attribute Type Access Specifier Constraints
Name
service PackageService private Use annotation to
autowire
3.0.2 Service
PackageService class should be configured via annotation as Service
3.0.3Model
Include the needed annotations inside the Order Entity class for various validations already
mentioned. The error messages should be retrieved from the properties file
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 (enrollmentPage.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 enrollmentPage.jsp