1个回答
展开全部
public class Triangle
{
private double edge1;
private double edge2;
private double edge3;
public Triangle(double edge1,double edge2,double edge3)
{
this.edge1=edge1;
this.edge2=edge2;
this.edge3=edge3;
}
public double getEdge1() {
return edge1;
}
public void setEdge1(double edge1) {
this.edge1 = edge1;
}
public double getEdge2() {
return edge2;
}
public void setEdge2(double edge2) {
this.edge2 = edge2;
}
public double getEdge3() {
return edge3;
}
public void setEdge3(double edge3) {
this.edge3 = edge3;
}
}
class Trapezoid
{
private double upedge;
private double downedge;
private double height;
public Trapezoid(double upedge,double downedge,double height)
{
this.upedge=upedge;
this.downedge=downedge;
this.height=height;
}
public double getUpedge() {
return upedge;
}
public void setUpedge(double upedge) {
this.upedge = upedge;
}
public double getDownedge() {
return downedge;
}
public void setDownedge(double downedge) {
this.downedge = downedge;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
}
class Circle
{
private double radius;
public Circle(double radius)
{
this.radius=radius;
}
public double getRadius() {
return radius;
}
public void setRadius(double radius) {
this.radius = radius;
}
}
{
private double edge1;
private double edge2;
private double edge3;
public Triangle(double edge1,double edge2,double edge3)
{
this.edge1=edge1;
this.edge2=edge2;
this.edge3=edge3;
}
public double getEdge1() {
return edge1;
}
public void setEdge1(double edge1) {
this.edge1 = edge1;
}
public double getEdge2() {
return edge2;
}
public void setEdge2(double edge2) {
this.edge2 = edge2;
}
public double getEdge3() {
return edge3;
}
public void setEdge3(double edge3) {
this.edge3 = edge3;
}
}
class Trapezoid
{
private double upedge;
private double downedge;
private double height;
public Trapezoid(double upedge,double downedge,double height)
{
this.upedge=upedge;
this.downedge=downedge;
this.height=height;
}
public double getUpedge() {
return upedge;
}
public void setUpedge(double upedge) {
this.upedge = upedge;
}
public double getDownedge() {
return downedge;
}
public void setDownedge(double downedge) {
this.downedge = downedge;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
}
class Circle
{
private double radius;
public Circle(double radius)
{
this.radius=radius;
}
public double getRadius() {
return radius;
}
public void setRadius(double radius) {
this.radius = radius;
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询