Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class walec extends punktM {
- private double promien;
- public walec(double mass){
- super(mass);
- promien=0;
- }
- public walec (double promien)
- {
- if (promien>0)
- {
- this.promien=promien;
- }
- else
- {
- this.promien=0;
- }
- }
- public double getpromien() {return promien;}
- public double moment{return mass*promien*promien/2;}
- public String toString(){return "walec";}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement