Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Punkt3D extends Punkt {
- int z;
- Punkt3D() {
- this.z = 0;
- }
- Punkt3D(int x, int y, int z) {
- super(x, y);
- this.z = z;
- }
- Punkt3D(Punkt3D pkt) {
- super(pkt);
- this.z = pkt.z;
- }
- public int getZ() {
- return this.z;
- }
- public void setZ(int z) {
- this.z = z;
- }
- void wyswietlPunkt3D() {
- System.out.println("(" + this.x + ", " + this.y + ", " + this.z + ")");
- }
- public String toString() {
- return "(" + this.x + ", " + this.y + ", " + this.z + ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement