-
Notifications
You must be signed in to change notification settings - Fork 1
/
PostScoreModel.java
64 lines (52 loc) · 1.28 KB
/
PostScoreModel.java
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import java.util.ArrayList;
/**
* Write a description of class PostScoreModel here.
*
* @author github.com/fiekzz
* @version (a version number or a date)
*/
public class PostScoreModel
{
private FieldObj fields;
private class FieldObj {
private NameObj User;
private ScoreObj Score;
FieldObj(NameObj User, ScoreObj Score)
{
this.User = User;
this.Score = Score;
}
public NameObj getUser()
{
return User;
}
public ScoreObj getScore()
{
return Score;
}
}
private class NameObj {
private String stringValue;
NameObj(String name){
this.stringValue = name;
}
public String getStringValue()
{
return stringValue;
}
}
private class ScoreObj {
private int integerValue;
ScoreObj(int score) {
this.integerValue = score;
}
public int getIntegerValue()
{
return integerValue;
}
}
public PostScoreModel(String name, int score)
{
this.fields = new FieldObj(new NameObj(name), new ScoreObj(score));
}
}