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

📄 testclass.java

📁 Line, Poin, and Rectangle Class
💻 JAVA
字号:
package project1;import java.text.DecimalFormat;import javax.swing.JOptionPane;public class TestClass{    public static void main(String[] args)    {             RectangleClass rectangle = new RectangleClass (12, 24, 6.5, 18.5);        String output = " The Point's X coordinate is: " +      rectangle.getX() + "\n\n The Point's Y coordinate is: " +      rectangle.getY() + "\n\n The Length of the line is: " +      rectangle.getLength() + "\n\n The Height of the line is: " +      rectangle.getHeight();      rectangle.setX (44);      rectangle.setY (22);      rectangle.setLength (11.5);      rectangle.setHeight (20);        output +=                "\n\n\nNew Rectangle:\n"                + rectangle.toString();        DecimalFormat twoDigits = new DecimalFormat ("0.00");        output += "\n\n     The X coordinate: " + rectangle.getX() +                "\n\n     The Y coordinate: " + rectangle.getY();        output += "\n\n     The Perimeter: " +                twoDigits.format(rectangle.getPerimeter());           output += "\n\n     The Area: " +                twoDigits.format(rectangle.getArea()) + "\n\n\n";            JOptionPane.showMessageDialog( null, output);           System.exit (0);  }} 

⌨️ 快捷键说明

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