/* * DO NOT CHANGE THIS CLASS * * This is just a dumb little class for CSE 214, HW 3. It stores * data for a team. It doesn't really do much. */ public class Team { private String name = "No Name"; private int wins = 0; private int losses = 0; public Team(String initName, int initWins, int initLosses) { name = initName; wins = initWins; losses = initLosses; } public String getName() { return name; } public int getWins() { return wins; } public int getLosses() { return losses; } public void incWins() { wins++; } public void incLosses() { losses++; } public double calculateWinningPercentage() { return (double)wins/((double)(wins+losses)); } public String toString() { return name + " (" + wins + "-" + losses + ")"; } }