Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Write a program to represent an athletic department of a college. Athletics s

ID: 3708264 • Letter: 3

Question

3. Write a program to represent an athletic department of a college. Athletics should be the superclass. Its attributes are name of the college and the athletic division it is in. (In August 1973, the current three-division setup of Division I, Division II, and Division III was adopted by the NCAA membership in a special convention. Under NCAA rules, Division I and Division II schools can offer scholarships to athletes for playing a sport. Division III schools may not offer any athletic scholarships.) This should have two subclasses: Mens and Womens. Both the subclasses should have number of athletes in the program, number of scholarships given (zero for Division III), the total amount of scholarship, and the list of sports offered in the school. Assume Football, Baseball, and Basketball are subclasses of Mens and Softball, Volleball, and FieldHockey are the subclasses of Womens. Each sport event should have a list of the players and their GPAs. Each of these subclasses must include (a) a default constructor and other appropriate constructors as needed, (b) 'get' and 'set' methods, (e) a method to print the information of the athletes, and (d) a method to calculate the average GPA of the team and return it. The driver class should allow a user to select any of these objects and their features, like want to see the list of women athletes in softball and their average GPA.

Explanation / Answer

CODING:

Athletics.java

==========

package com.chegg;

public class Athletics {

   private String collegeName;

   private Division division;

   public String getCollegeName() {

       return collegeName;

   }

   public void setCollegeName(String collegeName) {

       this.collegeName = collegeName;

   }

   public Division getDivision() {

       return division;

   }

   public void setDivision(Division division) {

       this.division = division;

   }

}

Division.java

==========

package com.chegg;

public enum Division {

   DIV_1("Division I"), DIV_2("Division II"), DIV_3("Division III");

   private final String value;

   private Division(String value) {

       this.value = value;

   }

}

Mens.java

========

package com.chegg;

import java.util.List;

public class Mens extends Athletics {

   private int numberOfAthlets;

   private int numberOfScholarships;

   private int totalSchoalshipAmount;

   private List<String> sports;

   public Mens() {

       //

   }

   public int getNumberOfAthlets() {

       return numberOfAthlets;

   }

   public void setNumberOfAthlets(int numberOfAthlets) {

       this.numberOfAthlets = numberOfAthlets;

   }

   public int getNumberOfScholarships() {

       return numberOfScholarships;

   }

   public void setNumberOfScholarships(int numberOfScholarships) {

       this.numberOfScholarships = numberOfScholarships;

   }

   public int getTotalSchoalshipAmount() {

       return totalSchoalshipAmount;

   }

   public void setTotalSchoalshipAmount(int totalSchoalshipAmount) {

       this.totalSchoalshipAmount = totalSchoalshipAmount;

   }

   public List<String> getSports() {

       return sports;

   }

   public void setSports(List<String> sports) {

       this.sports = sports;

   }

}

Womens.java

===========

package com.chegg;

import java.util.List;

public class Womens extends Athletics {

   private int numberOfAthlets;

   private int numberOfScholarships;

   private int totalSchoalshipAmount;

   private List<String> sports;

   public Womens() {

       //

   }

   public int getNumberOfAthlets() {

       return numberOfAthlets;

   }

   public void setNumberOfAthlets(int numberOfAthlets) {

       this.numberOfAthlets = numberOfAthlets;

   }

   public int getNumberOfScholarships() {

       return numberOfScholarships;

   }

   public void setNumberOfScholarships(int numberOfScholarships) {

       this.numberOfScholarships = numberOfScholarships;

   }

   public int getTotalSchoalshipAmount() {

       return totalSchoalshipAmount;

   }

   public void setTotalSchoalshipAmount(int totalSchoalshipAmount) {

       this.totalSchoalshipAmount = totalSchoalshipAmount;

   }

   public List<String> getSports() {

       return sports;

   }

   public void setSports(List<String> sports) {

       this.sports = sports;

   }

}

Football.java

==========

package com.chegg;

import java.util.List;

public class Football extends Mens {

   private List<String> players;

   private List<Double> gpaList;

   public Football() {

       //

   }

   public Football(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

Baseball.java

===========

package com.chegg;

import java.util.List;

public class Baseball extends Mens {

   private List<String> players;

   private List<Double> gpaList;

   public Baseball() {

       //

   }

   public Baseball(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

Basketball.java

=============

package com.chegg;

import java.util.List;

public class Basketball extends Mens {

   private List<String> players;

   private List<Double> gpaList;

   public Basketball() {

       //

   }

   public Basketball(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

Softball.java

==========

package com.chegg;

import java.util.List;

public class Softball extends Womens {

   private List<String> players;

   private List<Double> gpaList;

   public Softball() {

       //

   }

   public Softball(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

Volleball.java

==========

package com.chegg;

import java.util.List;

public class Volleball extends Womens {

   private List<String> players;

   private List<Double> gpaList;

   public Volleball() {

       //

   }

   public Volleball(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

FieldHockey.java

==============

package com.chegg;

import java.util.List;

public class FieldHockey extends Womens {

   private List<String> players;

   private List<Double> gpaList;

   public FieldHockey() {

       //

   }

   public FieldHockey(List<String> players, List<Double> gpaList) {

       super();

       this.players = players;

       this.gpaList = gpaList;

   }

   public List<String> getPlayers() {

       return players;

   }

   public void setPlayers(List<String> players) {

       this.players = players;

   }

   public List<Double> getGpaList() {

       return gpaList;

   }

   public void setGpaList(List<Double> gpaList) {

       this.gpaList = gpaList;

   }

   public Double getAvgGPA() {

       Double total = 0.0;

       for (Double gpa : gpaList) {

           total = total + gpa;

       }

       return (Double) total / gpaList.size();

   }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote