Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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!!!!!

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

S2.2 What is the bookkeeping entry for a decrease in a liability?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago