Revision dated 05/29/19
Educational Objectives: On successful completion of this assignment, the student should be able to
============================================
rubric to be used in assessment
--------------------------------------------
build [0..5]: x
test1 [0..10]: xx
test2 [0..10]: xx
test3 [0..10]: xx
log & report [0..5]: x
requirements and specs [0..5]: x
software engineering [-20..+5]: x
dated submission deduction [2 pts per]: ( x)
--
total: [0..50]: xx
============================================
Background Knowledge Required: Be sure that you have mastered the
material in these chapters before beginning the assignment:
Introduction to Sets,
Introduction to Maps.
Operational Objectives: Create a client WordBench of the Set API that serves as a text analysis application.
Deliverables: wordbench.h, wordbench.cpp, wordify.cpp, makefile.wb, log.txt.
The official development/testing/assessment environment is specified in the Course Organizer.
Begin by copying all of the files from the assignment distribution directory, which will include:
LIB/proj3/main_wb.cpp # driver program for WordBench LIB/proj3/wordify.rulz # rules for converting a string to a word LIB/proj3/wordify.eg # examples of applying the rules LIB/proj3/wordify.eg.com # command file to process wordify.eg: "wb.x wordify.eg.com" LIB/proj3/data* # sample word files LIB/proj3/deliverables.sh # submission configuration file
By now you should have "submit.sh" stored in your .bin directory and available as a command in your system.
Define and implement the class WordBench, placing the class API in the header file wordbench.h and implementations in the code file wordbench.cpp
Be sure to fully cite all references used for code and ideas, including URLs for web-based resources. These citations should be in the file documentation and if appropriate detailed in relevant code locations.
Test your API using the distributed client program main.cpp.
Keep a text file log of your development and testing activities in log.txt.
Submit the assignment using command submit.sh.
Warning: Submit scripts do not work on the program and
linprog servers. Use shell.cs.fsu.edu to submit assignments. If you do
not receive the second confirmation with the contents of your assignment, there has
been a malfunction.
bool ReadText (const fsu::String& infile, bool showProgress = 0); bool WriteReport (const fsu::String& outfile, unsigned short c1 = 15, unsigned short c2 = 15) const; // c1,c2 are column widths void ShowSummary () const; void ClearData ();
Identical Output. Output from wordsmith (screen and files) should be identical to that of the area51 example. (EXCEPTION: You do not need to identify the structure with the constructor. That is built in for the area51 demos only.)
This will serve several useful purposes:private: // the internal class terminology: typedef fsu::Pair < fsu::String, unsigned long > EntryType; typedef fsu::LessThan < EntryType > PredicateType; // choose one associative container class for SetType: // typedef fsu::UOList < EntryType , PredicateType > SetType; // typedef fsu::MOList < EntryType , PredicateType > SetType; typedef fsu::UOVector < EntryType , PredicateType > SetType; // typedef fsu::MOVector < EntryType , PredicateType > SetType; // typedef fsu::RBLLT < EntryType , PredicateType > SetType; // declare the two class variables: SetType wordset_; fsu::List < fsu::String > infiles_; ... };
Wordify is used to "clean up" the string passed by reference according to the processing rules above. The implementation of Wordify should be in the separate file wordify.cpp. (This function may be used again in a future assignment.) Note also that wordify.cpp should be a slave file to wordbench.cpp since it contains part of the class implementation.private: // string cleaner-upper static void Wordify (fsu::String&);
Hints
It is critical to keep track of the various APIs you are dealing with. Here is a partial list:
API File Notes fsu::List LIB/tcpp/list.h Ch 3 + Proj 1 Set LIB/tcpp/olist.h,ovector.h   Ch 9 fsu::Pair LIB/tcpp/pair.h Ch 10 fsu::String LIB/cpp/xstring.h COP3330 Review Ch 9 WordBench wordbench.h (deliverable) Proj 3 driver program LIB/proj3/main_wb.cpp Proj 3
You are tasked to implement the WordBench API. In this implementation you will need to write to the various fsu APIs.
Test your WordBench by uncomment/comment the various possible SetType definitions (except for the last one using RBLLT, which we will get to in a later assignment). How does it behave with the other unimodal implementation UOVector? How does it behave with the multimodal (MultiSet) versions, MOList and MOVector ?
Wordify. There are some supporting files for figuring out the string "wordify" process:
wordify.rulz # explains various aspects of cleaning up a string wordify.eg # several examples of strings and their wordified substring wordify.eg.com # command file to process wordify.eg
When processed, wordify.eg should result in count of 4 for each string in the file.