subject

Purpose is to develop a program that uses a binary search tree, circular linked list and hashing. Create a concordance from a text file
Your program will read a file of text and produce a concordance from it. For example, output of the program for Hamlet’s famous soliloquy by Shakespeare will be:
the file, each line preceded by a line number
1: To be or not to be that is the question
2: Whether tis nobler in the mind to suffer The slings
3: and arrows of outrageous fortune Or to take arms against
4: a sea of troubles And by opposing end them To
5: die to sleep No more and by a sleep to
followed by a concordance, which shows each important word in alphabetical order, with a count of the number of occurrences, and line numbers:
Word Count Line numbers
. . .
arms 1 3
arrows 1 3
awry 1 26
ay 1 9
bare 1 17
be 3 1, 8
bear 3 13, 18, 21
bodkin 1 17
bourn 1 20
. . .
NOTE: 'be' must occur several times on the same line – do not repeat a line number
The WordCount class
The WordCount class represents all the information for a word in the concordance. So WordCount will be the information stored in the generic bst.
You must write this class. Three instance variables, then appropriate methods:
public class WordCount implements Comparable
{
protected String word;
protected int count;
protected CircularList lineNums;
. . .
lineNums here will be a reference to a circular linked list of integers, used to store line numbers of occurrence:
main() is given to you and does all the file input and output for you, setting the word and linenum to be processed. main() in pseudocode will be something like:
main
{
build then output hash table //do later
while(!eof input file) {
sets and outputs word, lineNum
//now process word and lineNum here
if(!word found in hash table) { //do later
if (word is found in bst)
update in bst
else
insert into bst
}
}
output bst
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
You know the right answer?
Purpose is to develop a program that uses a binary search tree, circular linked list and hashing. C...
Questions
question
Mathematics, 02.06.2021 23:30
question
Mathematics, 02.06.2021 23:30
question
Mathematics, 02.06.2021 23:30
question
History, 02.06.2021 23:30
question
Mathematics, 02.06.2021 23:30
question
Mathematics, 02.06.2021 23:30
Questions on the website: 13722360