Create a superclass named Sport to hold information about sporting teams. Design the superclass to have instance data including: Name

Create a superclass named Sport to hold information about sporting teams. Design the superclass to have instance data including: Name

Question:

Create a superclass named Sport to hold information about sporting teams.  Design the superclass to have instance data including:Name of SportTeam NameOther characteristics common to all sports with teams Create a toString() method for the superclass, and at least one other method at the superclass level. Select two types of sports teams and define subclasses for them.  These classes need to inherit from the superclass. Create unique data members for each sport, i.e. data fields that represent unique things about that sport.  Note that these are TYPES of sports (e.g. Hockey) and not individual sports teams (e.g. Pittsburgh Penguins). 
Provide a toString() method in the subclasses that override the base class toString(), but be sure in the subclass toString() implementation that it invokes the base class toString() as part of the override method implementation. Implement at least one other method in each subclass that overrides a method from the superclass, and show that you test its implementation. Implement at least one additional method in each subclass that is unique to that subclass (i.e. doesn’t override a superclass method). Provide a test class to demonstrate your design.   Your test program must exercise each method in the subclasses and base (super)class, and must have commentary that explains your testing (to me).  For example, if I created a Hockey class, I might new up an instance for the Pittsburgh Penguins. Your test class you do everything required to test out the functionality above, you should NOT prompt the user (me) to enter data.You should have a source file for each class, thus there should be four source files in total (the Sport super class, the two types of sport subclasses, and your main/driver/testing code. )

Expert Answer:

Answer rating: 100% (QA)

Here is the process of creating the classes and test program as per your requirements Explanation Create the sport super class Create subclasses for t
View the full answer