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

📄 shapebase.java

📁 java程序设计与问题解决的源代码 含书上程序的源代码和一些补充的程序源码
💻 JAVA
字号:
/** Abstract base class for drawing simple shapes on the screen using keyboard characters. */public abstract class ShapeBase implements ShapeInterface{    private int offset;         public ShapeBase( )    {        offset = 0;    }    public ShapeBase(int theOffset)    {        offset = theOffset;    }    /**     Draws the shape at the current line.    */    public abstract void drawHere( );                  /**     Draws the shape at lineNumber lines down     from the current line.    */    public void drawAt(int lineNumber)    {        for (int count = 0; count < lineNumber; count++)            System.out.println( );         drawHere( );    }         public void setOffset(int newOffset)    {        offset = newOffset;    }    public int getOffset( )    {        return offset;    }}

⌨️ 快捷键说明

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