Locker - lockerId=anId l public void setCombination(String...

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

View Full Document Right Arrow Icon
package lab5; p public class Locker p { int lockerId; String combination; S //default and overloaded constructors public Locker() { lockerId = 000000; combination = "--------"; } public Locker (int iD, String combo) { lockerId = iD; combination = combo; } //accessor methods public int getId() { return lockerId; } public String getCombination() { return combination; } //mutator methods / public void setId(int anId)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { lockerId=anId;} l public void setCombination(String aCombo) { combination=aCombo; } //equals method public boolean equals(Locker theLocker) { return(lockerId==(theLocker.getId())&& (combination==theLocker.getCombination())); } public String toString() { return "Locker ID: "+lockerId+"\tCombination: "+combination; } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online