Hi Carl,
Just curious, did you compile the Person class to the
folder java\lancs? If you already did and still have
problems I will give a try later (today).
Manuel
--- ka5kab <[EMAIL PROTECTED]> wrote:
>
> Hi Manuel,
>
> I tried what you suggested and I got this error:
> Class java.lancs not
> found. I set the classpath as c:\java\lancs so I
> don't understand
> what's going on. I took a look at the Person.java
> file and I see that
> the author is declaring: package java.lancs; Whether
> this helps or
> not I don't know. I am pasting the whole class
> below:
>
>
> package java.lancs ;
>
> /**
> * Represents simple facts about a person
> * @author Roger Garside
> * @version Last Rewritten: 17th March 1997
> */
>
> public class Person
> {
> // Person Class Constants
>
> /*
> * Constant - the upper limit for the age
> */
> private static final int UPPER_AGE = 150;
>
> /**
> * Constant - unknown gender
> */
> public static final int UNKNOWN = 99 ;
>
> /**
> * Constant - male gender
> */
> public static final int MALE = 1 ;
>
> /**
> * Constant - female gender
> */
> public static final int FEMALE = 2 ;
>
>
> // Person Instance Variables
>
> /*
> * the person's (single) forename
> */
> private String forename ;
>
> /*
> * the person's surname
> */
> private String surname ;
>
> /*
> * the person's age
> */
> private int age ;
>
> /*
> * the person's gender
> */
> private int gender ;
>
>
> // Person Constructor Methods
>
> /**
> * Creates an instance of the Person class with
> default values
> * (forename = "NONE", surname = "NONE", age =
> 0, gender =
> UNKNOWN)
> */
> public Person()
> {
> forename = "NONE" ;
> surname = "NONE" ;
> age = 0 ;
> gender = UNKNOWN ;
> } // end of constructor method
>
> /**
> * Creates an instance of the Person class with
> specified
> attribute
> * values
> * @param f forename of the person
> * @param s surname of the person
> * @param a age of the person
> * @param g gender of the person
> */
> public Person(String f, String s, int a, int g)
> {
> if (f.length() < 1)
> {
> System.err.println("bad forename
> argument in
> constructor") ;
> System.exit(1) ;
> }
> forename = f ;
> if (s.length() < 1)
> {
> System.err.println("bad surname argument
> in constructor")
> ;
> System.exit(1) ;
> }
> surname = s ;
> if ((a < 0) || (a > UPPER_AGE))
> {
> System.err.println("bad age argument in
> constructor") ;
> System.exit(1) ;
> }
> age = a ;
> if ((g != MALE) && (g != FEMALE) && (g !=
> UNKNOWN))
> {
> System.err.println("bad gender argument
> in constructor") ;
> System.exit(1) ;
> }
> gender = g ;
> } // end of constructor method
>
>
> // Person Class Methods
>
> /**
> * returns the upper limit for a valid age
> * @return the upper limit for a valid age
> */
> public static int getUpperAgeLimit()
> {
> return UPPER_AGE ;
> } // end of method getUpperAgeLimit
>
>
> // Person Instance Methods - Selectors
>
> /**
> * returns the forename attribute of the person
> * @return the forename attribute of the person
> */
> public String getForename()
> {
> return forename ;
> } // end of method getForename
>
> /**
> * returns the surname attribute of the person
> * @return the surname attribute of the person
> */
> public String getSurname()
> {
> return surname ;
> } // end of method getSurname
>
> /**
> * returns the age attribute of the person
> * @return the age attribute of the person
> */
> public int getAge()
> {
> return age ;
> } // end of method getAge
>
> /**
> * returns the gender attribute of the person
> * @return the gender attribute of the person
> */
> public int getGender()
> {
> return gender ;
> } // end of method getGender
>
> /**
> * returns the gender attribute of the person as
> a String
> * @return the gender attribute of the person as
> a String
> */
> public String getGenderString()
> {
> String x = "unknown" ;
> switch (gender)
> {
> case MALE :
> x = "male" ;
> break ;
> case FEMALE :
> x = "female" ;
> break ;
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To reply to this message, go to:
http://groups.yahoo.com/group/beginnersclub/post?act=reply&messageNum=5304
Please do not reply to this message via email. More information here:
http://help.yahoo.com/help/us/groups/messages/messages-23.html
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/beginnersclub/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/