This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
Car normal = Car(); | |
print(normal.numberOfSeat); | |
normal.drive(); | |
ElectricCar myTesla = ElectricCar(); | |
myTesla.drive(); | |
myTesla.recharge(); | |
LevitatingCar glide = LevitatingCar(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
Car normal = Car(); | |
print(normal.numberOfSeat); | |
normal.drive(); | |
ElectricCar myTesla = ElectricCar(); | |
myTesla.drive(); | |
myTesla.recharge(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
//dema is the actual objet | |
Human dema = Human(height:15,age:12); | |
print(dema.height); | |
dema.talk('Why is the sky blue??'); | |
Human innocent = Human(height: 1.6,age:30); | |
print(innocent.height); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
void main(){ | |
loveCalculator(); | |
} | |
void loveCalculator(){ | |
int loveScore = Random().nextInt(100) + 1; | |
print(loveScore); | |
// if and if | |
if (loveScore > 70){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
//craete a list of String | |
List<String> myList=[ | |
'Innocent', | |
'Dema' | |
]; | |
// manupilate the list | |
// print(myList); |