|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelper.BloodTypeServices
public class BloodTypeServices
Constructor Summary | |
---|---|
BloodTypeServices()
|
Method Summary | |
---|---|
static boolean |
isCompatible(java.lang.String motherBloodType,
java.lang.String fatherBloodType,
java.lang.String childBloodType)
Determines whether the blood type of the child is consistent genetically with the blood types of the mother and father |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BloodTypeServices()
Method Detail |
---|
public static boolean isCompatible(java.lang.String motherBloodType, java.lang.String fatherBloodType, java.lang.String childBloodType) throws java.lang.RuntimeException
motherBloodType
- a string representing a blood type, which must be one of A, B,
AB, or O (case insenstive)fatherBloodType
- a string representing a blood type, which must be one of A, B,
AB, or O (case insenstive)childBloodType
- a string representing a blood type, which must be one of A, B,
AB, or O (case insenstive)
java.lang.RuntimeException
- if any of the passed parameters are not valid blood types,
according to the specification above. The message of the
thrown exception will be "Invalid blood type!".
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |