返回列表 發帖

TQC+ 107 運動成績

  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. }
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

  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. }
複製代碼

TOP

  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. }
複製代碼

TOP

  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. }
複製代碼

TOP

返回列表