Professional Documents
Culture Documents
It203: Advanced Programming (Java) Example Worksheet - 3 Lab Class: Labweek-3 (October 10-14 2011)
It203: Advanced Programming (Java) Example Worksheet - 3 Lab Class: Labweek-3 (October 10-14 2011)
It203: Advanced Programming (Java) Example Worksheet - 3 Lab Class: Labweek-3 (October 10-14 2011)
(as a superclass) and FootballTeam and BasketballTeam classes (as subclasses). Team class should contain class variables to count number of basketball teams created and all teams. A team name and championship object variables should be added as well. Overload a constructor properly. Subclasses should contain Football and Basketball related extra fields different from inherited Team fields. Choose and use them. Don't forget to override toString methods. In the main method, produce an array of Teams which is combination of Football and Basketball teams. produce only class instances as well. Write a for loop to print details of all teams.