Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Represents a light bulb of some type.
- */
- public abstract class LightBulb
- {
- private double lumens;
- public LightBulb(double _lumens)
- {
- lumens = _lumens;
- }
- public abstract String getShape();
- /**
- Gets a description of this light bulb.
- @return a string of the form lumensPerWatt=...,shape=... (without any spaces)
- */
- public String getDescription()
- {
- return String.format("lumensPerWatt=%s,shape=%s", lumens, getShape());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement