University : Others UniLearnO is not sponsored or endorsed by this college or university.
Country : Australia

 IT Assessment Task

Part 1

Begin by creating a brand new Dynamic Web Project called “A2”.

Your application should allow you to input a celebrity’s first name, last name, email, and net worth in an appealing HTML form on a page called addCelebrity.html based in HTML 5.

Make the page pretty – use all your HTML skills! There are marks allotted for creativity and style.

Use appropriate HTML field types to help you with input validation! Your system should not crash at any point if the user tries to type “Gold!” in the net worth field, for example.

Have the form POST to a servlet called ControllerServlet in an appropriate package.

Part 2

Create a POJO called Celebrity in an appropriate package. Your Celebrity class should store fields for a String firstName, a lastName, an email, and a double netWorth. Create a global List of Celebrity instances which is thread safe. If you have forgotten how to make a Thread Safe version of List, see the lecture notes and exercises. In the constructor for ControllerServlet, instantiate three Celebrity instances and add them to your List. Use the following values:

We don’t generally execute a lot of code in our servlet constructors, but sometimes it makes sense to use them to populate test data. In this case, doing so in the constructor means it will always be ready when we need it because it is added once, and only once, at servlet startup. In the doPost method of the Controller servlet, retrieve the parameters from your HTTP request.

Validate your form input from the servlet to ensure everything makes sense and/or was not left blank. Once again, I should not be able to crash your program.

Part 3

In the doGet of your servlet, check if the email address already exists inside a POJO in your List. How you do this is up to you, and there are many ways. Iterate through them one by one, checking inside each if you’re a little unsure and if you’re feeling brave, Google Java Lambdas and watch a video or two! If it works, it works.

If you already have a matching Celebrity POJO, update it to reflect the star’s new net worth.

 If you do not have a matching Celebrity instance, create a Celebrity instance and add it to your List.

Part 4

Create a request attribute and put your List instance inside.

Request dispatch to a new servlet you create called DisplayWorths in an appropriate package.

Inside the doGet of DisplayWorths, retrieve your request attribute.

Iterate through your List, and output the celebrity data inside in an appealing fashion. Again, make it pretty! Points for style and beauty here too!

You should at least have every alternate row in a slightly different background color, but go to town! Impress me! Feel free to use an image or two, play around with fonts, and spend time on the layout of your page. Please do not use simple auto-generated .toStrings() for output!

This IT Assessment has been solved by our IT experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!

  • Uploaded By : Keith
  • Posted on : December 06th, 2018

Whatsapp Tap to ChatGet instant assistance