package com.student.service; import com.student.bean.DashboardStats; import com.student.dao.StatDao; import com.student.dao.impl.StatDaoImpl; import java.util.Map; public class StatService { private final StatDao statDao; public StatService() { this(new StatDaoImpl()); } StatService(StatDao statDao) { this.statDao = statDao; } public DashboardStats getDashboard() { return statDao.getDashboardStats(); } public Map genderDistribution() { return statDao.genderDistribution(); } public Map ageDistribution() { return statDao.ageDistribution(); } public Map deptDistribution() { return statDao.deptDistribution(); } }