object init
This commit is contained in:
parent
891be95dac
commit
77d05d6015
2
.idea/.gitignore
vendored
Normal file
2
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# Default ignored files
|
||||
/workspace.xml
|
8
.idea/AL-2020.iml
Normal file
8
.idea/AL-2020.iml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
7
.idea/dictionaries/Pawe_ukaszewicz.xml
Normal file
7
.idea/dictionaries/Pawe_ukaszewicz.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="Paweł Łukaszewicz">
|
||||
<words>
|
||||
<w>farcing</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/AL-2020.iml" filepath="$PROJECT_DIR$/.idea/AL-2020.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
14
objects/Field.js
Normal file
14
objects/Field.js
Normal file
@ -0,0 +1,14 @@
|
||||
class Field {
|
||||
constructor(x, y, isEmpty) {
|
||||
this.xField = x;
|
||||
this.yField = y;
|
||||
this.isFieldEmpty = isEmpty;
|
||||
}
|
||||
getCoordinates(){
|
||||
return this.xField + this.yField;
|
||||
}
|
||||
|
||||
getStatus(){
|
||||
return this.isFieldEmpty;
|
||||
}
|
||||
}
|
8
objects/Product.js
Normal file
8
objects/Product.js
Normal file
@ -0,0 +1,8 @@
|
||||
class Product {
|
||||
constructor(name, type, farcing, price) {
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.farcing = farcing;
|
||||
this.price = price
|
||||
}
|
||||
}
|
17
objects/Rack.js
Normal file
17
objects/Rack.js
Normal file
@ -0,0 +1,17 @@
|
||||
class Rack{
|
||||
constructor(noOfShelf) {
|
||||
this.noOfShelf = noOfShelf;
|
||||
}
|
||||
|
||||
addShelf(){
|
||||
this.noOfShelf = this.noOfShelf + 1;
|
||||
}
|
||||
|
||||
isEmpty(){
|
||||
if (this.noOfShelf === 0){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
5
objects/Shelf.js
Normal file
5
objects/Shelf.js
Normal file
@ -0,0 +1,5 @@
|
||||
class Shelf {
|
||||
constructor(number) {
|
||||
this.number = number;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user