Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. package weather;
  2.  
  3. public class StratusCloud extends Cloud {
  4.  
  5. private float bottom;
  6. private float top;
  7.  
  8. public StratusCloud (float thisbottom, float thistop) {
  9. super(thisbottom, thistop);
  10.  
  11. }
  12.  
  13. }
  14. ////////////////////////////////////
  15. package weather;
  16.  
  17. public class CumulusCloud extends Cloud {
  18.  
  19. public CumulusCloud(float thisbottom, float thistop) {
  20. super(thisbottom, thistop);
  21. }
  22.  
  23. }
  24. //////////////////////////////////////
  25. package weather;
  26.  
  27. public class CirrusCloud extends Cloud {
  28.  
  29. public CirrusCloud(float thisbottom, float thistop) {
  30. super(thisbottom, thistop);
  31.  
  32. }
  33.  
  34. public String rain () {
  35.  
  36. return "I cannot make it rain";
  37.  
  38. }
  39. }
  40. /////////////////////////////////////////////////
  41. package weather;
  42.  
  43. public class Cloud {
  44.  
  45.  
  46. private float bottom;
  47. private float top;
  48.  
  49.  
  50. public Cloud(float thisbottom, float thistop) {
  51. this.bottom = bottom;
  52. this.top = top;
  53.  
  54. }
  55.  
  56.  
  57. public float getHeight() {
  58. return top - bottom;
  59.  
  60. }
  61.  
  62. public String rain() {
  63. return "It is raining";
  64. }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement