Class StatsInfoService

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class StatsInfoService
    extends javax.servlet.http.HttpServlet
    See Also:
    Serialized Form
    • Constructor Detail

      • StatsInfoService

        public StatsInfoService()
    • Method Detail

      • init

        public void init()
        Overrides:
        init in class javax.servlet.GenericServlet
      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • doPost

        protected void doPost​(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws javax.servlet.ServletException,
                              IOException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • getStatistics

        public static Statistics getStatistics()
        Returns:
      • approximateToNearestHundred

        public static int approximateToNearestHundred​(int number)
        Approximates a given number to the nearest hundred.
        Parameters:
        number - The number to approximate.
        Returns:
        The number rounded to the nearest hundred.