⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goldringedstaff.java

📁 java与模式 一书的源码
💻 JAVA
字号:
package com.javapatterns.prototype.monkeyking;

import java.util.Date;

public class GoldRingedStaff implements Cloneable
{
    public GoldRingedStaff()
    {
        //write your code here
    }

    public void grow()
    {
        this.diameter *= 2.0;
        this.height *= 2;
    }

    public void shrink()
    {
        this.diameter /= 2;
        this.height /= 2;
    }

    public void move()
    {
        //write your code for moving the staff
    }

    public float getHeight()
    {
        return height;
    }

    public void setHeight(float height)
    {
        this.height = height;
    }

    public float getDiameter()
    {
        return diameter;
    }

    public void setDiameter(float diameter)
    {
        this.diameter = diameter;
    }

    private float height = 100.0F;
    private float diameter = 10.0F;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -