Question
PART A Create a superclass to hold information about sporting teams. Design the superclass to have instance data including: Name of Sport Team Name Team
PART A Create a superclass to hold information about sporting teams. Design the superclass to have instance data including: Name of Sport Team Name Team Location Other 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. 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 overrid method implementation. Your toString() should NOT write directly (e.g. it does not do a System.out.println)) but rather returns a String, 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). Your test class should be automated, i.e. it should NOT prompt the user.
PART B (MOSTLY NEED HELP HERE) (DO NOT WANT ONE OF THE SAME ANSWERS GIVEN PAST 3 TIMES ALREADY) Modifications follow: Create at least two interfaces that types of sports teams might implement. For example, you might create a iCap interface describing cap-space considerations for team payrolls. Show the use of these interfaces by having one of your sports team classes implement one of the interfaces, and the other implement at least two of the interfaces you define. You need to explain to me what implements what, and show use in your testing code. Implement your test program (class) as a console application, i.e. write to System.out. I already have Part A completed, but I need help editing my code to implement interfaces and how they are coded.
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