namespace

Introduction:

In this assignment you will be analyzing search queries from various engines. (A daunting task, like what does that even mean)

In short you will prompt the user for the name of a file, attempt to open said file, and if succeeded then you will begin to parse and output as follows.Each line will contain one search query (type a search into google and look at the URL, that thing)You are to parse each one for information and output it to a file while also tracking some information about everything you have parsed. (Ok those were some words lets break that down)

In short you will prompt the user for the name of a file, attempt to open said file, and if succeeded then you will begin to parse and output as follows.Each line will contain one search query (type a search into google and look at the URL, that thing)You are to parse each line for certain information, more on that later, and output this information to a file. While doing this you will track some information about the file. (Ok that was alot of words lets break that down)

Explanation:

For each input line: (all examples bellow are reffering to the following query (https://www.google.com/search?q=some+query&oq=some+query&aqs=chrome..69i57j0l5.2991j0j9&sourceid=chrome&ie=UTF-8))

  • You will grab the site that they are querying
    • would be google.com in this case
  • You will grab the query string
    • In this case it would be “some query”
    • Note it is not “some+query” but some query
  • You will grab any options (if there are any)
    • There are many of these in the above query
      • oq=”some query”
      • aqs = “chrome…69i57j0l5.2991j0j9”
      • sourceid=”chrome”
      • ie = “UTF-8”

For the file:

  • Track the number of queries that were in the file
  • The average number of options (these count all things that are not the query string q)
  • Average length of the query string (just the q parameter)
  • Average length of the url

Output:

The output is split into two parts. The information for each of the individual url will output to a file and the output about the file statistics will be output to standard output (terminal).

Screen Output Example:Statistics for

————————-

Number of Queries:

Average length of URL:

Average length of query string:

Average number of options:

File Output example:.

.

.

:

——————-

URL:

:

:

\n (this should be a blank line just put a newline)

.

.

.

Input:

Ask the user to enter the file name. Here is an example file

.

.

.

Requirements:

  • You must buld a namespace called “helpers” you will define any fuctions that help calculate (like averages) or manipulate (maybe some strings)
    • You are required to have at least two functions in this namespace
      • Calculating averages and maybe putting the spaces in the query string in place of ‘+’ are good canidates
    • You may use more functions than this (and i recommend you do) but you must do the following
      • If the function is a “helper” (see the above explinations about what a helper is) is must be in the helper namespace
      • This will be mentioned bellow but you must document your function
        • Include what the function does and what the parameters are
  • You must build a namespace called “interface” you will define any functions that help you prompt the user / print to file
    • You are required to have at least two functions in this namespace
      • Printing information to the screen (standard input), maybe your final output to the screen would be a good canidate
      • Another would be a function that prints a line and the corsponding “—-” line that will match up with it
    • You may use more functions than this (and i recommend you do) but you must do the following
      • If the function is a “helper” (see the above explinations about what a helper is) is must be in the helper namespace
      • This will be mentioned bellow but you must document your function
        • Include what the function does and what the parameters are
  • All functions must be documented above a prototype
  • Each time a line has “—-” (dashes under it)
    • The dash line must be the same length as the line above it

Hide 

Files: input.txt

Calculate the price of your order

Simple Order Process

Fill in the Order Form

Share all the assignment information. Including the instructions, provided reading materials, grading rubric, number of pages, the required formatting, deadline, and your academic level. Provide any information and announcements shared by the professor. Choose your preferred writer if you have one.

Get Your Order Assigned

Once we receive your order form, we will select the best writer from our pool of experts to fit your assignment.

Share More Data if Needed

You will receive a confirmation email when a writer has been assigned your task. The writer may contact you if they need any additional information or clarifications regarding your task

Let Our Essay Writer Do Their Job

Once you entrust us with your academic task, our skilled writers embark on creating your paper entirely from the ground up. Through rigorous research and unwavering commitment to your guidelines, our experts meticulously craft every aspect of your paper. Our process ensures that your essay is not only original but also aligned with your specific requirements, making certain that the final piece surpasses your expectations.

Quality Checks and Proofreading

Upon the completion of your paper, it undergoes a meticulous review by our dedicated Quality and Proofreading department. This crucial step ensures not only the originality of the content but also its alignment with the highest academic standards. Our seasoned experts conduct thorough checks, meticulously examining every facet of your paper, including grammar, structure, coherence, and proper citation. This comprehensive review process guarantees that the final product you receive not only meets our stringent quality benchmarks but also reflects your dedication to academic excellence.

Review and Download the Final Draft

If you find that any part of the paper does not meet the initial instructions, send it back to us with your feedback, and we will make the necessary adjustments.