关于子类与父类.
public class Ractangle {
private double width;
public double height;
public double Width {
set {
if (0 < value) {
this.width = value;
}
else {
this.width = value;
}
}
get {
return this.width;
}
}
public double Height {
set {
if (0 < value) {
this.height = value;
}
else {
this.height = -1;
}
}
get {
return this.Height;
}
}
public Ractangle(double w, double h) {
if (0 < w && 0 < h) {
this.width = w;
this.height = h;
}
}
}
//这里报错:Page180Ex04.Ractangle' does not contain a constructor that takes 0 arguments
public class ExRactangle:Ractangle {
public ExRactangle(double&