Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have to create a program that creates a MLB Baseball Franchise. I created the interface that I have to implement and the abstract class

I have to create a program that creates a MLB Baseball Franchise. I created the interface that I have to implement and the abstract class I have to extend. The abstract class will be the guideline for creating a baseball team in the MLB (Major League Baseball). The interface will be a template for creating a player for a baseball team. Lastly, I have to create a class that will implement the CreateGame interface. This class will simulate a game played between two teams. The simulation will run in a class called PlayBall. I have to do the following:

Implement the CreatePlayer Interface

Extend the Team Abstract Class

Implement the CreateGame Interface

Run the game

Show the current score while game is played after each inning.

Show the final score when the game ends.

Determine the winner and print the winners name and final score

create player interface below:

public interface CreatePlayer { public abstract void setPlayerName(String name); public abstract String getPlayerName(); public abstract void setPlayerPosition(String position); public abstract String getPlayerPosition(); public abstract void setPlayerAge(int age); public abstract int getPlayerAge(); } 

Create game interace below:

 public interface CreateGame { public abstract void runGame(); //should run the game as a simulation that automatically plays the whole game until end of 9 innings. public abstract String printAfterInning(); //should print score for each team after each inning public abstract String printWinnerAfterGame(); //should print the winner and final score after game completed } 

Create team abtract class

 public abstract class Team { public final int rosterCount = 9; public abstract void setTeamName(String name); public abstract String getTeamName(); public abstract void setTeamCity(String city); public abstract String getTeamCity(); public int getRoster(){ return rosterCount; } } 

I just need help on getting started. I've had trouble for a while now. Any help will be very much appreciated, thanks in advance.

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

Students also viewed these Databases questions