akosiraff

Download Volleyball JAVA

Aug 26th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/volleyball-java/
  3. Your program is going to compare the scores of two volleyball teams that play each other. To win a match in volleyball a team must get 25 points. But they must also win by 2. So even if a team reaches 25 that game continues until one team is ahead by 2 points. Let’s assume that these two teams are going to play 5 matches.
  4. Your program should accept from the user the scores for each team one match at a time. If at any time that user enters scores that violate the 25 point rule or the “win by 2” point rule, print an error on the screen and make the user enter both scores again.
  5. When the user is finished entering the scores, the program should print which team won the game. This is the team that won the most matches.
  6. You have to use arrays and loops in this assignment.
  7. You can do a File | Export | Export to Zip and it will create a ZIP file of the application. Export the application this way to turn in during the first week of class.
  8. Sample Output: In italic is what the user entered.
  9. Spoiler
  10. Sample Output 1
  11. Welcome to the volleyball score program.
  12. Enter the number of points Team 1 got in Match 1
  13. 10
  14. Enter the number of points Team 2 got in Match 1
  15. 25
  16. Enter the number of points Team 1 got in Match 2
  17. 1
  18. Enter the number of points Team 2 got in Match 2
  19. 25
  20. Enter the number of points Team 1 got in Match 3
  21. 23
  22. Enter the number of points Team 2 got in Match 3
  23. 25
  24. Enter the number of points Team 1 got in Match 4
  25. 10
  26. Enter the number of points Team 2 got in Match 4
  27. 25
  28. Enter the number of points Team 1 got in Match 5
  29. 0
  30. Enter the number of points Team 2 got in Match 5
  31. 25
  32. Team 2 has won the game.
  33. Sample Output 2
  34. Welcome to the volleyball score program.
  35. Enter the number of points Team 1 got in Match 1
  36. 10
  37. Enter the number of points Team 2 got in Match 1
  38. 24
  39. That can’t be. One team must get at least 25 points. Please reenter the data.
  40. Enter the number of points Team 1 got in Match 1
  41. 10
  42. Enter the number of points Team 2 got in Match 1
  43. 25
  44. Enter the number of points Team 1 got in Match 2
  45. 1
  46. Enter the number of points Team 2 got in Match 2
  47. 25
  48. Enter the number of points Team 1 got in Match 3
  49. 23
  50. Enter the number of points Team 2 got in Match 3
  51. 25
  52. Enter the number of points Team 1 got in Match 4
  53. 10
  54. Enter the number of points Team 2 got in Match 4
  55. 25
  56. Enter the number of points Team 1 got in Match 5
  57. 24
  58. Enter the number of points Team 2 got in Match 5
  59. 25
  60. That can’t be. One team must win by 2 points. Please reenter the data.
  61. Enter the number of points Team 1 got in Match 5
  62. 24
  63. Enter the number of points Team 2 got in Match 5
  64. 26
  65. Team 2 has won the game.
  66. Download: http://solutionzip.com/downloads/volleyball-java/
Add Comment
Please, Sign In to add comment