iut-cse/OOKata

OOP child's play: Day 1

ratulMahjabin opened this issue · 0 comments

Overview

Boltu is a junior Software Engineer in a company. He got assigned to make a class of a project named "Employee-Management-System". so he wrote a class like this

public interface IEmployeeManager
{
    public Employee getEmployeeById(long id);

    public void addEmployee(Employee employee);

    public void sendEmail(Employee employee, String content);
}

public class EmployeeManager implements IEmployeeManager
{
    @Override
    public Employee getEmployeeById(long id) { ... }

    @Override
    public void addEmployee(Employee employee) { ... }

    @Override
    public void sendEmail(Employee employee, String content) { ... }
}

When Boltu took this piece of code to his manager, he told "this is like God Class" and asked him to make some modifications to the code.

Assumptions

sendEmail() method may have modifications over time for achieving efficiency.

Task

Do the modifications to the code as Project Manager intended.

Notes

The methods of the class are not fully implemented. This is just an abstracted version. You also need not to implement them fully.


Reminders

  • React to the problem if you find it interesting and helpful. This will help others to easily identify good problems to solve.
  • Feel free to comment about the problem. Is the description unclear? Do you think it is too easy or too difficult than what is mentioned? Comment about it.
  • Discussion about the solution is OK. But do not paste a solution here. Give a link to the solution instead.
  • Do you have an interesting problem? Post it.