StudentAnswer.java
893 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.fh.bean;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.Gson;
public class StudentAnswer {
	
	private String studentId;
	
	private String score;
	
	private List<TestPaperInfo> questions = new ArrayList<TestPaperInfo>();
	public String getStudentId() {
		return studentId;
	}
	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}
	public String getScore() {
		return score;
	}
	public void setScore(String score) {
		this.score = score;
	}
	public List<TestPaperInfo> getQuestions() {
		return questions;
	}
	public void setQuestions(List<TestPaperInfo> questions) {
		this.questions = questions;
	}
	
	
	public static StudentAnswer parse(String json){
		Gson gson = new Gson();
		return gson.fromJson(json, StudentAnswer.class);
	}
	
	public String toJson(){
		Gson gson = new Gson();
		return gson.toJson(this);
	}
}