Cash-back offer from May 2nd to 7th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 18.00

CSCI203/CSCI803 ASSIGNMENT 1 | Complete Solution

Question posted by
Online Tutor Profile
request

CSCI203/CSCI803 ASSIGNMENT 1


You must write a program which reads, processes and reports on the contents of a text file.
Your program should:
1. Read the name of the text file from the console.
2. Read in a text file, line by line.
3. Split each line into words, discarding punctuation and folding all letters into lower case.
4. Store the unique words and maintain a count of each different word.
5. Sort the words first by decreasing count and, if there are multiple words with the same count, alphabetically.
6. Output the first ten words in the sorted list, along with their counts.
7. Output the last ten words in the list, along with their counts.
You must choose appropriate data structures and algorithms to accomplish this task.
Note: in the context of this assignment, appropriate choices will be efficient and
will not use excessive instructions or data.
Note: where a punctuation mark appears between two letters, the sequence is to be treated as a single word. Thus, it’s will become its, you’ll will become youll and loop-hole will become loophole.
Note: you can assume that the input file contains no more than 50,000 different words.
Note: a small sample input file “sample.txt” is provided for you to test your program.
A larger text file will be used for final assessment.


Note: you may use any data structures or algorithms that have been presented in class
up to the end of week 4. If you use other data structures or algorithms
appropriate references must be provided. Programs must compile and run under gcc (C programs), g++ (C++ programs) java or python. Programs which do not compile and run will receive no marks.
Programs should be appropriately documented with comments.
All coding must be your own work. Standard libraries of data structures and algorithms such as STL may not be used, nor may code be sourced from textbooks, the internet, etc.


Marking Guide:
Programs submitted must work! A program which fails, to compile or run will receive a mark of zero.
A program which produces the correct output, no matter how inefficient the code, will receive a minimum of 50%.
Additional marks beyond this will be awarded for the appropriateness, i.e. efficiency for this problem, of the algorithms and data structures you use.
Programs which lack clarity, both in code and comments, will lose marks.


Submission:
Assignments should be typed into a single text file called ass1.ext where ext is the appropriate file extension for the chosen language. A pdf file describing your solution should also be produced. This file should contain at least:


1. A high‐level description of the overall solution strategy:
2. A list of all of the data structures used, where they are used and the reasons for their choice.
3. A list of any standard algorithms used, where they are used and why they are used. Both files should be submitted via the submit program. submit -u user -c csci203 -a 1 ass1.ext ass1.pdf where your unix userid should appear instead of user.

Available Answer
$ 18.00

[Solved] CSCI203/CSCI803 ASSIGNMENT 1 | Complete Solution

  • This Solution has been Purchased 1 time
  • Submitted On 26 Aug, 2017 02:38:29
Answer posted by
Online Tutor Profile
solution
This Solution is rated A+ previously,if yo...
Buy now to view the complete solution
Other Similar Questions
User Profile
Exper...

CSCI203/CSCI803 ASSIGNMENT 1 | Complete Solution

This Solution is rated A+ previously,if you have any questions regarding this tutorial than you can contact me. Check your E-mail inbox to download your solution document....

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35