📄 梯形test.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package 阶段练习一;/** * * @author lenovo */public class 梯形test { public static void main(String args[]) { 梯形 laderOne=new 梯形(12.0f,3.5f,50),laderTwo=new 梯形(2.67f,3.0f,10); System.out.println("laderOne的高是:"+laderOne.获取高()); System.out.println("laderTwo的高是:"+laderTwo.获取高()); System.out.println("laderOne的面积是:"+laderOne.计算面积()); System.out.println("laderTwo的面积是:"+laderTwo.计算面积()); laderOne.修改高(10); float h=laderOne.获取高(); laderTwo.修改高(h*2); System.out.println("laderOne现在的高是:"+laderOne.获取高()); System.out.println("laderTwo现在的高是:"+laderTwo.获取高()); System.out.println("laderOne现在的面积是:"+laderOne.计算面积()); System.out.println("laderTwo现在的面积是:"+laderTwo.计算面积()); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -