Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package weather;
- public class StratusCloud extends Cloud {
- private float bottom;
- private float top;
- public StratusCloud (float thisbottom, float thistop) {
- super(thisbottom, thistop);
- }
- }
- ////////////////////////////////////
- package weather;
- public class CumulusCloud extends Cloud {
- public CumulusCloud(float thisbottom, float thistop) {
- super(thisbottom, thistop);
- }
- }
- //////////////////////////////////////
- package weather;
- public class CirrusCloud extends Cloud {
- public CirrusCloud(float thisbottom, float thistop) {
- super(thisbottom, thistop);
- }
- public String rain () {
- return "I cannot make it rain";
- }
- }
- /////////////////////////////////////////////////
- package weather;
- public class Cloud {
- private float bottom;
- private float top;
- public Cloud(float thisbottom, float thistop) {
- this.bottom = bottom;
- this.top = top;
- }
- public float getHeight() {
- return top - bottom;
- }
- public String rain() {
- return "It is raining";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement