herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
python pandas對黃金、外匯匯率的爬蟲練習,並使用matplotlib.pyplot的函數plot, scatter做資料視覺化處理,採用numpy的統計函數,分析黃金價格波動與歐元走勢的關聯。
-
Python C C++ 2 pointer速解Leetcode 2337 Move Pieces to Obtain a String 多日Leetcode的問題都可用2-pointer法來解,今日2337. Move Pieces to Obtain a String也不例...
-
你會用C的算子sizeof?
33 則留言:
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int economies;
float average(){
return ((float)english+math+computer+chinese+economies)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int econoies)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.economies=economies;
}
void printlnData()
{
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(economies);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"吳邦俞",60, 66,70,90,90);
X.printlnData();
}
}
class Student{
private int id;
private String name;
private int english;
private int math;
private int computer;
private int PE;
private int chinese;
float average(){
return ((float)english+math+computer+PE+chinese)/5;
}
Student(int id, String name, int english, int math, int computer,int PE,int chinese)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.PE=PE;
this.chinese=chinese;
}
public void printData(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(computer);
System.out.println(PE);
System.out.println(chinese);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(61,"盧柏瑋",80, 66,70,80,75);
X.printData();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int economies;
float average(){
return ((float)english+math+computer+chinese+economies)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int economies)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.economies=economies;
}
void printlnData()
{
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(economies);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"吳邦俞",60, 66,70,90,80);
X.printlnData();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int sport;
int chinese;
float average(){
return ((float)english+math+computer+sport+chinese)/5;
}
Student(int id, String name, int english, int math, int computer, int sport, int chinese)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.sport=sport;
this.chinese=chinese;
}
void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(sport);
System.out.println(chinese);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(66,"丘康利",90, 72,75,84,80);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer)/3;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(106,"劉仲惟",93,100,100,96,100);
X.student1();
}
}
class Student{
private int id;
String name;
private int english;
private int math;
private int computer;
private int chinese;
private int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(85,"羅智謙",60, 66,70,80,76);
X.Student1();
}
}
class Student{
private int id;
private String name;
private int english;
private int math;
private int computer;
private int accounting;
private int chinese;
float average(){
return ((float)english+math+computer+chinese+accounting)/5;
}
Student(int id, String name, int english, int math, int computer,
int chinese,int accounting )
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.accounting=accounting;
}
public void printDate()
{
System.out.println("id:"+id);
System.out.println("名字:"+name);
System.out.println("英文:"+english);
System.out.println("數學:"+math);
System.out.println("程式設計:"+computer);
System.out.println("國文:"+chinese);
System.out.println("會計:"+accounting);
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"曾亭群",60, 66,70,76,80);
System.out.println("平均:"+X.average());
X.printDate();
}
}
class Student{
private int id;
private String name;
private int english;
private int math;
private int computer;
private int economics;
private int pe;
float average(){
return ((float)english+math+computer+economics+pe)/5;
}
Student(int id, String name, int english, int math, int computer,int economics,int pe)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.economics=economics;
this.pe=pe;
}
public void show(){
System.out.println("id="+id);
System.out.println("name="+name);
System.out.println("english"+english);
System.out.println("math="+math);
System.out.println("computer="+computer);
System.out.println("economics="+economics);
System.out.println("pe="+pe);
System.out.println("average="+average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"鍾光閔",60,70,80,90,75);
X.show();
}
}
class Student{
private int id;
String name;
private int english;
private int math;
private int computer;
private int chinese;
private int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(103,"吳秉儒",65, 66,77,88,99);
X.Student1();
}
}
class Student{
private int id;
private String name;
private int chinese;
private int english;
private int math;
private int computer;
private int economics;
float average(){
return ((float)chinese+english+math+computer+economics)/5;
}
Student(int id, String name,int chinese, int english, int math, int computer,int economics)
{
this.id=id;
this.name=name;
this.chinese=chinese;
this.english=english;
this.math=math;
this.computer=computer;
this.economics=economics;
}
public void Show(){
System.out.println("id"+id);
System.out.println("name"+name);
System.out.println("chinese"+chinese);
System.out.println("english"+english);
System.out.println("math"+math);
System.out.println("computer"+computer);
System.out.println("economics"+economics);
System.out.println("average"+average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"學生1",60, 66,70,70,85);
X.Show();
}
}
class Student{
private int id;
String name;
private int english;
private int math;
private int computer;
private int chinese;
private int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(98,"李瑞勳",65, 70,77,62,73);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int PE;
int chinese;
float average(){
return ((float)english+math+computer+PE+chinese)/5;
}
Student(int id,String name,int english,int math,int computer,int PE,int chinese)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.PE=PE;
this.chinese=chinese;
}
void Student1(){
System.out.print("號碼=");
System.out.println(id);
System.out.print("姓名=");
System.out.println(name);
System.out.print("英文=");
System.out.println(english);
System.out.print("數學=");
System.out.println(math);
System.out.print("電腦=");
System.out.println(computer);
System.out.print("體育=");
System.out.println(PE);
System.out.print("國文=");
System.out.println(chinese);
System.out.print("平均=");
System.out.println(average());
}
}
public class java2{
public static void main(String[] args) {
Student X=new Student(100,"陳瑞聖",60,70,80,90,100);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer)/3;
}
Student(int id, String name, int english, int math, int computer, int chinese, int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(75,"陳柏修",70,50,80,75,70);
X.Student1();
}
}
class Student{
private int id;
private String name;
private int english;
private int math;
private int computer;
private int accounting;
private int chinese;
float average(){
return ((float)english+math+computer+chinese+accounting)/5;
}
Student(int id, String name, int english, int math, int computer,
int chinese,int accounting )
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.accounting=accounting;
}
public void printDate()
{
System.out.println("id:"+id);
System.out.println("名字:"+name);
System.out.println("英文:"+english);
System.out.println("數學:"+math);
System.out.println("程式設計:"+computer);
System.out.println("國文:"+chinese);
System.out.println("會計:"+accounting);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(9933110,"曾亭群",60, 66,70,76,80);
X.printDate();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int hi;
int wow;
float average(){
return ((float)english+math+computer+hi+wow)/5;
}
Student(int id, String name, int english, int math, int computer, int hi, int wow)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.hi=hi;
this.wow=wow;
}
public void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名:"+name);
System.out.println("英文="+english);
System.out.println("數學="+math);
System.out.println("電腦="+computer);
System.out.println("會計="+hi);
System.out.println("資訊管理="+wow);
System.out.println("平均="+average());
}
}
public class StudenData{
public static void main(String[] args) {
Student X=new Student(93,"周欣蓓",60,65,70,80,94);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名:"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData{
public static void main(String[] args){
Student X=new Student(78,"詹惠雯",60,52,66,72,70);
X.printData();
}
}
class Student{
private int id;
private String name;
private int english;
private int math;
private int computer;
private int chinese;
private int accounting;
float average(){
return ((float)english+math+computer+chinese+accounting)/5;
}
Student(int id, String name, int english, int math
, int computer,int chinese,int accounting)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.accounting=accounting;
}
public void printData()
{
System.out.println("id:"+id);
System.out.println("name:"+name);
System.out.println("english:"+english);
System.out.println("math:"+math);
System.out.println("computer:"+computer);
System.out.println("chinese:"+chinese);
System.out.println("accounting:"+accounting);
System.out.println("average"+average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(9933097,"游博雅",60, 66,70,80,77);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(64,"劉鈺淇",60,66,70,80,60);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(56,"陳瑞祥",80,56,75,70,50);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class y1 {
public static void main(String[] args){
Student X=new Student(1,"劉方立",80,65,74,78,60);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(1,"梁庭嘉",63,68,75,84,61);
X.printData();
}
}
class f{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int economies;
float average(){
return ((float)english+math+computer+chinese+economies)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int economies)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.economies= economies;
}
void printlnData()
{
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(economies);
System.out.println(average());
}
}
public class f {
public static void main (String[] args) {
Student X=new Student(1,"雪君",60,66,70,60,60);
X.printlnData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(89,"劉鈺淇",70,66,69,87,55);
X.printData();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(115,"賴若瑜",70,66,69,87,55);
X.printData();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chines1;
int chines2;
float average(){
return ((float)english+math+computer+chines1+chines2)/5;
}
Student(int id, String name, int english, int math, int computer, int chines1, int chines2)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chines1=chines1;
this.chines2=chines2;
}
public void printData()
{
System.out.println("ID"+id);
System.out.println("姓名"+name);
System.out.println("英文"+english);
System.out.println("數學"+math);
System.out.println("電腦"+computer);
System.out.println("國文1"+chines1);
System.out.println("國文2"+chines2);
System.out.println("平均"+average());
}
}
public class StudenData{
public static void main(String[] args) {
Student X=new Student(0,"李曼君",72,68,80,76,70);
X.printData();
}
}
class Student{
private int id;
String name;
private int english;
private int math;
private int computer;
private int chinese;
private int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(85,"李孝恩",60, 66,70,80,76);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer)/3;
}
Student(int id, String name, int english, int math, int computer, int chinese, int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(75,"林慶源",70,50,80,75,70);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer)/3;
}
Student(int id, String name, int english, int math, int computer, int chinese, int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(75,"林慶源",70,50,80,75,70);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer)/3;
}
Student(int id, String name, int english, int math, int computer, int chinese, int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(75,"林慶源",70,50,80,75,70);
X.Student1();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(106,"邱櫪葶",60,70,65,80,60);
X.student1();
}
}
class Student{
int id;
String name;
int english1;
int english2;
int math1;
int math2;
int computer;
float average(){
return((float)english1+english2+math1+math2+computer)/5;
}
Student(int id, String name, int english1, int english2, int math1, int math2, int computer)
{
this.id=id;
this.name=name;
this.english1=english1;
this.english2=english2;
this.math1=math1;
this.math2=math2;
this.computer=computer;
}
void printData()
{
System.out.println("ID:"+id);
System.out.println("姓名"+name);
System.out.println("英文1:"+english1);
System.out.println("英文2:"+english2);
System.out.println("數學1:"+math1);
System.out.println("數學2:"+math2);
System.out.println("電腦:"+computer);
System.out.println("平均:"+average());
}
}
public class StudentData {
public static void main(String[] args){
Student X=new Student(89,"楊文良",77,69,80,87,54);
X.printData();
}
}
class Student{
int id;
String name;
int english;
int math;
int computer;
int chinese;
int economies;
float average(){
return ((float)english+math+computer+chinese+economies)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int econoies)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.economies=economies;
}
void printlnData()
{
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(economies);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(1,"李振綱",80, 44,70,50,90);
X.printlnData();
}
}
class Student{
private int id;
String name;
private int english;
private int math;
private int computer;
private int chinese;
private int PE;
float average(){
return ((float)english+math+computer+chinese+PE)/5;
}
Student(int id, String name, int english, int math, int computer,int chinese,int PE)
{
this.id=id;
this.name=name;
this.english=english;
this.math=math;
this.computer=computer;
this.chinese=chinese;
this.PE=PE;
}
public void Student1(){
System.out.println(id);
System.out.println(name);
System.out.println(english);
System.out.println(math);
System.out.println(computer);
System.out.println(chinese);
System.out.println(PE);
System.out.println(average());
}
}
public class StudentData {
public static void main(String[] args) {
Student X=new Student(116,"洪智培",65, 66,77,88,99);
X.Student1();
}
}
張貼留言