-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuiz.java
40 lines (33 loc) · 975 Bytes
/
Quiz.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
/*
* **********************************************
* San Francisco State University
* CSC 220 - Data Structures
* File Name: Quiz.java
* Author: Duc Ta
* Author: Bryan Khor
* **********************************************
*/
package CSC220ASMT2;
public final class Quiz {
//
// Instance Data Fields
//
private QuestionAnswer questionAnswer;
//
// Constructors
//
public Quiz() {
}
public Quiz(QuestionAnswer questionAnswer) {
this.questionAnswer = new QuestionAnswer(questionAnswer.getQuestion(), questionAnswer.getAnswer());
}
//
// Instance Methods
//
public void setQuestionAnswer(QuestionAnswer questionAnswer) {
this.questionAnswer = new QuestionAnswer(questionAnswer.getQuestion(), questionAnswer.getAnswer());
}
public QuestionAnswer getQuestionAnswer() {
return new QuestionAnswer(this.questionAnswer.getQuestion(), this.questionAnswer.getAnswer());
}
}