日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

java find symbol,cannot find symbol

發布時間:2023/12/16 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java find symbol,cannot find symbol 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

class triangle {

double a;

double b;

double c;

public triangle(double a ,double b,double c){

if((a+b>c)&&(a+c>b)&&(b+c>a)&&(a-c

this.a=a;

this.b=b;

this.c=c;

}

else {

System.out.println("輸入邊長有錯");

}

}

public double GetCircle(){

return (a+b+c);

}

public double GetArea(){

double p;

p=(a+b+c)/2.0;

return (Math.sqrt(p*(p-a)*(p-b)*(p-c)));

}

}

class Tprism extends triangle{

double height;

public Tprism (double a ,double b,double c,double height){

super(a,b,c);

if((a+b>c)&&(a+c>b)&&(b+c>a)&&(a-c

this.a=a;

this.b=b;

this.c=c;

this.height=height;

}

else {

System.out.println("輸入邊長有錯");

}

}

public double volume(){

return (super.GetArea()*height);

}

}

class pramid extends rectangle{

double height;

public pramid(double a, double b, double c,double height){

super(a,b,c);

if((a+b>c)&&(a+c>b)&&(b+c>a)&&(a-c

this.a=a;

this.b=b;

this.c=c;

this.height=height;

}

else {

System.out.println("輸入邊長有錯");

}

}

public??double volume(){

return (super.GetArea()*height*(1/3));

}

}

class exp1{

public static void main(String [] args){

triangle r = new triangle(3.0,4.0,5.0);

Tprism c=new Tprism(3.0,4.0,5.0,6.0);

pramid d=new pramid(3.0,4.0,5.0,6.0);

System.out.println("三角形的周長" + r.GetCircle());

System.out.println("三角形的面積"+r.GetArea());

System.out.println("三棱柱的底面積"+c.GetCircle());

System.out.println("三棱柱的底周長"+c.GetArea());

System.out.println("三棱柱的體積"+c.volume());

System.out.println("三棱錐的底面積"+d.GetArea());

System.out.println("三棱錐的體積"+d.volume());

}

}

--------------------Configuration: hh - JDK version 1.5.0_02 --------------------

G:\java\hh\exp1.java:50: cannot find symbol

symbol: class rectangle

class pramid extends rectangle{

^

G:\java\hh\exp1.java:57: cannot find symbol

symbol??: variable a

location: class pramid

this.a=a;

^

G:\java\hh\exp1.java:58: cannot find symbol

symbol??: variable b

location: class pramid

this.b=b;

^

G:\java\hh\exp1.java:59: cannot find symbol

symbol??: variable c

location: class pramid

this.c=c;

^

G:\java\hh\exp1.java:68: cannot find symbol

symbol??: variable super

location: class pramid

return (super.GetArea()*height*(1/3));

^

G:\java\hh\exp1.java:85: cannot find symbol

symbol??: method GetArea()

location: class pramid

System.out.println("三棱錐的底面積"+d.GetArea());

^

6 errors

Process completed.

那這個問題又出在哪呢?菜鳥級別,請大家指教

總結

以上是生活随笔為你收集整理的java find symbol,cannot find symbol的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。