Lab - { id = d; } public boolean equals(Object o) { return (

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

View Full Document Right Arrow Icon
import java.lang.*; public class Lab implements Cloneable { String labName; double id; public Lab() { this("", 0.0); } public Lab(String n, double d) { labName = n; id = d; } public String getLabName() { return labName; } public void setLabName(String n) { labName = n; } public double getID() { return id; }
Background image of page 1

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

View Full DocumentRight Arrow Icon
public void setID(double d)
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { id = d; } public boolean equals(Object o) { return ( ((Lab)o).getLabName().equals(labName) && ((Lab)o).getID()==id ); } public Object clone() { try { return super.clone(); } catch(CloneNotSupportedException cnse) { return null; } } }...
View Full Document

This note was uploaded on 03/25/2010 for the course CIS CIS3023 taught by Professor Seema during the Spring '10 term at Florida College.

Page1 / 2

Lab - { id = d; } public boolean equals(Object o) { return (

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