Skip to content

HW5

Overview

This is the last homework. It is a short one so that your focus remains on your project.

You will be styling your app, adding input validation using JavaScript, and deploying to Heroku!

Day Date Time
Release Wed Mar 4, 2020 11:00 PM
Due Wed Mar 11, 2020 11:00 AM

Tasks

Download HW05 Starter Code. Once downloaded, open the oose_hw5_starter folder as a Gradle project in IntelliJ.

The provided Java application is built on previous homeworks and our classwork (Web application for CourseReVU app).

Read the readings first, please!

It is strongly advisable that you read the readings for lecture 8 before starting this homework.

Task 1: Layout and Styling

When you run the application, the reviews page will look like this:

You must changes it to look like this:

Note that reviews are displayed in a table. The table must look like the one in the image above (do your best to replicate the design; pay attention to details: there is no border under the last row). Moreover, when a user hovers the mouse on a row of the table, the background color of that row must change to light grey (#f5f5f5).

Task 2: Input Validation

When a user enters a review, the rating must be a value between 1 and 5 (inclusive). You must enforce this on the client-side (i.e. write JavaScript code to validate the input in browser before it is sent to the server). If a user provides an invalid input, you must display a message (alert the user) and stop the form submission, as displayed below:

Note

It is okay if the review does not contain any comment.

Task 3: Deploy to Heroku!

Deploy your application to Heroku and copy the URL of your Heroku app in src/main/resources/url.md file.

Tip

Only one of your group members need to do this; do not make 5 (or more) applications on Heroku. In any case, give us only one link!

Submission

You must create a zip file containing the following files and folders (and all files and folders therein):

1
2
3
4
5
6
.
├── build.gradle
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src

Note

Make sure there is no extra top-level directory that your src folder and (Gradle related) files are inside of.

Submit to Gradescope

  • In the course Dashboard, you will see an assignment: HW05.

  • Submit your work by uploading the zip file.

Because this is a group assignment, you must indicate all students who worked on it, in the submission page. The last submission by any group member is the only one we will grade.

Note

You can resubmit any time up until the deadline. Only your most recent submission will be graded.