Bee_Solutions - return year public int getMOB return month...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Bee{ private int month; private int year; private int tag; private static int lastTag= -1; /**public Bee(){ month= 1; year= 0; tag= lastTag+1; lastTag= tag; }*/ public Bee(){ this(1,0); } public Bee(int m,int y){ month= m; year= y; tag= lastTag+1; lastTag= tag; } public int getYOB(){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return year; } public int getMOB(){ return month; } public int getTag(){ return tag; } public boolean equals(Object obj){ if (!(obj instanceof Bee) || obj==null) return false; Bee o= (Bee) obj; return year == o.year && month == o.month; } }...
View Full Document

This homework help was uploaded on 02/20/2009 for the course CS 100 taught by Professor Fan/vanloan during the Spring '07 term at Cornell.

Ask a homework question - tutors are online