Files
2023-04-16 10:28:45 +08:00

53 lines
451 B
Dart

class Human {
String name = '';
double weight = 0;
double height = 0;
Human(this.name, this.weight, this.height);
String info() {
return "Human: name{${name},weight:${weight}kg,height:${height}cm}";
}
}
void main() {
Human toly = Human("捷特", 70, 180);
print(toly.info());
Human ls = Human("龙少", 65, 179);
print(ls.info());
Human wy = Human("巫缨", 65, 179);
print(wy.info());
}