Files
EP2/src/NamedBody.java
2022-05-02 12:20:50 +02:00

43 lines
1.1 KiB
Java

public class NamedBody /* TODO: add clause(s) */
{
// TODO: add missing parts of this class.
// Initializes this with name, mass, current position and movement. The associated force
// is initialized with a zero vector.
public NamedBody(String name, double mass, Vector3 massCenter, Vector3 currentMovement) {
// TODO: implement constructor.
}
// Returns the name of the body.
public String getName() {
// TODO: implement method.
return "";
}
// Compares `this` with the specified object. Returns `true` if the specified `o` is not
// `null` and is of type `NamedBody` and both `this` and `o` have equal names.
// Otherwise `false` is returned.
public boolean equals(Object o) {
//TODO: implement method.
return false;
}
// Returns the hashCode of `this`.
public int hashCode() {
//TODO: implement method.
return 0;
}
// Returns a readable representation including the name of this body.
public String toString() {
//TODO: implement method.
return "";
}
}