Code written by you or me is fair game, but please do not copy and paste code from the
Internet or any other sources. No cell-phones allowed, messaging of any kind is strictly off
limits, drop boxes will be dealt with severely, and no talking please.
Quiz2Cart<YourFullName>. Submit your entire Eclipse project directory as a ZIP archive.
Visual appeal is important, so spend a few minutes making it looks great, but know that
functionality comes first here! A non-working system that looks pretty is not going to be worth
much, whereas a working system that looks terrible will likely achieve a very high mark.
Kindly confirm with me before you leave the room that I have received your project on slate.
Task: (Each bullet point you achieve is 1 mark)
• Create a project Quiz2.
• Create a servlet called Controller in an appropriate package.
• Create a POJO called Phone. Inside Phone, include properties name and price (choose
appropriate types and access privileges should be private for both of the properties).
• Follow the complete bean rule.
• Create an HTML page called quizPurchase.html.
• Create a JSP HTML based page called quizCart.jsp.
• On [login to view URL], create a form which posts to your Controller servlet.
• Inside the form, create four radio buttons and display images beside them...(use the
images which are uploaded on the slate)
• Have your image tags display pictures for the four cellphones you consider to be the
best today – one image per radio button.
• Also inside the form, create four <input type=”hidden” … tags.
• The name of your hidden tags should reference the value of your radio buttons (if
“Samsung” is the value of your radio button, maybe you want “SamsungPrice” as the
name of its corresponding hidden price tag!). Store appropriate and unique values for
each phone in the matching hidden tags.
• In the Controller servlet, retrieve the posted parameters. (Hint: retrieve the price
parameter value corresponding to the value of the radio button parameter you clicked.
• Create a new Phone object instance containing the retrieved form data. This will
probably mean you need to convert the hidden “…Price” String to a double too. Follow
best practices and catch any possible Exceptions which may occur.
• Following the algorithm pattern, retrieve a List<Phone> attribute named “shoppingList”
from the session. If your retrieved shoppingList is equal to null, set it equal to a new
• Add your Phone object to the List and store the List (back?) in the session using the
same attribute name of “shoppingList”. The idea is your users will be able to add items
to their cart with each new click.
• Request Dispatch to the [login to view URL] page.
• Iterate through the “shoppingList” session attribute values.
• Note: you cannot use any regular Java code in this page! It must be entirely scriptless!
You can use EL to get it done where ever its possible to use!
• Display the contents of your List in a nicely formatted fashion – alternating row
background colours, for example.
• Finally, include a link back to [login to view URL] so you can test easily.
There are four phone images included.
Samsung Note 10 plus image with the price $1500.00
Iphone 11 Pro image with the price $1750.00
Google Pixel 3 image with the price $900.00
Huwaei Mate 20 Pro image with the price $1300.00
5 freelancers are bidding on average $29 for this job
I am an experienced, java developer and newbie as a freelancer, so I will make this project cheap and fast. I just want to make my freelancer profile good enough.
Im interested in your project. I have been using all these technologies mentioned. If you like to implement this using Latest Framework like Spring boot and themleaf, I do can do for you.