Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java: Web analytics is the measurement, collection, analysis and reporting of web data for purposes of understanding and optimizing web usage. Web analytics applications

In Java:

Web analytics is the measurement, collection, analysis and reporting of web data for purposes of understanding and optimizing web usage. Web analytics applications can also help companies measure the results of traditional print or broadcast advertising campaigns. Web analytics provides information about the number of visitors to a website and the number of page views. It helps gauge traffic and popularity trends which is useful for market research.

You work for a startup marketing firm called LehStart which gets page hits information from companies such as CNN, MTV and TMZ (to name a few). The page hits are in text files with a timestamp. You are working with the data analytics team and are asked to create an application which can do the following:

Provide the company website

Provide the date of the data

Provide the amount of page view for each page

Provide which page had the most page views.

Here is a sample of the output:

**********************************************

Website Name: TMZ

Page View Date: 2012-02-05

Per Webpage Page View Metrics

Webpage [1]-- Page Views[1]

Webpage [2]-- Page Views[1]

Webpage [3]-- Page Views[2]

Webpage [4]-- Page Views[0]

Webpage [5]-- Page Views[3]

Webpage [6]-- Page Views[2]

Webpage [7]-- Page Views[0]

Webpage [8]-- Page Views[0]

Webpage [9]-- Page Views[0]

Webpage [10]-- Page Views[0]

Webpage [11]-- Page Views[0]

Webpage [12]-- Page Views[0]

Webpage [13]-- Page Views[0]

Webpage [14]-- Page Views[0]

Webpage [15]-- Page Views[0]

Webpage [16]-- Page Views[0]

Webpage [17]-- Page Views[0]

Webpage [18]-- Page Views[0]

Webpage [19]-- Page Views[0]

Webpage [20]-- Page Views[0]

Webpage [21]-- Page Views[0]

Webpage [22]-- Page Views[0]

Webpage [23]-- Page Views[0]

Webpage [24]-- Page Views[0]

Webpage [25]-- Page Views[0]

Webpage [26]-- Page Views[0]

Webpage [27]-- Page Views[0]

Webpage [28]-- Page Views[0]

Webpage [29]-- Page Views[0]

Webpage [30]-- Page Views[0]

Webpage [31]-- Page Views[0]

Webpage [32]-- Page Views[0]

Webpage [33]-- Page Views[0]

Webpage [34]-- Page Views[0]

Webpage [35]-- Page Views[0]

Webpage [36]-- Page Views[0]

Webpage [37]-- Page Views[0]

Webpage [38]-- Page Views[0]

Webpage [39]-- Page Views[0]

Webpage [40]-- Page Views[0]

Webpage [41]-- Page Views[0]

Webpage [42]-- Page Views[0]

Webpage [43]-- Page Views[0]

Webpage [44]-- Page Views[0]

Webpage [45]-- Page Views[0]

Webpage [46]-- Page Views[0]

Webpage [47]-- Page Views[0]

Webpage [48]-- Page Views[0]

Webpage [49]-- Page Views[0]

Webpage [50]-- Page Views[0]

Webpage [51]-- Page Views[0]

Webpage [52]-- Page Views[0]

Webpage [53]-- Page Views[0]

Webpage [54]-- Page Views[0]

Webpage [55]-- Page Views[0]

Webpage [56]-- Page Views[0]

Webpage [57]-- Page Views[0]

Webpage [58]-- Page Views[0]

Webpage [59]-- Page Views[0]

Webpage [60]-- Page Views[0]

Webpage [61]-- Page Views[0]

Webpage [62]-- Page Views[0]

Webpage [63]-- Page Views[0]

Webpage [64]-- Page Views[0]

Webpage [65]-- Page Views[1]

Webpage [66]-- Page Views[0]

Webpage [67]-- Page Views[0]

Webpage [68]-- Page Views[0]

Webpage [69]-- Page Views[0]

Webpage [70]-- Page Views[0]

Webpage [71]-- Page Views[0]

Webpage [72]-- Page Views[0]

Webpage [73]-- Page Views[0]

Webpage [74]-- Page Views[0]

Webpage [75]-- Page Views[0]

Webpage [76]-- Page Views[0]

Webpage [77]-- Page Views[0]

Webpage [78]-- Page Views[0]

Webpage [79]-- Page Views[0]

Webpage [80]-- Page Views[0]

Webpage [81]-- Page Views[0]

Webpage [82]-- Page Views[0]

Webpage [83]-- Page Views[0]

Webpage [84]-- Page Views[0]

Webpage [85]-- Page Views[0]

Webpage [86]-- Page Views[0]

Webpage [87]-- Page Views[0]

Webpage [88]-- Page Views[0]

Webpage [89]-- Page Views[0]

Webpage [90]-- Page Views[0]

Webpage [91]-- Page Views[0]

Webpage [92]-- Page Views[0]

Webpage [93]-- Page Views[0]

Webpage [94]-- Page Views[0]

Webpage [95]-- Page Views[0]

Webpage [96]-- Page Views[0]

Webpage [97]-- Page Views[0]

Webpage [98]-- Page Views[0]

Webpage [99]-- Page Views[0]

Webpage [100]-- Page Views[0]

Webpage with the most visits is Webpage [5]

**********************************************

The following information was provided by your team on the internal wiki page, so you can get started with the project

There are three files which are provided to you formatted as name of company, date and Preview. Here is an example of a file name CNN 20150623 PViews.txt

The file will contain numbers which represent which page was viewed. If a number repeats then it means that the page was viewed multiple times.

Create a package structure as follows:

image text in transcribed

The interfaces will be provided and need to be implemented

package interfaces;

public interface IPageViews {

// Get the date from the file name and format it as yyyy-mm-dd

public String getDateFormatted();

// Create method which starts the process of analytics

public void webAnalytics();

// Look through the page views to find the largest one

public int webPageWithMostVisits();

}

package interfaces;

public interface IFileUtil {

// Get the name of the company from the file name

public String getWebSiteName();

// Get the data from the file using file streams and exceptions

public void loadFileData(int [] data);

// Get the date from the file name

public Integer getWebsiteSnapShot();

}

From the interfaces you should be able to implement them in the model package (in a java class). You should be able to take the file name and get the information of the company and date. Read the entire file and count the amount of webpages you have (use homework number 4 question 1 ad guidance). Analyze the web page hits and see which is the largest. That object should be called in the driver class in the application package and display the analytics.

src > application > interfaces. models B uitill ?CNN 20150623 PViews.txt MTV 20170830 PViews.td TMZ 20120205 PViews.txt ? src > application > interfaces. models B uitill ?CNN 20150623 PViews.txt MTV 20170830 PViews.td TMZ 20120205 PViews.txt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

Students also viewed these Databases questions