-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBloodData.java
More file actions
37 lines (29 loc) · 806 Bytes
/
BloodData.java
File metadata and controls
37 lines (29 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* BloodData
*/
public class BloodData {
private String bloodType;
private char RhFactor;
public BloodData() {
bloodType = "O";
RhFactor = '+';
}
public BloodData(String bloodType, char factor) {
if(bloodType == "A" || bloodType == "B" || bloodType == "O" || bloodType == "AB")
this.bloodType = bloodType;
if(factor == '-' || factor == '+')
this.RhFactor = factor;
}
public String getBloodType() {
return bloodType;
}
public void setBloodType(String bloodType) {
this.bloodType = bloodType;
}
public char getRhFactor() {
return RhFactor;
}
public void setRhFactor(char rhFactor) {
RhFactor = rhFactor;
}
}