Question: Need help on a programming assignment please for c++. here are the files in question to be used: http://jmp.sh/hVGtM45 and here are the weiss files:
Need help on a programming assignment please for c++.


here are the files in question to be used: http://jmp.sh/hVGtM45
and here are the weiss files: http://jmp.sh/lWn10s7
thank you for any help!!
Programming Assignment #4, 50 points (2 hours) ECS 60 Winter 2017 Due Wednesday, March 1st, 11:59pm. Files NOT to handin to cs60 p4 are: SpellRunner.cpp, mynew. ,CPUTimer.h Minimum files to handin to cs60 p4 are: Makefile, speller.h, speller.cpp, authors.csv You are to write an efficient program that wi read a dictionary of 100,000 words, and then check a document of 2,000,000 words. The program should insert into an array the position of each misspelled word. Ihave provided the driver program SpellRunner.cpp, and the necessary class stubs in speller.h, and speller.cpp. You may add any classes and/or code you wish to speller.cpp, and speller.h. You may also use, and alter any Weiss files. CreateDocs.out creates files used for testing. All files mentioned, as well as my executable, speller.out, can be foundin assdavis 60/p4 Further specifications 1. Command Line parameter is the name of the Dict file. SpellRunner parses the filename to determine the name of the corresponding Doc and Wrongs files. 2. Files 2.1 .Since SpellRunner.cpp handles all file input, you need not concerned with how to read them 2.2. File names are appended with three numbers: number of words in dictionary size, number of words in the document words, and the seed used for the random number generator 2.3. Dict files contain the words of the dictionary, each on its own line. You may assume that dictionary words w never be more than 20 characters long. Here is sting of number occurrences of different lengths of words from a set of 3 Dict files with 100,000 words each. You may wish to do further analysis. ssaavisClect1 p4] awk. print length k 2 Dict. tx Sort sort. uniq 48689 304 2 7 12733 12 382 17 3540 3 46551 8 551 13 138 4642 4 40081 9 3609 ssdaviselect1 p41 27511 5 30596 10 1894 15 40 663 6 20400 1 702 16 2.4. Doc files contain the words of the document, each on its own line 2.5. Wrongs files contain the position of each misspelled word in the corresponding Doc file 2.5 SpellRunner checks the array you fill to see if it matches the contents ofthe Wrongs file. It wi check both for misspelled words that your program missed, and correctly spelled words that your program reported as misspelled 2.6. To copy the Doc files to your current directory type: cp ssdavis/60/p4/*.txt. 3. Dynamic Memory Allocation 3.1. You may not use malloc0, free0, maxRAM, or currentRAM anywhere in your source code, including any Weiss files. No entity larger the 80 bytes may be created without using new. If you use any outside files, other than template files, you must add #include "mynew.h" at the top of the files. 3.2. The underlying code of the overloaded new provided by mynew.cpp uses the fact that the real memory manag works in increments of 16 bytes, and charges 8 bytes for its overhead no matter what size is requested. Using mem.cpp, I found that requesting 1 to 24 bytes costs 32 bytes, requesting 25 to 40 bytes costs 48 byt es, and requesting 41 to 56 bytes costs 64 bytes. It is these costs that are summed to determine your current RAMfigure max RAM holds the largest value currentRAM ever held 4. Measurements 4.1.CPU time starts just before constructing your Speller object in main 0, and ends after your check0 function returns Thus, your destructors will not be called during CPU time You may not have any global variables since they would be constructed before CPU time starts. 4.2 "Real RAM s the maximum size of real dynamic RAM to which your program ever grew 5. Grading 5.1. The program will be tested using three 100000 word dictionary, and 2,000,000 word document. The measurements will be the total of the three runs there are ANY error messages from SpellRunner, then the program will receive zero 5.2. If 3. If your code has no error messages, and takes less than 30 CPU time, then you will receive at least 20 points 5.4. CPU Time score-15 Sean's CPU Your CPU) 5.5 maxRAM score 15 Sean's max RAM Your max RAM) 5.6. final score min(55, 20 +CPU Time score max RAM score) 5.7. You will lose 5 points if your program has a memory leak as determined by valgrind 6. Makefile. The Makefile provided contains the minimum needed to create speller.out Programming Assignment #4, 50 points (2 hours) ECS 60 Winter 2017 Due Wednesday, March 1st, 11:59pm. Files NOT to handin to cs60 p4 are: SpellRunner.cpp, mynew. ,CPUTimer.h Minimum files to handin to cs60 p4 are: Makefile, speller.h, speller.cpp, authors.csv You are to write an efficient program that wi read a dictionary of 100,000 words, and then check a document of 2,000,000 words. The program should insert into an array the position of each misspelled word. Ihave provided the driver program SpellRunner.cpp, and the necessary class stubs in speller.h, and speller.cpp. You may add any classes and/or code you wish to speller.cpp, and speller.h. You may also use, and alter any Weiss files. CreateDocs.out creates files used for testing. All files mentioned, as well as my executable, speller.out, can be foundin assdavis 60/p4 Further specifications 1. Command Line parameter is the name of the Dict file. SpellRunner parses the filename to determine the name of the corresponding Doc and Wrongs files. 2. Files 2.1 .Since SpellRunner.cpp handles all file input, you need not concerned with how to read them 2.2. File names are appended with three numbers: number of words in dictionary size, number of words in the document words, and the seed used for the random number generator 2.3. Dict files contain the words of the dictionary, each on its own line. You may assume that dictionary words w never be more than 20 characters long. Here is sting of number occurrences of different lengths of words from a set of 3 Dict files with 100,000 words each. You may wish to do further analysis. ssaavisClect1 p4] awk. print length k 2 Dict. tx Sort sort. uniq 48689 304 2 7 12733 12 382 17 3540 3 46551 8 551 13 138 4642 4 40081 9 3609 ssdaviselect1 p41 27511 5 30596 10 1894 15 40 663 6 20400 1 702 16 2.4. Doc files contain the words of the document, each on its own line 2.5. Wrongs files contain the position of each misspelled word in the corresponding Doc file 2.5 SpellRunner checks the array you fill to see if it matches the contents ofthe Wrongs file. It wi check both for misspelled words that your program missed, and correctly spelled words that your program reported as misspelled 2.6. To copy the Doc files to your current directory type: cp ssdavis/60/p4/*.txt. 3. Dynamic Memory Allocation 3.1. You may not use malloc0, free0, maxRAM, or currentRAM anywhere in your source code, including any Weiss files. No entity larger the 80 bytes may be created without using new. If you use any outside files, other than template files, you must add #include "mynew.h" at the top of the files. 3.2. The underlying code of the overloaded new provided by mynew.cpp uses the fact that the real memory manag works in increments of 16 bytes, and charges 8 bytes for its overhead no matter what size is requested. Using mem.cpp, I found that requesting 1 to 24 bytes costs 32 bytes, requesting 25 to 40 bytes costs 48 byt es, and requesting 41 to 56 bytes costs 64 bytes. It is these costs that are summed to determine your current RAMfigure max RAM holds the largest value currentRAM ever held 4. Measurements 4.1.CPU time starts just before constructing your Speller object in main 0, and ends after your check0 function returns Thus, your destructors will not be called during CPU time You may not have any global variables since they would be constructed before CPU time starts. 4.2 "Real RAM s the maximum size of real dynamic RAM to which your program ever grew 5. Grading 5.1. The program will be tested using three 100000 word dictionary, and 2,000,000 word document. The measurements will be the total of the three runs there are ANY error messages from SpellRunner, then the program will receive zero 5.2. If 3. If your code has no error messages, and takes less than 30 CPU time, then you will receive at least 20 points 5.4. CPU Time score-15 Sean's CPU Your CPU) 5.5 maxRAM score 15 Sean's max RAM Your max RAM) 5.6. final score min(55, 20 +CPU Time score max RAM score) 5.7. You will lose 5 points if your program has a memory leak as determined by valgrind 6. Makefile. The Makefile provided contains the minimum needed to create speller.out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
