Java实验报告–2–类和对象.docxVIP

  • 5
  • 0
  • 约1.1千字
  • 约 4页
  • 2017-05-20 发布于北京
  • 举报
Java实验报告–2–类和对象

Java实验报告 姓名: 学号: 班级: 实验题目实验二 类和对象源代码 package fushu; import javax.swing.JOptionPane; import jdk.nashorn.internal.scripts.JO; public class textfushu { public static void main(String[] args) { // TODO 自动生成的方法存根 class Fushu { private double a; //实部 private double b;//虚部 public Fushu(double x,double y) { a=x; b=y; } public void addfushu(double x,double y) { this.a=this.a+x; this.b=this.b+y; } public void plusfushu(double x,double y) { this.a=this.a-x; this.b=this.b-y; } public double geta() { ret

文档评论(0)

1亿VIP精品文档

相关文档