Find Jobs
Hire Freelancers

ArrayList Quidditch Tournament Simulation Java

$10-30 USD

Ολοκληρώθηκε
Αναρτήθηκε περίπου 7 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
I need it in the next 14 hours. Only bid if you can finish in the next 14 hours. Directions: 1. Create an ArrayList of Strings containing the names of your 8 ‘teams’. Use humorous names for your teams (Dwarves, Wizards, Dinosaurs, etc.) 2. Code a method public void playGame(int teamA, int teamB, ArryList<string> teams) a. teamA and teamB are the indices (sic. Indexes) of the teams that are playing the current game. You will use these to retrieve the String name of the team. For our purposes a Quiddich game has four quarters: b. Each team randomly scores 0 to 4 goals worth 10 points each per quarter (0 – 40 points per quarter. c. Each quarter, there is a 15% chance that a team will capture the Golden snitch. If that happens the game ends immediately and that team wins. (First determine if a team got the snitch, then if one did randomize which one wins with even probability.) d. The method should display the results for each quarter that is played and indicate the final score or if the teams won by capturing the snitch. e. There are no ties. Play additional sudden death quarters until one team wins. f. Your method should remove the loosing team from the ArrayList and print a msg that that team (using the String name) has been eliminated from the Tourney. 3. Code your main program to display the list of teams. Then run the tournament. For each round pit every other team against one another. a. First round: 4 games reduces teams to 4 remaining. b. Second round: 2 games reduces teams to final 2 c. Final round: 1 game determines the tournament winner. Each time show the list of remaining teams and use your method to run the games for that round. (Hint: just use even/odd indices for the pairings: Team index 0 plays team index 1, team index 2 plays team index 3, etc.) d. NOTE: use the printf output method, tabs \t, and divider lines to reasonably style your program’s output similar to the example below. Some of this code is in the method and some will be in the main program that calls it. Round #1 ====================================== Dwarves vs Wizards ------------------------- Qtr 1: 2 4 Qtr 2: 3 1 Qtr 3: 0 2 Qtr 4: 2 2 Wizards Win 9 to 7 Dwarves eliminated -------------------------- etc. rest of round #1 games follow
Ταυτότητα εργασίας: 13775084

Σχετικά με την εργασία

4 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 7 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
We are good in java and can complete your task within given time. We are a new company engaged in local projects and starting to make our presence in freelancer. Will appreciate if you give this project to us.
$25 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0
4 freelancers δίνουν μια μέση προσφορά $74 USD για αυτή τη δουλειά
Avatar Χρήστη
A proposal has not yet been provided
$120 USD σε 3 ημέρες
4,9 (159 αξιολογήσεις)
6,4
6,4
Avatar Χρήστη
Hi, I can do it. Please PM for details. Thanks, Usama ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$50 USD σε 1 ημέρα
5,0 (2 αξιολογήσεις)
2,3
2,3

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Hawthorn Woods, United States
5,0
143
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Νοε 25, 2010

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.