Skip to content

Commit

Permalink
Merge pull request #59 from kzi-nastava/feat/TutorController
Browse files Browse the repository at this point in the history
[Add] Implementation of TutorController class
  • Loading branch information
anasinik authored Mar 30, 2024
2 parents 2646fa6 + 3d29c8c commit 2acd5e8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions LangLang/Core/Controller/TutorController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using LangLang.Core.DAO;
using LangLang.Core.Model;
using LangLang.Core.Observer;
using System.Collections.Generic;

namespace LangLang.Core.Controller
{
public class TutorController
{
private readonly TutorDAO _tutors;

public TutorController()
{
_tutors = new TutorDAO();
}

public Dictionary<int, Tutor> GetAllTutors()
{
return _tutors.GetAllTutors();
}

public void Add(Tutor tutor)
{
_tutors.Add(tutor);
}

public void Delete(int tutorId)
{
_tutors.Remove(tutorId);
}

public void Subscribe(IObserver observer)
{
_tutors.Subscribe(observer);
}
}
}

0 comments on commit 2acd5e8

Please sign in to comment.