package zero.zd.zquestionnaire;


import java.util.ArrayList;

import zero.zd.zquestionnaire.model.QnA;

/**
 * Helper class for retrieving QnA for different topics.
 * for future feature: choosing diff topics instead of 1 topic
 * Note: temporary implementation
 */
class QnAHelper {

    // TODO: add more QnA, import & export file
    static ArrayList<QnA> getBasicQnA() {
        ArrayList<QnA> qnaList = new ArrayList<>();
        qnaList.add(new QnA("ABC", "ABC"));
        qnaList.add(new QnA("DEF", "DEF"));
        qnaList.add(new QnA("GHI", "GHI"));
        qnaList.add(new QnA("JKL", "JKL"));
        qnaList.add(new QnA("MNO", "MNO"));
        qnaList.add(new QnA("PQR", "PQR"));
        qnaList.add(new QnA("STU", "STU"));
        qnaList.add(new QnA("VWX", "VWX"));
        qnaList.add(new QnA("YZA", "YZA"));
        qnaList.add(new QnA("BCD", "BCD"));

        return qnaList;
    }


}

@@ -277,16 +277,453 @@
 Helper %7B
+%0A    private static QnAHelper sInstance;%0A%0A    private ArrayList%3CArrayList%3CQnA%3E%3E mSubjectList;%0A%0A    public static QnAHelper getInstance() %7B%0A        if (sInstance == null)%0A            sInstance = new QnAHelper();%0A        return sInstance;%0A    %7D%0A%0A    private QnAHelper() %7B%7D%0A%0A    public ArrayList%3CArrayList%3CQnA%3E%3E getSubjectList() %7B%0A        // populate subject list%0A        mSubjectList.add(getBasicQnA());%0A%0A        return mSubjectList;%0A    %7D
 %0A%0A    //
@@ -768,22 +768,23 @@
 ile%0A    
-static
+private
  ArrayLi

Change Helper to Singleton Class