home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 November
/
Chip_1998-11_cd.bin
/
tema
/
Cafe
/
WDESAMPL.BIN
/
Section.java
< prev
next >
Wrap
Text File
|
1997-08-23
|
580b
|
38 lines
/**
* An employee section object. Allows creation, validation, and ordering of employee sections.
*/
public class Section
{
int val;
final static int MAX_LENGTH = 10;
Section(int a)
{
val = a;
}
Section(String a)
throws NumberFormatException
{
System.out.println("Parsing section; a='" + a + "' (" + a.length() + " chars)");
val = Integer.parseInt(a.trim());
}
int value()
{
return val;
}
public boolean isValid()
{
return val > 0;
}
public boolean isGreaterThan(Section a)
{
return val > a.value();
}
}