herrDeng網內搜尋

自訂搜尋

Ads

2016年9月21日 星期三

Ex5 建立三個科目的物件

建立三個科目的物件,列印輸出。




提示:
Subject X[]=new Suject[3]
X[0]=new Sbject("...", *,*);
X[1]=.......
X[2]=.......
for(Suject a:X)
   a.print();



59 則留言:

B10433023 李佳明 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

B10433044吳玉瀚 提到...

class S{
String name;
int X;
int Y;
public S(String name, int X, int Y) {
super();
this.name = name;
this.X = X;
this.Y = Y;
}
void print(){
System.out.println(name+":"+X+"分\t"+Y+"學分");
}
}
public class a01 {
public static void main(String[] args) {
S x[]=new S[3];
x[0]=new S("程式",60,4);
x[1]=new S("國文",75,2);
x[2]=new S("統計",60,2);
for(S a:x) a.print();
}
}

B10433026 提到...

package w2;
class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
("名稱:"+name+"\t分數:"+score+"\t學分:"+credit);
}
}
public class hw1 {
public static void main(String[] args) {
Subject X[]= new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("管理",70,3);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();
}
}

B10433027 提到...

class Subject

{

String name;

int score;

int credit;

public Subject(String name, int score, int credit)

{

this.name = name;

this.score = score;

this.credit = credit;

}

void print()

{

System.out.println(name+"\t名稱:"+score+"\t學分:"+credit);

}

}

public class ex01 {

public static void main(String[] args)

{

Subject X[]=new Subject[3];

X[0]=new Subject("程式",90,3);

X[1]=new Subject("數學",60,4);

X[2]=new Subject("國文",80,2);

for(Subject a:X)

a.print();

}

}

B10433036 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分"+credit);
}
}
public class ex2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",85,2);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();

}

}

B10433053謝肇安 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",90 ,3);
X[1]=new Subject("資料結構",88 ,3);
X[2]=new Subject("生產管理",85 ,2);
for(Subject a:X)
a.print();
}
}

B10433194謝旻君 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",80 ,4);
X[1]=new Subject("資料結構",90 ,3);
X[2]=new Subject("生產管理",88 ,2);
for(Subject a:X)
a.print();
}
}

B10433193林佩縈 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",88 ,3);
X[1]=new Subject("資料結構",90 ,3);
X[2]=new Subject("生產管理",82 ,2);
for(Subject a:X)
a.print();
}
}

B10433042 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score,int credit){
this.name=name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println(name+":"+"分數:"+score+"學分:"+credit);
}
}

public class ex1 {

public static void main(String[] args) {
Subject x[]=new Subject[3];
x[0]=new Subject("英文",60,3);
x[1]=new Subject("程式",70,3);
x[2]=new Subject("數學",80,1);
for(Subject a:x);
a.print();
}

}

b10433038詹恭煒 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("微積分",65 ,2);
X[1]=new Subject("進階程式設計",82 ,2);
X[2]=new Subject("企業電子化",77 ,3);
for(Subject a:X)
a.print();

}

}

B10233012林凱慶 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",85 ,3);
X[1]=new Subject("資料結構",90 ,3);
X[2]=new Subject("生產管理",92 ,2);
for(Subject a:X)
a.print();
}
}

B10433046 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score,int credit){
this.name= name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}

public class ex5 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();

}



}

B10433185施慧齡 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",88 ,3);
X[1]=new Subject("資料結構",90 ,3);
X[2]=new Subject("生產管理",85 ,2);
for(Subject a:X)
a.print();
}
}

B10433035 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("微積分",70 ,2);
X[1]=new Subject("英文",65 ,3);
X[2]=new Subject("體育",95 ,2);
for(Subject a:X)
a.print();
}
}

B10433008王靖雲 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}

public class HW1 {
public static void main(String[] args) {
Subject X=new Subject("程式",90,3);
X.print();
Subject Y=new Subject("國文",100,3);
Y.print();
Subject Z=new Subject("數學",100,3);
Z.print();
}

}

B10433068丁麗馨 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}

public class ex1 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",80,3);
X[1]=new Subject("國文",90,2);
X[2]=new Subject("會計",70,3);
for(Subject a:X)
a.print();
}

}

B10433037 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score,int credit){
this.name=name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println
(name+":"+"分數"+score+"學分:"+credit);
}
}
public class ex01 {
public static void main(String[] args) {
Subject X=new Subject("程式",80,3);
Subject Y=new Subject("英文",75,2);
Subject Z=new Subject("數學",86,2);
X.print();
Y.print();
Z.print();
}

}

b10433050 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",90 ,3);
X[1]=new Subject("資料結構",88 ,3);
X[2]=new Subject("生產管理",85 ,2);
for(Subject a:X)
a.print();
}
}

B10433020沈柏軍 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X=new Subject("程式",90,3);
X.print();
Subject Y=new Subject("國文",90,3);
Y.print();
Subject Z=new Subject("數學",90,3);
Z.print();

}

}

B10433007張聖鑫 提到...

package date1;
class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();

this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name + ":" + "分數:" +score + "學分:" + credit);
}
}

public class ex01 {

public static void main(String[] args) {
Subject X = new Subject("程式" , 90, 3);
X.print();
Subject y = new Subject("國文" , 90, 3);
y.print();
Subject z = new Subject("數學" , 90, 3);
z.print();
}

}

B10433039游叡恩 提到...


class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",99 ,3);
X[1]=new Subject("資料結構",88 ,3);
X[2]=new Subject("生產管理",77 ,2);
for(Subject a:X)
a.print();

}
}

b10433040葉峻宇 提到...


class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",55 ,3);
X[1]=new Subject("資料結構",66 ,3);
X[2]=new Subject("生產管理",77 ,2);
for(Subject a:X)
a.print();
}
}

B10433006張正祺 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X=new Subject("程式",90,3);
X.print();
Subject Y=new Subject("微積分",90,3);
Y.print();
Subject Z=new Subject("經濟學",90,3);
Z.print();

}

}

B10433031陳頌恩 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

b10233028 提到...

public class ex01 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new subject("程式",90,3);
X[1]=new subject("微積分",80,2);
X[1]=new subject("英文",88,1);
for(subject a:X)
a.print();
}
}

B10433083林綾萱 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X=new Subject("程式",90,3);
X.print();
Subject Y=new Subject("微積分",90,3);
Y.print();
Subject Z=new Subject("會計",90,3);
Z.print();

}

}

B10433189杜恩瑋 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433190張文翰 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433188姜佩萱 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433066劉民崧 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433024陳錡諹 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433016李俊諺 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B1043305沈沛姍 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

B10433032劉鍵佑 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433025羅亦志 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433054孫若庭 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

B10433018張易儒 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433010吳奇峰 提到...


public class hw2 {

public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("微積分",80,2);
X[2]=new Subject("英文",88,1);
for(Subject a:X)
a.print();
}
}

B10433001 林威翰 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("基礎統計學",88 ,3);
X[1]=new Subject("生產管理",84 ,3);
X[2]=new Subject("程式設計",86 ,3);
for(Subject a:X)
a.print();
}
}

B10433047江景誠 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("基礎統計學",75 ,3);
X[1]=new Subject("生產管理",68 ,3);
X[2]=new Subject("程式設計",74 ,3);
for(Subject a:X)
a.print();
}
}

B10333022李昕翰 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.print
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("英文",82,1);
X[1]=new Subject("人文藝術-西方藝術經典選粹",80 ,2);
X[2]=new Subject("行銷管理",62 ,3);
for(Subject a:X)
a.print();
}
}

B10233136 巫駿驛 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("基礎統計學",75 ,3);
X[1]=new Subject("生產管理",68 ,3);
X[2]=new Subject("程式設計",74 ,3);
for(Subject a:X)
a.print();
}
}

B10233028 王曉琪 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex1 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("程式設計",80 ,2);
X[1]=new Subject("作業系統",76 ,3);
X[2]=new Subject("生產管理資訊系統",85 ,3);
for(Subject a:X)
a.print();
}
}

B10333010陳彦逸 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name,int score, int credit){
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.print
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("英文",68,1);
X[1]=new Subject("人文藝術-西方藝術經典選粹",78 ,2);
X[2]=new Subject("資訊網路",60 ,3);
for(Subject a:X)
a.print();
}

B10433015 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println
("名稱:"+name+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex5 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("英文",90,1);
X[1]=new Subject("程式設計",60,3);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();
}
}

B10233082 唐偉強 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

B10433029 宋狄淯 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

B10433014楊偉杰 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

B10233177吳國豪 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println
("名稱:"+name+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex5 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("英文",90,1);
X[1]=new Subject("程式設計",60,3);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();
}
}

B10233049 黃家崙 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit=credit;
}
void print(){
System.out.println
("名稱:"+name+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex5 {
public static void main(String[] args) {
Subject X[]=new Subject[3];
X[0]=new Subject("英文",90,1);
X[1]=new Subject("程式設計",60,3);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();
}
}

b10433005沈沛姍 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

B10433040 葉峻宇 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

b10433049 宋子文 提到...

class S{
String name;
int X;
int Y;
public S(String name, int X, int Y) {
super();
this.name = name;
this.X = X;
this.Y = Y;
}
void print(){
System.out.println(name+":"+X+"分\t"+Y+"學分");
}
}
public class a01 {
public static void main(String[] args) {
S x[]=new S[3];
x[0]=new S("程式",60,4);
x[1]=new S("國文",75,2);
x[2]=new S("統計",60,2);
for(S a:x) a.print();
}
}

b10433024 陳錡諹 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit){
this.name=name;
this.score=score;
this.credit= credit;
}
void print(){
System.out.println
(name+":"+"\t分數:"+score+"\t學分:"+credit);
}
}
public class ex01 {

public static void main(String[] args) {
Subject x=new Subject("程式",90,3);
x.print();

}

}

b10433051 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

B10433083林綾萱 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

b10433021呂志信 提到...

package w2;
class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
super();
this.name = name;
this.score = score;
this.credit = credit;
}
void print(){
System.out.println
("名稱:"+name+"\t分數:"+score+"\t學分:"+credit);
}
}
public class hw1 {
public static void main(String[] args) {
Subject X[]= new Subject[3];
X[0]=new Subject("程式",90,3);
X[1]=new Subject("管理",70,3);
X[2]=new Subject("資料庫",80,3);
for(Subject a:X)
a.print();
}
}

b10433012 鍾仁凱 提到...

包W2;
類主題{
字符串名稱;
INT分;
詮釋信用;
公共科目(字符串名稱,詮釋得分,詮釋信貸){
超();
this.name =名稱;
this.score =得分;
this.credit =貸款;
}
無效的print(){
的System.out.println
(“名稱:”+姓名+“\ t分數:”+分數+“\ t學分:”+信用);
}
}
公共類HW1 {
公共靜態無效的主要(字串[] args){
主題X [] =新的主題[3];
X [0] =新主題(“程式”,90,3);
X [1] =新主題(“管理”,70,3);
X [2] =新主題(“資料庫”,80,3);
對於(但一個:X)
a.print();
}
}

b10433043彭子豪 提到...

class Subject{
String name;
int score;
int credit;
public Subject(String name, int score, int credit) {
this.name = name;
this.score = score;
this.credit = credit;
}
void println(){
System.out.println
(name+" : "+"分數 "+score+" 學分 : "+credit);
}

}

public class ex5
{
public static void main(String[] args)
{
Subject x=new Subject("程式I",90,3);
x.println();
Subject y=new Subject("程式II",91,2);
y.println();
Subject z=new Subject("程式III",92,1);
z.println();
}
}



程式I : 分數 90 學分 : 3
程式II : 分數 91 學分 : 2
程式III : 分數 92 學分 : 1

Related Posts Plugin for WordPress, Blogger...

熱門文章