Question: Java . Write a public static void main that denons rates th@e functions RN PART II (practice with classes You're to write a clas -team

Java
 Java . Write a public static void main that denons rates

. Write a public static void main that denons rates th@e functions RN PART II (practice with classes You're to write a clas -team" so that the follouing code will work. te team2-new team," jets.); teaml.lose) teamz-win)a team2.1ose) team2-printrecord)i should print "-L: 1- teaml play(team2): should print "giants or . jets win System.out.printin(tean!.winningpercentaget0) // prints .000 to 1.00 In other words, you must write a class that inplenents the following interfacer interface Playable void win)i void lose) / optionally, you may also allow ties void printrecord()i void play(teamx) double winningpercentaget) class tean implenents Playable Write a reasonable simalation of the -play function. To generate a randon nunber, use Math.random, which returns a double between 0 and 0.9999 probability distribution To generate a randon nanber with a nornal, or Gaussian distribution, doi This randon number has a uniforn Random rnd new Random)i doable rnd.nextGaussian This gives a random number with expected avorago and #tandard deviation 1. To change the average (ave) and deviation (dev), use r dev+ave. To write a more sophisticated ainulation, you may want to bias the random number based on, for example, the existing -1 record of each team. Now construct an array of teams with the tollowing nanes String fbn ("Giants . , . Jets . ,-Rans" , Patriots . ,-Falcons " , . Steelers"Packers"Eagles,"Chiefs"Bills Seahawks,Cowboys"Chargers"RaidersDol phins."Saints.49ers) write code to have every tean play every other tan oe (each team will play 1 ganes) write code to print out the tean with the highest winning percentage. write code to print the teans in sorted order, by winning percentage (this part is a challenge unless you know a sorting algorsthm)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!