-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQuestionStore.java
More file actions
44 lines (42 loc) · 1009 Bytes
/
QuestionStore.java
File metadata and controls
44 lines (42 loc) · 1009 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package techquiz.dto;
import java.util.ArrayList;
/**
*
* @author devanshi
*/
public class QuestionStore {
ArrayList<QuestionPojo> questionList;
public QuestionStore()
{
questionList=new ArrayList<>();
}
public void addQuestion(QuestionPojo q)
{
questionList.add(q);
}
public QuestionPojo getQuestion(int pos)
{
return questionList.get(pos);
}
public void removeQuestion(int pos)
{
questionList.remove(pos);
}
public void setQuestionAt(int pos,QuestionPojo ques)
{
questionList.add(pos,ques);
}
public ArrayList<QuestionPojo> getAllQuestions()
{
return questionList;
}
public int getCount()
{
return questionList.size();
}
}