Class Screen

  • All Implemented Interfaces:
    ScreenSpec

    public class Screen
    extends java.lang.Object
    implements ScreenSpec
    Screen contains several variables that represent attributes of a typical electronic screen such as resolution and refresh rate.
    • Constructor Summary

      Constructors 
      Constructor Description
      Screen​(java.lang.String resolution, int refreshRate, int responseTime)
      Constructor for the screen class
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getRefreshRate()
      Gets the refresh rate of the screen
      java.lang.String getResolution()
      Gets the resolution of the screen
      int getResponseTime()
      Gets the response time of the screen
      java.lang.String toString()
      Creates a string output for the object using each of the attributes
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Screen

        public Screen​(java.lang.String resolution,
                      int refreshRate,
                      int responseTime)
        Constructor for the screen class
        Parameters:
        resolution - The resolution of the screen, Whole number by Whole number
        refreshRate - The refresh rate of the screen in hertz
        responseTime - The response time of a screen
    • Method Detail

      • getResolution

        public java.lang.String getResolution()
        Gets the resolution of the screen
        Specified by:
        getResolution in interface ScreenSpec
        Returns:
        The resolution of the screen
      • getRefreshRate

        public int getRefreshRate()
        Gets the refresh rate of the screen
        Specified by:
        getRefreshRate in interface ScreenSpec
        Returns:
        The refresh rate of the screen
      • getResponseTime

        public int getResponseTime()
        Gets the response time of the screen
        Specified by:
        getResponseTime in interface ScreenSpec
        Returns:
        The response time
      • toString

        public java.lang.String toString()
        Creates a string output for the object using each of the attributes
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string output for the screen