Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package game01;
- /**
- *
- * @author Alex
- */
- public class Players {
- private String name;
- private int money;
- private double posX;
- private double posY;
- private double posZ;
- public void setName(String n) {
- name = n;
- }
- public String getName() {
- return name;
- }
- public void setMoney(int m) {
- money = m;
- }
- public int getMoney() {
- return money;
- }
- public void setPosX(double x) {
- posX = x;
- }
- public double getPosX() {
- return posX;
- }
- public void setPosY(double y) {
- posY = y;
- }
- public double getPosY() {
- return posY;
- }
- public void setPosZ(double z) {
- posZ = z;
- }
- public double getPosZ() {
- return posZ;
- }
- public void playerInfo() {
- System.out.printf("Player name: %s ", name);
- System.out.printf("Player money: %s ", money);
- System.out.printf("Player posX: %,2f ", posX);
- System.out.printf("Player posY: %,2f ", posY);
- System.out.printf("Player posZ: %,2f ", posZ);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement