Zhousan04
package edu.xcdq.demo03;
public class Zhousan04 {
public void diyixiang(String java) {System.out.println(“请输入Java的成绩:” + java); }
public void dierxiang(String C) {
System.out.println("请输入C#的成绩:" + C);
}
public void disanxiang(String DB) {
System.out.println("请输入DB的成绩:" + DB);
}
}
Zhousan05
package edu.xcdq.demo03;
public class Zhousan05 {
public void zongchenji(String zcj){
System.out.println("总成绩是:"+zcj);
}
public void pingjunchengji(String pjcj){ System.out.println("平均成绩是:"+pjcj); }
}
Zhousan06
package edu.xcdq.demo03;
public class Zhousan06 {
public static void main(String[] args) {
Zhousan04 zhousan = new Zhousan04();
Zhousan05 zhousan2 = new Zhousan05();
zhousan.diyixiang("90");
zhousan.dierxiang("85");
zhousan.disanxiang("70");
zhousan2.zongchenji("245");
zhousan2.pingjunchengji("81.0");
}
}