Create a command line utility that will compute a score for a list of first names.
The list of names will be provided as a text file. The full path to the names file will be specified as a command line argument. The names file will contain a single line of quoted, comma-separated names. A small sample of data can be found at the end of this document and a full sample file (names.txt) is attached.
To score a list of names, you must sort it alphabetically and sum the individual scores for all the names. To score a name, sum the alphabetical value of each letter (A=1, B=2, C=3, etc…) and multiply the sum by the name’s position in the list (1-based).
For example, when the sample data below is sorted into alphabetical order, LINDA, which is worth 12 + 9 + 14 + 4 + 1 = 40, is the 4th name in the list. So, LINDA would obtain a score of 40 x 4 = 160. The correct score for the entire list is 3194. The correct score for the attached names.txt file is 871198282.
Your solution should be submitted as source files only – no complied binaries or jar files are to be submitted. The code should be syntactically correct and compile without errors. You are encouraged to use any common open source Java libraries that you feel will help; however, you must provide a manifest of dependent libraries as one of the source files.
Your code should be written as if it were part of a real company codebase. As such, it should be optimized for readability and maintainability. Also, you are aware of the following up-coming requirements changes that should factor into your design decisions:
• Another department will want to use this utility as well, but they have a much more complex name scoring algorithm.
• This scoring feature will be added to the company’s intranet web-app, allowing employees to upload and score files from their desktop.
• The company will be switching from first names only to both first and last names in the file.
Sample names file data:
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Platinum Essay has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.
At Platinum Essay, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.
Admission and Business Papers
Be assured that you’ll definitely get accepted to the Master’s level program at any university once you enter all the details in the order form. We won’t leave you here; we will also help you secure a good position in your aspired workplace by creating an outstanding resume or portfolio once you place an order.
Editing and Proofreading
Our skilled editing and writing team will help you restructure you paper, paraphrase, correct grammar and replace plagiarized sections on your paper just on time. The service is geared toward eliminating any mistakes and rather enhancing better quality.
We have writers in almost all fields including the most technical fields. You don’t have to worry about the complexity of your paper. Simply enter as much details as possible in the place order section.