Board logo

標題: [實測]TQC107 TQC110 [打印本頁]

作者: 李泳霖    時間: 2022-8-27 15:35     標題: [實測]TQC107 TQC110

TQC107
  1. public class JPD01 {
  2.     public static void main(String argv[]) {
  3.         int action = 1, skill = 2, teamgame = 3;

  4.         System.out.println("The basketball grade is " + Basketball.calGrade(_____________________));
  5.         System.out.println("The baseball grade is " + _______________(________________________));
  6.     }
  7. }

  8. class Basketball {
  9.     ......   {
  10.         return a + s + t;
  11.     }
  12. }

  13. class Baseball {
  14.     ......   {
  15.         return 10 + s + t;
  16.     }
  17. }
複製代碼
TQC110
  1. import java.util.Scanner;
  2. public class JPD01 {
  3.     public static void main(String args[]) {
  4.         double totalarea;
  5.         System.out.printf("圓形面積為:%f \n",calCircle(5));
  6.         System.out.printf("三角形面積為:%f \n",________________);
  7.         System.out.printf("方形面積為:%f \n",_______________);
  8.         totalarea = __________________________________________;
  9.         System.out.printf("此圖形面積為:%f \n",totalarea);
  10.     }
  11.     _______ ______ calCircle(_____) {
  12.         
  13.     }
  14.     ______ ____ calTriangle(_____________) {
  15.         
  16.     }
  17.     ______ ____ calRectangle(______________) {
  18.         
  19.     }
  20. }
複製代碼





歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/) Powered by Discuz! 7.2