Exercise
The file “all” on the desktop contains an Apache logfile. The goal is to process this file and output some analytics about the users of the web server. Specifically, please print the following properties:
- The list of countries of the site’s visitors, along with the % of users from each country.
- The operating system distribution.
- The browser distribution. First, think of a design for the task and call your tester afterwards. Requirements: ● At least one of the properties (countries, os, browser) should fully work. ● The code must be object oriented, for example: if we want to extract another property from the log, it should be added easily. ● Object oriented is more important than performance. ● Precision should be 2 digits after decimal point. ● The printed list should be sorted in a descending order. Tips: ● You can (and should) use google and 3rd party jars. ● If you get stuck don’t be shy and ask one of the testers. Example output: Countries: US 64.12% Germany 19.01% Brazil 12.5% Israel 5.00% Operating systems: Windows 75.01% Android 13.99% iOS 11.01% Browsers: Firefox 43.12% Chrome 32.34% IE 24.11% Safari 1.09