Skip to main content

Posts

Showing posts with the label Java Unit Test

Java Encode Utility source code with full implementation

Hi, this will cover the implementation of encode utility as per the below requirements NOT the test cases. You can test your test cases using this encode utility and verify your test cases. Concise Specification of the encode Utility NAME: encode - encodes words in a file. SYNOPSIS encode OPT <filename> where OPT can be zero or more of -c <integer> -r -d <characters> COMMAND-LINE ARGUMENTS AND OPTIONS <filename> : the file on which the encode operation has to be performed. -c <integer>: if specified, the utility will apply a caesar cipher to all alphabetic characters (other characters remain unchanged and the original capitalization is preserved), incrementing letters by the integer passed in.  -r: if specified, the utility reverse the order of characters in every word, with a word being any set of non- whitespace characters, including non-alphabetic characters, separated from others by any whitespace character....

[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 a...