Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Cmpp307 Assignment 5 Oil Wells CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION. PAGE 1 ASSIGNMENT THREE: Binary Search Trees and Serialization Description You will be provided an ADT for...

1 answer below »

Cmpp307 Assignment 5 Oil Wells
CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION.
PAGE 1
ASSIGNMENT THREE: Binary Search Trees and Serialization

Description

You will be provided an ADT for a Binary Search Tree (BSTreeADT.java) to be implemented as a
Binary Search Tree (BST). The implementation of the BST will be used in an application called
WordTracker that reads text files and collects and stores all the unique words it finds in those files.
The BST will be able to store information from multiple text files. It will also keep track of each
occu
ence of a word in a file and the line on which it was found in that file. This information will be
stored in a list for each word object stored in the BST. The program will also produce output, specified
y the user at command line, to generate reports using a variety of iterators built into the BST.
Notes

- This is your third assignment and is worth 5.7% of your final grade in this course.
- You are required to complete this assignment with your assigned group.
- No late assignments will be accepted.
- Below you will find the specifications for your application, along with some hints on how to proceed.
- Read the specifications very carefully. If you are uncertain about any of the requirements, discuss it
with your instructor.
Specifications

1. Write a reference-based implementation (BSTree.java, BSTreeNode.java) using the instructor-
provided BSTreeADT.java and Iterator.java interfaces. JUnit should be used to test the
implementation of the Binary Search Tree.

2. Write a cross-reference program (WordTracker.java), which constructs a binary search tree with
all words included from a text file (supplied at the command line) and records the line numbers on
which these words were used. The line numbers should be stored with the file names, which in
turn are associated with the nodes of the tree.

3. Using Java serialization techniques, store the tree in a binary file (repository.ser). Make sure you
insert the class version UID to ensure the backward compatibility with your repository should the
class specification change with future enhancements.

4. Every time the program executes, it should check if the binary file (repository.ser) exists, and if
so, restores the words tree. The results of the scanning the next file are to be inserted in the
appropriate nodes of the tree. Therefore, repository.ser will contain all words occu
ed in all files
scanned with the meta information about those word locations.

5. The user should be able to run the program via the command line as follows:
CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION.
PAGE 2

java -jar WordTracker.jar -pf/-pl/-po [-f ]

a) is the path and filename of the text file to be processed by the WordTracker program.
) 3 mutually exclusive options at command line:
- -pf to print in alphabetic order all words along with the co
esponding list of files in which
the words occur.
- -pl to print in alphabetic order all words along with the co
esponding list of files and
numbers of the lines in which the word occur.
- -po to print in alphabetic order all words along with the co
esponding list of files,
numbers of the lines in which the word occur and the frequency of occu
ence of the
words.
c) Optional argument to redirect of the report in the previous step to the path and filename specified
in d) You can assume that the user will provide these arguments in the order shown.


Submission Deliverables
Assignment zip file will be uploaded into D2L by the specified due date and time, also, named as the
assignment number and your group number – i.e. A1Group3.zip.

The assignment zip file will include the following:
a. An executable Java Archive file (.jar) for your sort application called WordTracker.jar.
. A readMe.txt file with instructions on how to install and use the Word Tracker program.
c. The project should have completed javadoc using “-private” option when generated, with output
placed in the doc directory of the project.
d. A folder containing the complete Eclipse project directory.
- At the root of the project directory, include a readMe.txt to describe the completeness of the
assignment (as a percentage) and a list of known deficiencies and/or missing functionalities.


Submission Criteria

Your program must execute. Code that doesn’t run/compile will not be accepted.

No late Assignments will be accepted and will be assigned a mark of 0%.
You are expected not merely to solve the problems, but to make intelligent decisions about how to approach the
problems. Remember, it is not enough to submit adequately coded programs that merely produce the expected
output, but should be elegant, designed legibility, have maintainability, and other such important factors.
Please note that proficiency in using official Java API Doc can answer a lot of questions you may have about
using some standard Java classes and methods, and many other types of programming which you will
encounter, both at SAIT, and beyond.
CPRG 311 ASSIGNMENT 3: BINARY SEARCH TREES AND SERIALIZATION.
PAGE 3
Criteria for Marking Assignment

Binary Search Tree implementation / 4
Proper implementation of Serialization and tree persisted / 2
Proper reconstruction of BST from repository file / 2
Proper reading of files and stripping of punctuation / 3
-pf flag generates proper output / 1
-pl flag generates proper output / 1
-po flag generates proper output / 1
-f flag to create output file works properly / 1
Complete set of JUnit tests / 3
Readmes/Instructions and javadoc documentation / 2
Total: / 20

Final Individual Grade:
Team Total (20) *
Peer Evaluation Multiplier
(as a percentage)
= Subtotal (20) Final Score
* =
+
Peer Evaluations
Completed (3)
=
Final Grade (23)

Squire Vane was an elderly schoolboy of English education and Irish extraction. His English education, at one of the great public schools, had preserved his intellect perfectly and permanently at the stage of boyhood. But his Irish extraction subconsciously upset in him the proper solemnity of an old boy, and sometimes gave him back the
ighter outlook of a naughty boy. He had a bodily impatience which played tricks upon him almost against his will, and had already rendered him rather too radiant a failure in civil and diplomatic service. Thus it is true that compromise is the key of British policy, especially as effecting an impartiality among the religions of India; but Vane's attempt to meet the Moslem halfway by kicking off one boot at the gates of the mosque, was felt not so much to indicate true impartiality as something that could only be called an aggressive indifference. Again, it is true that an English aristocrat can hardly enter fully into the feelings of either party in a qua
el between a Russian Jew and an Orthodox procession ca
ying relics; but Vane's idea that the procession might ca
y the Jew as well, himself a venerable and historic relic, was misunderstood on both sides. In short, he was a man who particularly prided himself on having no nonsense about him; with the result that he was always doing nonsensical things. He seemed to be standing on his head merely to prove that he was hard-headed.
He had just finished a hearty
eakfast, in the society of his daughter, at a table under a tree in his garden by the Cornish coast. For, having a glorious circulation, he insisted on as many outdoor meals as possible, though spring had barely touched the woods and warmed the seas round that southern extremity of England. His daughter Ba
ara, a good-looking girl with heavy red hair and a face as grave as one of the garden statues, still sat almost motionless as a statue when her father rose. A fine tall figure in light clothes, with his white hair and mustache flying backwards rather fiercely from a face that was good-humored enough, for he ca
ied his very wide Panama hat in his hand, he strode across the te
aced garden, down some stone steps flanked with old ornamental urns to a more woodland path fringed with little trees, and so down a zigzag road which descended the craggy Cliff to the shore, where he was to meet a guest a
iving by boat. A yacht was already in the blue bay, and he could see a boat pulling toward the little paved pier.
And yet in that short walk between the green turf and the yellow sands he was destined to find. his hard-headedness provoked into a not unfamiliar phase which the world was inclined to call hot-headedness. The fact was that the Cornish peasantry, who composed his tenantry and domestic establishment, were far from being people with no nonsense about them. There was, alas! a great deal of nonsense about them; with ghosts, witches, and traditions as old as Merlin, they seemed to su
ound him with a fairy ring of nonsense. But the magic circle had one center: there was one point in which the curving conversation of the rustics always returned. It was a point that always pricked the Squire to exasperation, and even in this short walk he seemed to strike it everywhere. He paused before descending the steps from the lawn to speak to the gardener about potting some foreign shrubs, and the gardener seemed to be gloomily gratified, in every line of his leathery
own visage, at the chance of indicating that he had formed a low opinion of foreign shrubs.
"We wish you'd get rid of what you've got here, sir," he observed, digging doggedly. "Nothing'll grow right with them here."
"Shrubs!" said the Squire, laughing. "You don't call the peacock trees shrubs, do you? Fine tall trees--you ought to be proud of them."
"Ill weeds grow apace," observed the gardener. "Weeds can grow as houses when somebody plants them." Then he added: "Him that sowed tares in the Bible, Squire."
"Oh, blast your--" began the Squire,
Answered 16 days After Apr 17, 2022

Solution

Manikandan answered on Apr 20 2022
103 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here