Board logo

標題: TQC+ 107 運動成績 [打印本頁]

作者: 周政輝    時間: 2016-12-17 11:40     標題: TQC+ 107 運動成績

[attach]1828[/attach]
  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(action,skill,teamgame));
  5.         System.out.println("The baseball grade is " +Baseball.calGrade(skill, teamgame));
  6.     }
  7. }

  8. class Basketball {
  9.     public static int calGrade(int a,int s,int t)  {
  10.         return a + s + t;
  11.     }
  12. }

  13. class Baseball {
  14.           public static int calGrade(int s,int t)   {
  15.         return 10 + s + t;
  16.     }
  17. }
複製代碼

作者: 張健勳    時間: 2016-12-17 11:49

  1. public class JPA01 {
  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(action,skill,teamgame));
  5.         System.out.println("The baseball grade is " + Baseball.calGrade(skill,teamgame));
  6.     }
  7. }

  8. class Basketball {
  9.         public static int calGrade(int a ,int s ,int t) {
  10.         return a + s + t;

  11.         }
  12. }

  13. class Baseball {
  14.         public static int calGrade(int s, int t) {
  15.                 return 10 + s + t;
  16.         }
  17. }
複製代碼

作者: 王彥甯    時間: 2016-12-17 11:51

  1. public class JPA01 {
  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(action,skill,teamgame));
  5.         System.out.println("The baseball grade is " + Baseball.calGrade(skill , teamgame));
  6.     }
  7. }

  8. class Basketball {
  9.     public static int calGrade(int a , int s , int t){
  10.         return a + s + t;
  11.     }

  12. }

  13. class Baseball {
  14.     public static int calGrade(int s,int t){
  15.         return 10 + s + t;
  16.     }
  17. }
複製代碼

作者: 蔡庭豪    時間: 2016-12-20 17:21

  1. public class JPA01 {
  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(action,skill,teamgame));
  5.         System.out.println("The baseball grade is " + Baseball.calGrade(skill,teamgame));
  6.     }
  7. }

  8. class Basketball {
  9.     public static int calGrade(int a ,int s,int t)   {
  10.         return a + s + t;
  11.     }
  12. }

  13. class Baseball {
  14.          public static int calGrade( int s,int t)  {
  15.         return 10 + s + t;
  16.     }
  17. }
複製代碼





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