Question: In Java Design a basketball App that tracks and predicts scores use the observer pattern The implementation is for a program that includes a class
In Java Design a basketball App that tracks and predicts scores use the observer pattern The implementation is for a program that includes a class "Scoring" that keeps track of a basketball game scores and the subscribers (observers) that are subscribed to that scoring class. Subject class updates the score of a game 4 times (every quarter). The user indicates when the quarter ends through console input. You initially have 3 subscriber Objects which need to know the updated score after every quarter. Your observers (subscribers) are: An object that aims to predict final game score. (based on any logic that you prefer, prediction accuracy not a grading factor here) An object that is keeping track of all scores ( how many games one by each team) An object that generates a news piece title based on the game result Your program class should offer a menu to: start a new game (picks 2 random teams and instantiates the Scoring class). Simulate 1 quarter ( your scoring class updates scores then notifies subscribers). You are allowed to use either randomly generate basketball scores or just use stored results previous seasons) print current score print current prediction (from Object A) Eprint prediction stats (how many correct final results until now, average point error rate or other stats you think of) print a table of scores of all finished games generate a news piece title based on result of the last finished game. Example: (("TeamA-name" beat "TeamB-name" by 23 points in a landslide/tightly contested game))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
