Write a static method purpleGold that accepts as a parameter a Scanner that reads its input from a file containing a series of names followed by integers. The names alternate between purple team member names and gold team member names. Your method should compute the absolute difference between the sum of the purple teams’ integers and the sum of the gold teams’ integers. The input could end with either a purple or gold team member; you may not assume that it contains an even number of names. If the input file tas.txt contains the following text, Chloe 3 Eyad 7 Noa 14 James 13 Nile 4 Kelvin 12 Justin 6 Mitchell 0 Then your method could be called in the following way: Scanner input = new Scanner(new File(“tas.txt”)); purpleGold(input); And produces this console output, since the purple team’s sum is 3+14+4+6 = 27 and the gold team’s sum is 7+13+12+0 = 32: 4 purple, 4 gold Difference between purple team and gold team sums: 5 Requirements: Does not matter just follow the rubric
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more