Skip to main content

[SOLUTION] Java with MySQL Software Design & Development Criminal Database Search Engine

Task 1 – Data Import

Import the crimedata.sql file into your mysql server database using the PHPMyAdmin application on the LAMP server. Make sure that the import creates a crimedata table and has the following columns: crime_ID, month, reported_by, falls_within, longitude, atitude, location, LSOA_code, LSOA_name, crime_type. The explanation of each column is provided in the appendix A. If imported correctly, your table will have 66,683 records.

Task 2– Unit Testing

Write Unit Tests for all your classes and methods you implement in tasks 3,5, and 6.

Task3 – Database Handling

Create a class called DatabaseHandler. This class will have a method called handleDbConnection. It has no input parameters and returns a java.sql.Connection object. You should use your mysql credentials here to make a connection to the database that contains the crimedata table. Other methods and classes implemented as part of tasks below will call the handleDbConnection method to use the connection object and query the database.
Note: Do not store your credentials in your final submission, instead you should use double quotes (“”).

Task 4 – GUI building

Create a class called GUIHandler. This class will be a JFrame with appropriate GUI (java.awt or javax.swing) components that allow searching for various crime records by:

  • looking up using longitude and/or latitude (user will be able to enter any possible longitude and latitude) and displaying first ten matching results,
  • looking up using LSOA name (user will be allowed to enter any LSOA name including any regular expression for searching LSOA name) and displaying first ten results, and
  • searching by crime types (for example, user can use an existing crime type from GUI component for their search) and displaying first ten results. There will be an appropriate GUI component for displaying results in all these cases. For implementing the GUI, give appropriate consideration to the aesthetics and also use the most appropriate components for a rich GUI and a seamless user interaction.

Task 5 – GUI functionality implementation

To fulfil this task, you need to make your GUI that you developed in the Task 4 functional. Write a class GUIImplementation. This class will contain methods and implementation that allows GUI in GUIHandler class to be functional. This includes using DatabaseHandler class and supporting functionalities such as:

  • when someone attempts to search using longitude and/or latitude, it retrieves all the data matching the search input and displays first ten results if the matching data exists,
  • when someone attempts to search using LSOA name it retrieves all the data matching the search input and displays first ten results if the matching data exists, and
  • If someone attempts to search using a crime type/category then it retrieves all the data matching the search input and displays first ten results if the matching data exists.00000

Task 6– Data Quality Check

  • Write a class called DataQualityCheck. This class will have appropriate implementation and will use the DatabaseHandler class to:
  • Find records within database that have no crime_ID, and export all these records in a file called nocrimeid.txt.
  • Find records that have duplicate crime_ID and export these records in a file called duplicatecrimeid.txt.

Task 7 – Errors and Exceptions Handling

You are required to have appropriate Exceptions and Error handling mechanism throughout your implementation. In addition, write two of your own custom Exception classes and use them as part of your implementation using throw and throws keywords.

Task 8– Class Diagram

Draw a Class Diagram for describing and documenting all of your implementation using Unified
Modelling Language (UML).

Task 9 – Additional Features

You should pick at least one of the sub tasks in this section and complete it. You may wish to complete more than one, and to add your own additional features, both of which can allow you to gain more marks for your submission. Some of these tasks require you to modify the other classes in the software – do so carefully and make sure you have exported a backup; a fully working version of your submission before you change anything in case you break existing functionality.

  • 9.1 Visualisation to compare counties Show a visual representation in your GUI using a bar chart or similar to compare different counties (using falls_within field in crimedata table) in terms of total number of crime records in each of them.
  • 9.2 Functional Testing
  • Write functional test cases by considering requirements in each of the tasks as part of this coursework. Prepare a functional testing report using the given template in appendix B and for each of the test cases provide indication of whether each of them passed/failed.
  • 9.3 Sorting results
  • Write implementation that builds on the functionality of task 3. In addition to requirements in tasks 4 & 5, this implementation will also allow sorting the results based on different columns of the crimedata table.

10.4 Something else…

Design and implement your own feature(s) for the search engine, adding code and/or classes where needed and documenting them appropriately.

The Report

Part of your submission for this coursework is a short written report that describes how your code solution for each task works. The report should be presented professionally and conform to the guidance below.
The report should be structured as follows:

  • A single cover page that incudes your name and UB number
  • One section for each task, comprised of at most two paragraphs of text that concisely describes how your code for each task works. The text should be focussed on explaining how your code works, and there should be between 100 and 300 words describing your solution for each task. 300 is a maximum and some tasks should use less than 300 words if they are simpler to explain.

Get Project Solution by contacting us

- via WhatsApp: +92-324-7042178

Popular posts from this blog

The Zoo Management System - entity relationship diagram & MS Access Database

Zoo Management System - Project Details: You are the employee of a big, worldwide working Zoo Management Company. Your company is responsible for the Zoo management. Your boss thinks it would be a great idea to store all data for each Zoo in a brand new self-developed ZOO Management System. Up to now, the ZOO management company has maps of each ZOO available. Your boss knows that you took a course in introduction on an ERP system, so he asks you if you could help designing such a system. Each ZOO must have the same organizational structure, which should look like this: Each Zoo has a Zoo-Address. Each Zoo has many visitors (Visitor Ticket Process (VTP). Many Zoo-Attractions belong to a Zoo. Module 1: Entity Relationship Diagram Design a ER (entity-relationship) diagram for your ZOO Management System. Use the information provided below with the entities and its attributes. Put the entities in the correct relationship to each other (organizational structure). Module 2: DB Implem...

EIT Knowledge and Innovative Community Scholarships has been announced

Admission Criteria To qualify for our programmes, applicants need to fulfill the admission requirements based on previous studies, English proficiency and relevant documentation. Previous Studies: A Completed Bachelor’s Degree In order to be admitted into a KIC InnoEnergy MSc programme, you must have completed a Bachelor’s degree encompassing a minimum of 180 ECTS credits or equivalent academic qualifications from an internationally recognized university. Please note that admissions depend on the specific BSc degree you hold for entry into the MSc programme you are interested in. Conditional Acceptance – Undergraduate Students in Final Year Students in their final year of undergraduate education may also apply and if expected to qualify, receive a conditional offer. If you have not completed your studies, please include a written statement from your university’s administration office (or equivalent department), confirming that you are enrolled in the final year of your study programme ...

Human Physiology by Stuart Ira Fox [PDF] (12th edition) free download