Create a scanner object to open the given input

Assignment Help Computer Engineering
Reference no: EM132105100

Problem Statement:

In this project, you are asked to write a Java application that utilizes your knowledge about a number of data structures we have been discussing throughout the course of this semester.

The main task of this application is to automatically generate a book index for a given arbitrary text file.

As you know, a traditional book index lists on which page each important/key word occurs. In the application that you will develop, you are required to generate an index for ALL words in the given file.

To standardized testing of all students' submissions, all of you are required to use the given text file posted online next to this project statement.

The file name is "alice30.txt" and it contains the famous Alice in Wonderland book that is freely available via Project Gutenberg. The simple given test file that you MUST use does NOT have page numbers and thus you will use chapters instead in your indexing.

While considering which data structure that can best fit this application, please remember that your index will look similar to the following:

"Keyword"?{2, 3, 7, 9}

Where "keyword" is the word that you are trying to index and {2, 3, 7, 9} is the set of chapters that "keyword" occurs in. In other words, "keyword" occurs in chapters 2, 3, 7, and 9. If a keyword occurs multiple times in the same chapter, your index will ONLY list the chapter one time and thus maintain the set property.

The structure of such index can be implemented using a Map whose keys are the Strings representing the words that you are indexing and the value associated with each key is a set of integer values denoting which chapters a particular key word occurs.

Hint: your main data structure can take the following form. The choice of TreeMap and TreeSet will ensure that the data stored in these structures are sorted.

TreeMap>

Your code is expected to have two files with the following functionalities:

A Driver program that will create a Scanner object to open the given input file and make sure that ALL non-alphabetical characters are skipped. To do that you need to use the appropriate regular expressions with the .useDelimiter() method of the scanner class. Then, all data from the input file will be read and converted to lower case. The driver program will then invoke the appropriate methods from the MainIndexingClass to generate the desired index then display the generated index on the monitor.

A MainIndexingClass file that defines the selected data structure then provides appropriate constructor to initialize that TreeMap. This class also will provide all needed functionalities to generate and maintain the required index structure.

Reference no: EM132105100

Questions Cloud

Budget and get the project done with the cut specified : What if your boss says "just cut the budget and get the project done with the cut specified?" How would you handle this?
Advantages and disadvantages of practicing change control : What are some of the advantages and disadvantages of practicing Change Control?
Why do some organizations not practice change control : Why do some organizations not practice Change Control?
Write a c program to implement your pseudocode : Write a C program that computes the following ordinary trigonometric functions.
Create a scanner object to open the given input : write a Java application that utilizes your knowledge about a number of data structures we have been discussing throughout the course of this semester.
What risks were present with this project : 1. Research the building of the tunnel under the English Channel in the late twentieth century.
Component of one of the major deliverables : Can planning and Design be it's own deliverable on the WBS or should it be a sub-component of one of the major deliverables?
Stakeholders of homeless people : What are the 3 stakeholders of homeless people? And What's their Role
What techniques can you use to identify risks : What techniques can you use to identify risks. Why is it important to think about risks? What strategies can be employed to mitigate project risks?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd