Create a command line utility that will compute a score for a list of first names. The list of names will be provided as

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Create a command line utility that will compute a score for a list of first names. The list of names will be provided as

Post by answerhappygod »

Create a command line utility that will compute a score for alist of first names. The list of names will be provided as a textfile. The full path to the names file will be specified as acommand line argument. The names file will contain a single line ofquoted, comma-separated names. A small sample of data can be foundbelow as well as a link to the full sample file (names.txt). Toscore a list of names, you must sort it alphabetically and sum theindividual scores for all the names. To score a name, sum thealphabetical value of each letter (A=1, B=2, C=3, etc...) andmultiply the sum by the name’s position in the list (1-based). Forexample, when the sample data below is sorted into alphabeticalorder, LINDA, which is worth 12 + 9 + 14 + 4 + 1 = 40, is the 4thname 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 scorefor the attached names.txt file is 871198282. Your solution shouldbe submitted as an Eclipse project zipped into a single file. Youare encouraged to use any common open source Java libraries thatyou feel will help; however, you must either include the necessaryjar files in the project or provide an Ivy or Maven dependencyconfiguration file. Your code should be written as if it were partof a real company codebase. As such, it should be optimized forreadability and maintainability. Also, you are aware of thefollowing up-coming requirements changes that should factor intoyour design decisions: Another department will want to use thisutility as well, but they have a much more complex name scoringalgorithm. This scoring feature will be added to the company'sintranet web-app, allowing employees to upload and score files fromtheir desktop. The company will be switching from first names onlyto both first and last names in the file.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply