a group of four friends visit a sports club and they decide to practice archery. each player 3 chances and in every chance they can score between 0 to 10 points. the player with the maximum score after adding the scores obtained in all 3 chances wins. write an application that simulates this game and prints the scores of all four players in a tabular format and also prints which player won.
each line in the table should contain the following:
1.the player number
2.their first chance score
3.their second chance score
4.their third chance score
- their score after all three chances.
use multidimensional arrays to store the scores of players in each chance.
use the secure random-number generation mechanism learnt in the previous chapter to generate scores between 0 and 10 for each player chance(java.security.SecureRandom)
Aucun commentaire:
Enregistrer un commentaire