@@ -0,0 +1,2261 @@
+import java.util.*;%0Aimport java.io.*;%0A%0Apublic class Matchmaker %7B%0A%0A%0A%09//Converts rank to a double between 0 and 1, 1 being the best%0A%09private double rankToCompanyWeight(int rank) %7B%0A%0A%09%09if (rank %3C= 0) %7B%0A%09%09%09return 0;%0A%09%09%7D else %7B%0A%09%09%09return (501 - rank) / 500.0;%0A%09%09%7D%0A%09%7D %0A%0A%09private double jobMetric(double skillMatch, double companyValue, double companyDistanceMetric, double resumeDescriptionMatch) %7B%0A%0A%09%09//Weights should add to 1. Change accordingly%0A%09%09//All inputs to this function should be between 0 and 1 based on how good each one is (0 being bad, 1 being good)%0A%0A%09%09return .4 * skillMatch + .3 * companyValue + .2 * companyDistanceMetric + .1 * resumeDescriptionMatch;%0A%0A%09%7D%0A%0A%0A%09//If more than 100 miles away, give it a distance ranking of 0 b/c too far%0A%09//Otherwise, map from 0 to 1%0A%09private double distanceMetric(double distance) %7B%0A%0A%09%09if (distance %3E 100) %7B%0A%09%09%09return 0;%0A%09%09%7D else %7B%0A%09%09%09return (100 - distance) / 100.0;%0A%09%09%7D%0A%0A%09%7D%0A%0A%09public Job%5B%5D sortJobs(Profile user, Job%5B%5D listOfJobs) %7B%0A%0A%09%09for (int i = 0; i %3C listOfJobs.length; i++) %7B%0A%0A%09%09%09Job job = listOfJobs%5Bi%5D;%0A%09%09%09String jdFilename = job.getJDFilename();%0A%09%09%09String jobSkillsFilename = job.getJobSkillsFilename();%0A%09%09%09String companyName = job.getCompanyName();%0A%09%09%09double latitude = job.getLatitude();%0A%09%09%09double longitude = job.getLongitude();%0A%0A%09%09%09Fortune500Ranking companyRanker = new Fortune500Ranking(%22Fortune500List%22);%0A%0A%09%09%09int companyRank = companyRanker.getRank(companyName);%0A%09%09%09double companyDistance = ZipDistCalc.calcDistance(latitude, longitude, user.getLatitude(), user.getLongitude());%0A%0A%09%09%09String userResumeFilename = user.getResumeFilename();%0A%09%09%09String userSkillsFilename = user.getSkillsFilename();%0A%0A%09%09%09double resumeDescriptionMatch = (new ResumeJDComparison(userResumeFilename, jdFilename)).percentMatch();%0A%09%09%09double skillMatch = (new SkillsJDComparison(userSkillsFilename, jobSkillsFilename)).percentMatch();%0A%0A%09%09%09job.setRank(jobMetric(skillMatch, rankToCompanyWeight(companyRank), distanceMetric(companyDistance), resumeDescriptionMatch));%0A%0A%09%09%09job.setSkillsMatch(skillMatch);%0A%09%09%09job.setDescriptionMatch(resumeDescriptionMatch);%0A%09%09%09job.setDistance(distanceMetric(companyDistance));%0A%09%09%09job.setCompanyValue(rankToCompanyWeight(companyRank));%0A%0A%0A%09%09%7D%0A%0A%09%09Arrays.sort(listOfJobs);%0A%0A%09%09return listOfJobs;%0A%0A%0A%0A%0A%09%7D%0A%0A%0A%7D%0A

Create Matchmaker.java