Question
Implement an All Star Baseball Game in JAVA : Need to demonstrate : Polymorphism , Generics , Generics , Inheritance and any 2 Design Patterns
Implement an All Star Baseball Game in JAVA :
Need to demonstrate : Polymorphism , Generics , Generics , Inheritance and any 2 Design Patterns : Singleton , Facade or abstractFactory or abstractMethod !!
Model the class :
Team
Player
Semifinal
Place
Stage
FinalDrive
1) Team: will have enums with 4 different teams such as Brewers , Giants ,Cardinals and Dodgers
2) Player: will have Names , Batting Score , Bowling Score , and Ratings (Player will be the parent class)
3) Stage: Make Stage an typed Interface
4)Place: will have Stadium , city and Time such has date
5) Semifinal: Create an SemiFinal Class , The Points are calcuated by Team Score using Int adding up to 15 points
OutPut : Welcome to Semifinal of Allstar Baseball
Here is your Team :
1. Brewers
2.Giants
3.Cardinals
4. Dodgers
Please Enter a Team(1-4):
Your Team vs Dodger
Giant Vs Cardinal
Your Team Scored: 4
Cardinal scored: 10
Cardinal and Dodgers goes to Final!!!!
FinalDrive: Create an Final Drive Class , The Points are calcuated by Team Score using Int adding up to 15 points
Out Put :
Welcome to the final
Here is the Team :
1. Cardinal
2. Dodger
Enter Your Team (1-2) :
Your Team scored: 1
Dodger scored: 5
Dodger won the finals!!!!!
Team stage Player:String Place:String Semifinal: String -TeamRoster: String +getPlayerOString +setPlayer(String):Void +getplace(OString +setPlace(String):Void +getSemifinal) String +getTeamRoster()String +setTeamRoster(String) voic +ToString(String):Return Stage T> Place -Stadium:String City String ountry:String Player -Time tim miFinal Name:String Batting:int Bowling:Int Score: int +getStadium()String +setStadium +getcity OString +getCountryOString +getTimeOString +ToString(String) return eam1/Team -Tear 2:Team -Tem3:Team eam4:Team +getName(0:String +setName (String)void +getBatting(int) +setBatting(int):void +getBowling (int) +setBowling(int):void +getScore (int) + ToString(String) return +getWinner(Name):Team Flnal +Main(Args[|Strings):voi Team stage Player:String Place:String Semifinal: String -TeamRoster: String +getPlayerOString +setPlayer(String):Void +getplace(OString +setPlace(String):Void +getSemifinal) String +getTeamRoster()String +setTeamRoster(String) voic +ToString(String):Return Stage T> Place -Stadium:String City String ountry:String Player -Time tim miFinal Name:String Batting:int Bowling:Int Score: int +getStadium()String +setStadium +getcity OString +getCountryOString +getTimeOString +ToString(String) return eam1/Team -Tear 2:Team -Tem3:Team eam4:Team +getName(0:String +setName (String)void +getBatting(int) +setBatting(int):void +getBowling (int) +setBowling(int):void +getScore (int) + ToString(String) return +getWinner(Name):Team Flnal +Main(Args[|Strings):voi
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started