PHP 語法:
public cstu(String s1,String s2,int m,int f,int c)
{
id=s1;
name=s2;
mid=m;
finl=f;
common=c;
}
.
.
.
.
.
.
public static void main(String args[])throws IOException
{
int i,n;
int a[];
String str;
BufferedReader buf;
a=new int[5];
buf= new BufferedReader(new InputStreamReader(System.in));
for (i=0;i<5;i++)
{
System.out.print("輸入資料:");
str=buf.readLine();
n=Integer.parseInt(str); //字串轉為數字
a[i]=n; //把數字存入陣列
}
cstu stu=new cstu();<----------------//這邊要怎修改阿
stu.show();
}
}
cstu stu=new cstu(d12312,Leo,95,85,95);
怎麼改成可用輸入方式來輸入資料
cstu stu=new cstu();<----------------//這邊要怎修改阿