mirror of https://github.com/01-edu/public.git
style: prettier
This commit is contained in:
parent
4a13182ce9
commit
4d7ce71190
|
@ -11,6 +11,7 @@ Attributes:
|
||||||
- `radius`: `double`
|
- `radius`: `double`
|
||||||
|
|
||||||
Getters:
|
Getters:
|
||||||
|
|
||||||
- `area`
|
- `area`
|
||||||
- `perimeter`
|
- `perimeter`
|
||||||
- `rightMostCoordinate`: (x axis)
|
- `rightMostCoordinate`: (x axis)
|
||||||
|
@ -19,6 +20,7 @@ Getters:
|
||||||
- `lowestCoordinate`: (y axis)
|
- `lowestCoordinate`: (y axis)
|
||||||
|
|
||||||
Constructor:
|
Constructor:
|
||||||
|
|
||||||
- `x`: `required`
|
- `x`: `required`
|
||||||
- `y`: `required`
|
- `y`: `required`
|
||||||
- `radius`: `required`
|
- `radius`: `required`
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
Write a function named `namedRequiredSum`, that returns the sum of its required [named](https://dart.dev/guides/language/language-tour) `int` parameters:
|
Write a function named `namedRequiredSum`, that returns the sum of its required [named](https://dart.dev/guides/language/language-tour) `int` parameters:
|
||||||
|
|
||||||
- `first`
|
- `first`
|
||||||
- `second`
|
- `second`
|
||||||
- `third`
|
- `third`
|
||||||
|
|
|
@ -23,6 +23,7 @@ Constructor:
|
||||||
### Object Oriented Programming
|
### Object Oriented Programming
|
||||||
|
|
||||||
Dart supports object oriented programming, and it features heavily in Flutter. Classes have 2 main concepts.
|
Dart supports object oriented programming, and it features heavily in Flutter. Classes have 2 main concepts.
|
||||||
|
|
||||||
- Attributes: store data about the instance of a class.
|
- Attributes: store data about the instance of a class.
|
||||||
- Methods: are func functions, which can use class attributes for various manipulations.
|
- Methods: are func functions, which can use class attributes for various manipulations.
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ class Point {
|
||||||
Point(double x, double y) {
|
Point(double x, double y) {
|
||||||
// Sets the attributes to the value of the constructor arguments.
|
// Sets the attributes to the value of the constructor arguments.
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.x = x;
|
this.x = x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -62,7 +63,7 @@ class Point {
|
||||||
double x;
|
double x;
|
||||||
double y;
|
double y;
|
||||||
|
|
||||||
Point(this.x, this.y);
|
Point(this.x, this.y);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,13 @@ Attributes:
|
||||||
- `secretKey`: private `string`. Defaults to "01".
|
- `secretKey`: private `string`. Defaults to "01".
|
||||||
|
|
||||||
Constructor:
|
Constructor:
|
||||||
- `name`: `string`
|
|
||||||
- `cityOfOrigin`: `string`
|
- `name`: `string`
|
||||||
- `age`: `int`
|
- `cityOfOrigin`: `string`
|
||||||
- `height`: `int`
|
- `age`: `int`
|
||||||
- `batch`: `int`
|
- `height`: `int`
|
||||||
- `level`: `int`
|
- `batch`: `int`
|
||||||
|
- `level`: `int`
|
||||||
|
|
||||||
### Inheritance
|
### Inheritance
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,13 @@ Attributes:
|
||||||
- `ranking`: `private int?`
|
- `ranking`: `private int?`
|
||||||
|
|
||||||
Getters:
|
Getters:
|
||||||
|
|
||||||
- `name`
|
- `name`
|
||||||
- `city`
|
- `city`
|
||||||
- `ranking`
|
- `ranking`
|
||||||
|
|
||||||
Constructor:
|
Constructor:
|
||||||
|
|
||||||
- `name`: `required`
|
- `name`: `required`
|
||||||
- `city`: `required`
|
- `city`: `required`
|
||||||
- `ranking`: `optional`
|
- `ranking`: `optional`
|
||||||
|
|
|
@ -13,6 +13,7 @@ String strSpongebob = 'Spongebob';
|
||||||
```
|
```
|
||||||
|
|
||||||
Declare and initialize the following variables:
|
Declare and initialize the following variables:
|
||||||
|
|
||||||
- `obj` of type `Object`, containing any value.
|
- `obj` of type `Object`, containing any value.
|
||||||
- `planet` of type `String`, containing the name of the planet you live on.
|
- `planet` of type `String`, containing the name of the planet you live on.
|
||||||
- `year` of type `int`, containing the current year.
|
- `year` of type `int`, containing the current year.
|
||||||
|
|
Loading…
Reference in New Issue