Class Screen
- java.lang.Object
-
- 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 intgetRefreshRate()Gets the refresh rate of the screenjava.lang.StringgetResolution()Gets the resolution of the screenintgetResponseTime()Gets the response time of the screenjava.lang.StringtoString()Creates a string output for the object using each of the attributes
-
-
-
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 numberrefreshRate- The refresh rate of the screen in hertzresponseTime- The response time of a screen
-
-
Method Detail
-
getResolution
public java.lang.String getResolution()
Gets the resolution of the screen- Specified by:
getResolutionin interfaceScreenSpec- Returns:
- The resolution of the screen
-
getRefreshRate
public int getRefreshRate()
Gets the refresh rate of the screen- Specified by:
getRefreshRatein interfaceScreenSpec- Returns:
- The refresh rate of the screen
-
getResponseTime
public int getResponseTime()
Gets the response time of the screen- Specified by:
getResponseTimein interfaceScreenSpec- Returns:
- The response time
-
toString
public java.lang.String toString()
Creates a string output for the object using each of the attributes- Overrides:
toStringin classjava.lang.Object- Returns:
- The string output for the screen
-
-