uebung07
This commit is contained in:
15
uebung07/src/quantities/generic/Velocity.java
Normal file
15
uebung07/src/quantities/generic/Velocity.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package quantities.generic;
|
||||
|
||||
import static quantities.generic.LengthUnit.METER;
|
||||
import static quantities.generic.TimeUnit.SECOND;
|
||||
import static quantities.generic.VelocityUnit.METER_PER_SECOND;
|
||||
|
||||
public class Velocity extends Quantity<Velocity> {
|
||||
public Velocity(double value, Unit<Velocity> unit) {
|
||||
super(value, unit);
|
||||
}
|
||||
|
||||
public Length mult(Time t) {
|
||||
return METER.quantity(this.value(METER_PER_SECOND) * t.value(SECOND));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user