This commit is contained in:
2017-01-26 17:50:33 +02:00
parent 7a57cae2b8
commit 077fda732a
7 changed files with 214 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections;
namespace Päevaküsimus.Models
{
public class Answer
{
public string answer { get; set; }
public bool correct { get; set; }
public int selectionCount { get; set; }
public Answer(string answer)
{
this.answer = answer;
this.correct = false;
}
public Answer(string answer, bool correct)
{
this.answer = answer;
this.correct = correct;
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections;
using System.Collections.ObjectModel;
namespace Päevaküsimus.Models
{
public class Question
{
public string question { get; set; }
private ObservableCollection<Answer> _answers;
public Question(string question)
{
this.question = question;
this._answers = new ObservableCollection<Answer>();
}
public ObservableCollection<Answer> answers { get { return _answers; } }
public void AddAnswer(Answer answer)
{
_answers.Add(answer);
}
}
}