問答題
【簡答題】
定義一個復(fù)數(shù)(z=x+iy)類Complex,包含: 兩個屬性:實(shí)部x和虛部y
默認(rèn)構(gòu)造函數(shù) Complex(),設(shè)置x=0,y=0
構(gòu)造函數(shù):Complex(int i,int j)
求兩個復(fù)數(shù)的和:public static Complex addComp(Complex C1, Complex C2)
求兩個復(fù)數(shù)的差:public static Complex subComp(Complex C1, Complex C2)
顯示復(fù)數(shù)內(nèi)容的方法toString
添加不定長參數(shù)的加法和減法的方法。