Now you know a lot about JavaScript OOP. Remember that tiny JS world? Time to use your new power.
-
Improve your tiny JS world model you forked from here. This time use your favourite JS OOP methods to keep your code DRY and SOLID.
You don't need forking this time, work with the repo you've already got. Git keeps history for you.
You will find these materials helpful.
- If peer classes (siblings) have same properties those must be generalized to their base (parent) class
- Classes for species that do not have hands by natural design, do not consequently have hands or any equivalent property and do not inherit such properties from any of the base/parent classes
- Class properties that are parts of an object's presentation string are listed/specified explicitly
(i.e.
Object
methodsvalues
,keys
,entires
or constructions likefor (key in obj)
aren't used) - Object's presentation string builder is a class method, not an independent function
- Class constructor is defined with named parameters
- A class doesn't assign or change property owned by any other class (defined in any other class)
- A child class shouldn't directly use an inherited property to build an object's presentation string
- The code is OOP, SOLID (eng, rus) and DRY compliant
- Got stuck or anything is not really clear? Ask a question
When complete do the following:
- You will require code review for this task:
- For Frontend 2021 course students: please, follow these instructions
- For p2p course students: please, follow these instructions
- Note, that especially this task requires you to submit
a single file (
index.js
only) to thefrontend-2021-homeworks
orfrontend-2019-p2p
repo for code review.
- Great job! Go ahead and share your progress with others –
post a message in course channel:
OOP Exercise — #done
(orOOP Exercise — #p2p_done
if you are p2p course student) and add the link to your repo. This step is important, as it helps mentors to track your progress! - Study Extra Materials below to improve your skills and read an article or two on OOP under the links in this repo
You have completed OOP tasks section. We shall appreciate your feedback on this section especially if you're doing this course from Ukraine. Please, grant us 10-15 minutes of your time and complete this feedback form.
When you finish this task you can proceed to the next one.
Fun Fun Function - Composition over Inhertance
➡️ Go forward to Offline Web Applications