AccFootballTeam

AccFootballTeam - */ public void setAbbreviation(String...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
public class AccFootballTeam { private String abbreviation; private String name; private String division; private int won; private int lost; public AccFootballTeam( String theAbbreviation, String theName , String theDivision, int theWon, int theLost ){ abbreviation = theAbbreviation; name = theName; division = theDivision; won = theWon; lost = theLost; } public AccFootballTeam( String theAbbreviation, String theName , String theDivision){ abbreviation = theAbbreviation; name = theName; division = theDivision; won = 0; lost = 0; } public String toString() { String result = abbreviation + " "+ won + "-" + lost; return result; } public void incrementLosses() { lost++; } public void incrementWins() { won++; } /** * @return the abbreviation */ public String getAbbreviation() { return abbreviation; } /** * @param abbreviation the abbreviation to set
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: */ public void setAbbreviation(String abbreviation) { this.abbreviation = abbreviation; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the division */ public String getDivision() { return division; } /** * @param division the division to set */ public void setDivision(String division) { this.division = division; } /** * @return the won */ public int getWon() { return won; } /** * @param won the won to set */ public void setWon(int won) { this.won = won; } /** * @return the lost */ public int getLost() { return lost; } /** * @param lost the lost to set */ public void setLost(int lost) { this.lost = lost; } }...
View Full Document

This note was uploaded on 06/10/2011 for the course COMP 110 taught by Professor Stotts during the Spring '08 term at UNC.

Page1 / 2

AccFootballTeam - */ public void setAbbreviation(String...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online