herrDeng網內搜尋

自訂搜尋

Ads

2016年12月23日 星期五

Ex14 物件







15 則留言:

A10533004易廷軒 提到...

class s{
String name;
int score;
int credit;
s(String x, int y, int z){
name=x; score=y; credit=z;
}
void print(){
System.out.printf(" %-10s %5d %5d\n", name, score, credit);
}
}
public class ex2 {

public static void main(String[] args) {
s[] x=new s[20];
x[0]=new s("文選", 80 ,2);
x[1]=new s("商用英文會話", 98, 2);
x[2]=new s("身體的哲學思維", 85 ,2);
x[3]=new s("動態網頁設計", 85 ,3);
x[4]=new s("資訊管理", 50 ,3);
x[5]=new s("資料庫管理系統", 65 ,3);
x[6]=new s("程式設計", 72 ,3);
x[7]=new s("資訊網路", 88 ,3);
x[8]=new s("網路行銷", 80 ,3);
for(int i=0; i<9; i++) x[i].print();

}

}

A10533014 提到...

class S{
String name;
int score;
int c;
S(String x,int y,int z){
name=x;score=y;c=z;
}void print(){
System.out.printf("%-10s %5d %5d\n",name,score,c);
}
}

public class ffdfbfhbfhdfgsdrgthyjdtyjtrfhtryhjyjh {

public static void main(String[] args) {

// TODO Auto-generated method stub
S[] x=new S[20];
x[0]=new S("java",80,3);
x[1]=new S("security",70,2);
for(int i=0;i<2;i++)x[i].print();
}

}

A10533009林子喬 提到...

package aaa;


class S{
String name;
int score;
int c;
S(String x, int y,int z){

name=x;
score=y;
c=z;
}
void print(){
System.out.printf(" %-10s %5d %5d\n",name,score,c);
}
}
public class holle {
public static void main(String[] args) {
S[] X=new S[15];
X[0]=new S("文選",68,2);
X[1]=new S("商用英文會話",84,2);
X[2]=new S("身體的哲學思維[一般]",85,2);
X[3]=new S("動態網頁設計",80,3);
X[4]=new S("資料庫管理系統",65,3);
X[5]=new S("資料庫管理",43,3);
X[6]=new S("程式設計",72,3);
X[7]=new S("資料管理專體報告寫作",65,1);
X[8]=new S("資訊網路",68,3);
X[9]=new S("網路行銷",79,3);
X[10]=new S("導師",75,0);
X[11]=new S("體育",70,0);
for(int i=0; i<12;i++)X[i].print();

}

}

A10533016 提到...

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 ex13 {
public static void main(String[] args) {
Subject[] X=new Subject[7];
X[0]=new Subject("文選",68,2);
X[1]=new Subject("英文",80,2);
X[2]=new Subject("藝術",40,2);
X[3]=new Subject("資管",51,3);
X[4]=new Subject("資庫",65,3);
X[5]=new Subject("程設",72,3);
X[6]=new Subject("資網",76,3);

for(int v=0;v<7;v++)
X[v].print();
}

}

A10533003 提到...

class S{ String name; int score; int c; S(String x,int y,int z){ name=x;score=y;c=z; }void print(){ System.out.printf("%-10s %5d %5d\n",name,score,c);}}public class ssdg { public static void main(String[] args) { S[] x=new S[20]; x[0]=new S("java",80,3); x[1]=new S("security",70,2); for(int i=0;i<2;i++)x[i].print(); }}

A10533006 提到...

class S{
String name;
int score;
int credit;
S(String x, int y, int z){
name=x; score=y; credit=z;
}
void print(){
System.out.println(name+","+score+","+credit);
}
}
public class ex {
public static void main(String[] args) {
S[] X=new S[11];
X[0]=new S("java",72,3);
X[1]=new S("文選",84,2);
X[2]=new S("英文",100,2);
X[3]=new S("日文",35,2);
X[4]=new S("動態網頁",80,3);
X[5]=new S("IM",53,3);
X[6]=new S("SQL",80,3);
X[7]=new S("資訊網路",80,3);
X[8]=new S("網路行銷",80,3);
X[9]=new S("專題",80,1);
X[10]=new S("體育",100,2);
for(int i=0; i<11; i++) X[i].print();
}
}

A10533007 提到...

class S{ String name; int score; int c; S(String x,int y,int z){ name=x;score=y;c=z; }void print(){ System.out.printf("%-10s %5d %5d\n",name,score,c);}}public class dllls { public static void main(String[] args) { S[] x=new S[20]; x[0]=new S("java",80,3); x[1]=new S("security",70,2); for(int i=0;i<2;i++)x[i].print(); }}

A10533002 提到...

class S{
String name;
int c;
int score;
S(String x,int y,int z){
name=x; score=y; c=z;
}

void print() {
System.out.println(name+","+score+","+c);
}
}
class ex1 {
public static void main(String[] args) {
S[] X=new S[7];
X[0]=new S("java",72,3);
X[1]=new S("文選", 72,2);
X[2]=new S("商用英文會話",80,2);
X[3]=new S("數位影像藝術",60,2);
X[4]=new S("資訊管理",45,3);
X[5]=new S("資料庫管理系統",65,3);
X[6]=new S("資訊網路",76,3);
for(int i=0;i<7;i++) X[i].print();




}

}

A10533005 提到...

class S{
String name;
int score;
int credit;
public S(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 ex13 {

public static void main(String[] args) {
S[] X=new S[10];
X[0]=new S("文選",86,2);
X[1]=new S("英文",85,2);
X[2]=new S("網頁",95,3);
X[3]=new S("資管",70,3);
X[4]=new S("資庫",90,3);
X[5]=new S("程設",98,3);
X[6]=new S("資網",96,3);
X[7]=new S("行銷",98,3);
for(int i=0;i<8;i++){
X[i].print();
}

}

}

a10533001 提到...

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[9];
X[0]=new Subject("程式",99,3);
X[1]=new Subject("文選",86,2);
X[2]=new Subject("商用英文會話",98,2);
X[3]=new Subject("音樂森林",87,2);
X[4]=new Subject("動態網頁設計",95,3);
X[5]=new Subject("資訊管理",54,3);
X[6]=new Subject("資料庫管理系統",90,3);
X[7]=new Subject("資訊網路",89,3);
X[8]=new Subject("網路行銷",98,3);
for(int i=0;i<9;i++){
X[i].print();
}


}

}

A10533011 提到...

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 ex {
public static void main(String[] args) {
Subject[] X=new Subject[9];
X[0]=new Subject("文選",84,2);
X[1]=new Subject("英文",95,2);
X[2]=new Subject("日文",36,2);
X[3]=new Subject("網頁",95,3);
X[4]=new Subject("資管",52,3);
X[5]=new Subject("資庫",90,3);
X[6]=new Subject("程設",99,3);
X[7]=new Subject("資網",99,3);
X[8]=new Subject("行銷",98,3);

for(int i=0;i<9;i++)
X[i].print();
}
}

b10233072黃宥婕 提到...

A10533004易廷軒 提到...
class s{
String name;
int score;
int credit;
s(String x, int y, int z){
name=x; score=y; credit=z;
}
void print(){
System.out.printf(" %-10s %5d %5d\n", name, score, credit);
}
}
public class ex2 {

public static void main(String[] args) {
s[] x=new s[20];
x[0]=new s("文選", 80 ,2);
x[1]=new s("商用英文會話", 98, 2);
x[2]=new s("身體的哲學思維", 85 ,2);
x[3]=new s("動態網頁設計", 85 ,3);
x[4]=new s("資訊管理", 50 ,3);
x[5]=new s("資料庫管理系統", 65 ,3);
x[6]=new s("程式設計", 72 ,3);
x[7]=new s("資訊網路", 88 ,3);
x[8]=new s("網路行銷", 80 ,3);
for(int i=0; i<9; i++) x[i].print();

}

}

b10433030 楊家睿 提到...

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 ex13 {
public static void main(String[] args) {
Subject[] X=new Subject[7];
X[0]=new Subject("文選",68,2);
X[1]=new Subject("英文",80,2);
X[2]=new Subject("藝術",40,2);
X[3]=new Subject("資管",51,3);
X[4]=new Subject("資庫",65,3);
X[5]=new Subject("程設",72,3);
X[6]=new Subject("資網",76,3);

for(int v=0;v<7;v++)
X[v].print();
}

}

b10233074 提到...

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 ex13 {
public static void main(String[] args) {
Subject[] X=new Subject[7];
X[0]=new Subject("文選",68,2);
X[1]=new Subject("英文",80,2);
X[2]=new Subject("藝術",40,2);
X[3]=new Subject("資管",51,3);
X[4]=new Subject("資庫",65,3);
X[5]=new Subject("程設",72,3);
X[6]=new Subject("資網",76,3);

for(int v=0;v<7;v++)
X[v].print();
}

}

B10233077 提到...

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 ex13 {
public static void main(String[] args) {
Subject[] X=new Subject[7];
X[0]=new Subject("文選",68,2);
X[1]=new Subject("英文",80,2);
X[2]=new Subject("藝術",40,2);
X[3]=new Subject("資管",51,3);
X[4]=new Subject("資庫",65,3);
X[5]=new Subject("程設",72,3);
X[6]=new Subject("資網",76,3);

for(int v=0;v<7;v++)
X[v].print();
}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章