Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class walec extends punktM {
  2. private double promien;
  3. public walec(double mass){
  4. super(mass);
  5. promien=0;
  6. }
  7. public walec (double promien)
  8. {
  9. if (promien>0)
  10. {
  11. this.promien=promien;
  12. }
  13. else
  14. {
  15. this.promien=0;
  16. }
  17. }
  18. public double getpromien() {return promien;}
  19. public double moment{return mass*promien*promien/2;}
  20. public String toString(){return "walec";}
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement