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
clear all | |
close all | |
global L C bV E R bi bu | |
L = 1e-3; | |
C = 300e-6; | |
R = 100; | |
E = 10; | |
bV = 20; | |
bi = bV^2/R/E; | |
bu = (bV-E)/bV; # 0.5 |
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"; | |
main(List<String> arguments) { | |
var hulk = Hulk(); | |
print(hulk.helpPersonInNeed()); | |
hulk.move(); | |
hulk.attack(); | |
var ironMan = IronMan(); | |
print(ironMan.helpPersonInNeed()); |
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
enum Builder { FENDER, MARTIN, GIBSON, COLLINGS, OLSON, RYAN, PRS, ANY } | |
enum Type { ACOUSTIC, ELECTRIC } | |
enum Wood { | |
INDIAN_ROSEWOOD, | |
BRAZILIAN_ROSEWOOD, | |
MAHOGANY, | |
MAPLE, | |
COCOBOLO, |
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
abstract class Pizza { | |
String name; | |
Dough dough; | |
Sauce sauce; | |
List<Veggies> veggies; | |
Cheese cheese; | |
Pepperoni pepperoni; | |
Clams clam; |
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() { | |
Beverage beverage = new Espresso(); | |
beverage = new ExtraCoffe(beverage); | |
beverage = new Discount(beverage); | |
print("${beverage.getDescription()}: \$${beverage.cost().toStringAsFixed(2)}"); | |
Beverage beverage2 = new DarkRoast(); | |
beverage2 = new Mocha(beverage2); | |
beverage2 = new Mocha(beverage2); | |
beverage2 = new Whip(beverage2); |
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() { | |
WeatherData weatherData = new WeatherData(); | |
CurrentConditionsDisplay currentDisplay = new CurrentConditionsDisplay(weatherData); | |
StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData); | |
ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData); | |
weatherData.setMeasurements(80, 65, 30.4); |