home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
Section.java
< prev
next >
Wrap
Text File
|
1998-11-02
|
639b
|
42 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;
//{{INIT_CONTROLS
//}}
}
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();
}
//{{DECLARE_CONTROLS
//}}
}