云大JAVA实验5Lab#5[陆歌浩].docVIP

  • 2
  • 0
  • 约 3页
  • 2017-05-08 发布于四川
  • 举报
云大JAVA实验5Lab#5[陆歌浩]

云南大学软件学院 实验报告 : 序号: 姓名: 孙金文 成绩: 实验5 Applying OO Concepts Using Java 一、实验目的 练习Java中面向对象概念的应用--学会使用现有对象和自定义类。 二、实验内容 Program Create a class called Circle.java with fields named radius, area, and diameter.? Include methods named setRadius(), getRadius, and computeDiameter(), which calculates the circles diameter, and computeArea(), which computes the circles area.? Hint:? diameter of a circle is twice its radius.? Hint:? area of a circle is 3.14 multiplied by the square of the radius.? Create a class called TestCircle. java whose main method declares 2 Circle objects.? U

文档评论(0)

1亿VIP精品文档

相关文档