Following the MVC architectural pattern, you should use Java Servlets/JSPs/HTML to develop a tourist guide for traffic and litter violations in a city. The application should do the following:
-
The tourist should be able to view a city and see information about safety and cleanliness. Actor: Reporter (could be any user)
-
The user opens the home page
-
The user selects a button or link to report a violation A new form will open and the user should enter the following:
i. Date (automatically entered)
ii. Enter phone number (required field)
iii. Country (required field) [dropdown list]
iv. City (required field) [dropdown list, based on the country]
v. Upload a picture/video – max 20 MB- of the violation (required field) You can save the picture/video to the database or save a link to the file.
vi. Select the type of violation: (required field)
-
Red light crossing
-
Running a stop sign
-
Jaywalking
-
Littering
vii. The user then submits the report
- The admin checks the reports and approves/disapproves them
- If the same user (phone number) reports false violations more than 3 times, the user will be blocked.
- A violation will expire after 1 month.
- An expired violation is (inactive) and will not be counted in deciding the status (see next).
- If 10 active traffic light violations were reported in the same city, then this city is considered Dangerous.
- If 10 active stop sign violations were reported in the same city, then this city is Dangerous.
- If 10 active Jaywalking violations were reported in the same city, then the residents of this city are Insane.
- If 10 active littering violations were reported in the same city, then this city is considered Dirty.
- Each city may be Clean or Dirty
- Each city may be Safe or Dangerous
- The residents of the city may be Sane or Insane ➔ You can add different countries and cities to the database. ➔ You need to provide test cases that cover all the scenarios.