ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 May 2017 My Price 9.00

2015 Fall Computer Science I Program #5

I need help with this program. I have all the information read in. I need to use either merge sort or quick sort functions to solve the rest of it. That's the problem I'm having trouble with. Any advice would help! Thanks!

 

2015 Fall Computer Science I Program #5: Risk1000000Please Consult WebCourses for the due date/timeIn the board game Risk, a group of armies will attack from one country to another. To simulatethe battle, both teams roll dice. The number of dice vary from attack to attack. To "score" thebattle, you match the highest roll of the attacker with the highest roll of the defender. If theattacker's roll is greater than the defender's roll, then the defender loses an army. Otherwise, theattacker loses an army. The comparisons continue, between the attacker's second highest roll andthe defender's second highest roll.Recently, a new game, Risk1000000, similar to Risk, has been released that allows for megabattlesof up to 1,000,000 armies versus 1,000,000 armies. Also, rather than simulating a battle with adie roll, an army's strength can be any number from 1 to a billion (instead of 1 through 6 for a dieroll). One final difference in Risk1000000is that it gives the defenders an extra advantage. Insteadof lining up the highest attacking die with the highest defending die and so forth, the attackermust position his armies for each battle and show this information to the defender. The defendercan then choose any ordering of her armies.To see the difference, let's consider an example from regular Risk and a couple examples fromRisk1000000. In the original game Risk, if an attacker with two armies rolls a 6 and 3, while adefender rolls a 5 and a 2, we must match the two maximum rolls (6 versus 5) and the twominimum rolls (3 verses 2), which results in the defender losing two armies.If we were to have the same situation in Risk1000000, the defender would see that the attacker has6 for its first army and 3 for his second army. The defender can then strategically place the 2 forher first army and the 5 for her second army, resulting in the loss of one defending army and oneattacking army.

Attachments:

Answers

(11)
Status NEW Posted 26 May 2017 04:05 AM My Price 9.00

-----------

Not Rated(0)