求教: 关于java, 真是不太明白

我是新手, 在自学java, 还是有些糊涂, 请问谁知道怎么写啊?
关键是第7步不知道怎么写

Write a class Name that stores a person's first, middle, and last names and provides the following methods:

1. public Name(String first, String middle, String last) -- constructor. The name should be stored in the case given; don't convert to all upper or lower case.

2. public String getFirst() -- returns the first name.

3. public String getMiddle() -- returns the middle name.

4. public String getLast() -- returns the last name.

5. public String firstMiddleLast() -- returns the person's full name in order, e.g., "Mary Jane Smith".

6. public String lastFirstMiddle() -- returns the person's full name with the last name first followed by a comma, e.g., "Smith, Mary Jane".

7. public boolean equals(Name otherName) -- returns true if this name is the same as otherName. Comparisons should not be case sensitive. (Hint: There is a String method equalsIgnoreCase that is just like the String method equals except it does not consider case in doing its comparison.)

8. public String initials() -- returns the person's initials (a 3-character string). The initials should be all in upper case, regardless of what case the name was entered in.

9. public int length() -- returns the total number of characters in the full name, not including spaces.

所有跟帖: 

你是哪个学校的 -更我前年的作业类似啊- 给 更我前年的作业类似啊 发送悄悄话 (0 bytes) () 03/23/2005 postreply 01:31:30

回复:求教: 关于java, 真是不太明白 -xunqi- 给 xunqi 发送悄悄话 (394 bytes) () 03/23/2005 postreply 03:56:52

回复:求教: 关于java, 真是不太明白 -sgnx- 给 sgnx 发送悄悄话 (349 bytes) () 03/23/2005 postreply 07:40:45

This is a good one, last is 乱弹 -Java鉴定家- 给 Java鉴定家 发送悄悄话 (0 bytes) () 03/23/2005 postreply 09:06:26

请您先登陆,再发跟帖!