Help designing a class hierarchy for a Java program
I am working on an assignment that gives you DrRacket definitions as a starting point and asks you to design a class hierarchy for a java program that models a tournament for various kind of games.
The following Racket data definitions model the elimination rounds of a sports tournament (where the sport can be either soccer or baseball):
;; Tournament is either
;; - (make-init-match MatchData)
;; - (make-advance-match MatchData Tournament Tournament)
(define-struct init-match (data))
(define-struct advance-match (data feeder1 feeder2))
;; MatchData is (make-match-data String String Score)
(define-struct match-data (contestant1 contestant2 score))
;; Score is either
;; - (make-soccer-score Number Number Boolean)
;; - (make-baseball-score Number Number Number)
(define-struct soccer-score (goals1 goaAttachment 2798ls2 extra-time?))
(define-struct baseball-score (runs1 runs2 total-innings))
I attached a picture of my diagram (i think you re supposed to use UML diagrams) but i think there's something wrong with it and i can't figure out what. Thanks.