SHARE
TWEET

Untitled

advictoriam Mar 5th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.    Represents a light bulb of some type.
  3. */
  4. public abstract class LightBulb
  5. {
  6.    private double lumens;
  7.    
  8.    public LightBulb(double _lumens)
  9.    {
  10.       lumens = _lumens;
  11.    }
  12.    
  13.    public abstract String getShape();
  14.    
  15.    /**
  16.       Gets a description of this light bulb.
  17.       @return a string of the form lumensPerWatt=...,shape=... (without any spaces)
  18.    */
  19.    public String getDescription()
  20.    {
  21.       return String.format("lumensPerWatt=%s,shape=%s", lumens, getShape());
  22.    }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top