void main() {
print('Om Namah Shivay');
Roti roti = Roti(heatReguired: 50.0, name: 'wheat', water: 26.23);
print(roti.process());
}
//class
class ingredient {
late String name;
late double water;
ingredient({required this.name, required this.water});
}
class Roti extends ingredient {
late double heatReguired;
Roti({required this.heatReguired, required super.name, required super.water});
String process() {
return '$heatReguired is the heat needed for making roti that take $name and $water water';
}
}
I understood
Top comments (0)