Create one more method to use the arrays class sort method


Assignment

For this project, download the text file weblog.txt (Links to an external site.)Links to an external site.

Note: To download this file, right click on the link and select SAVE AS.

This file is an Apache web log taken from the web server for St. Mary's University. When a visitor goes to their web site, the visitor's browser makes a request to the web server to view a web page, which is a file residing on the server. Each time a page is requested by a browser, the web server records information about that request. This weblog.txt holds the details of some of those requests. See below for a list of fields with an example:

Web Log Example (Links to an external site.)Links to an external site.

This file does not include all possible information that could be collected by a web server.

For this project, you can use each line of the web log file as one string. An array of size 2990 will hold all of the lines in this file.

Minimum Requirements:

• Create a separate class called weblogger that contains the following: (4 points). Note:This class should be separate and apart from the public class that holds the main method. You can either make a class that is not a public class in the same file or you could make it public and put it in a separate .java file:

• Create a method to read each line of the web log file. (4 points)

• Each line should then be stored in a private array created in the class, such that the first element of the array is the first line of the web log file. Because each element will hold an entire line from the file, the array should be declared as an array of strings. Do use an ArrayList, you must use an array(4 points).

• Create one more method to use the Arrays class sort method to sort the contents of the array and write the contents of the array to a file. The contents of the new file should look like the original input file once your program completes, but in sorted order (4 points). Do not write your own sort function, use the Arrays cass sort method instead.

• In the primary class for your package, create a main method that creates an instance of the weblogger class and calls all of your methods. If you would like to create a graphical user interface (GUI) using Swing or JavaFX, the primary class for your package should handle all of the code necessary for the GUI. Add the code to create an object of the weblogger class and call its methods where appropriate for your GUI.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create one more method to use the arrays class sort method
Reference No:- TGS02702413

Expected delivery within 24 Hours