1806ICT: Programming Fundamentals - Data Structures - Word Histogram - Construct Correlation Matrix - IT Assessment Answer

Download Solution Order New Solution
Internal Code: 1AHEEJ Code: 1806ICT

Programming Fundamentals - Data Structures - IT Assessment Answer

Assignment Task: 1806ICT Task 1 – Word Histogram Produce a histogram of all of the words in the specified file that begin with an uppercase character. The program should display to the user the filename of the file processed as well as the number of unique words it found. The program must also write out the histogram to a file with the same name as the original file with ".histogram.txt" appended. e.g. if the file is "australia.txt" the histogram file should be called "australia.histogram.txt". The histogram file should contain on each line the number of occurrences of the word and the word itself, e.g.: 5123 Australia 1024 Queensland Task 2 – Construct Correlation Matrix - 1806ICT To produce the correlation matrix you need to read the file sentence by sentence. You can assume that a sentence ends with a period. A correlation entry is incremented for words that occur in the sentence together. The correlation matrix must be output to a file ending with ".correlation.txt" (e.g. "australia.correlation.txt"). The file should print each word along the columns and also for each row. Each column is 8 characters wide. Each value displayed is no more than 7 characters wide with at least a space between each column. e.g. 1806ICT: Programming Fundamentals Task 3 – Interactive Interface - 1806ICT Once the correlation matrix has been produced the user can now type in words and the program will display the top 10 associated words in order of how frequently the word appeared, excluding the word itself, it should also display the number of times each associated word appeared with the word entered. If the user simply presses enter and doesn't enter a word the program should display the top ten most popular words in the file along with how many times the word occurred. Task 4 – Associations worth knowing - 1806ICT If two words appear in the same sentence then they may be associated, however, there is a stronger association between the two words if they occur in the same sentence in two separate files. Write a separate program which reads in the histogram and correlation matrices for two different files and creates a new correlation matrix which only contains words which occur in the same sentence in both files. Each entry in the new correlation matrix will contain the sum of the corresponding entries from the original two correlation matrices. The program should accept two filenames as parameters excluding the extension (e.g. "Australia" and "Queensland"). The program should then open "australia.histogram.txt" and "australia.correlation.txt" as well as "queensland.histogram.txt" and "queensland.correlation.txt" and produce two new files "australia_queensland.histogram.txt" and "australia_queensland.correlation.txt". The program should allow the user to interact with it similarly to Task 3 but only showing words that occur in the new correlation matrix. Extension – Remove common words - 1806ICT Up to this point, we have only been processing words that start with an uppercase letter. As an extension exercise create a version of the program which processes all words and ignores common words. The program should ignore case. Additional requirements -1806ICT The program should handle errors gracefully, for example, if a file doesn't exist. The program should give the user an indication of the task it is performing if it is going to take some time (e.g. constructing the correlation matrix). If the program is prompting the user for input the program should provide clear instructions to the user on what they can input and the resulting action that will occur.
This 1806ICT: Programming Fundamentals Assessment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.