Skip to content

Commit

Permalink
[Add] Implementation of TutorController class
Browse files Browse the repository at this point in the history
  • Loading branch information
natasakasikovic committed Mar 30, 2024
1 parent f4d7657 commit 3d29c8c
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 3d29c8c

Please sign in to comment.