rgeorgiev583 / hackbulgaria Goto Github PK
View Code? Open in Web Editor NEWExercises; homeworks, exams and other assignments for the Hack Bulgaria courses
Exercises; homeworks, exams and other assignments for the Hack Bulgaria courses
Първа задача е супер.
В тестовете обаче, в един тест тестваш няколко неща. Както знаеш, хубаво е един метод да прави едно нещо. Тест-методите не правят изключение.
assertEquals(true, booleanExpr);
- не. Ползвай assertTrue(booleanExpr)
. Същото и за assertFalse, ест.
Default-ния level (3) не си го изнесъл в константа!
Мнооого яко че Календар-а ти е final. Така трябва.
Под "предпазване" на потребител на класа ти от неправилен usage се имат впредвид да хвърляш наследник на RuntimeException при опит за неправилен usage. Явно не си бил на exceptions.
По твоя начин if (level > 0) doWork...
, правиш нещо доста лошо - ако не ти харесва подадения аргумент, няма да си свърши работата метода ти, но и няма да нотифицираш по никакъв начин caller-a и той въобще няма да разбере, че твоя клас тайничко ignore-ва call-ове. Лоша идея, not cool.
Липсват ти Override нотации в DateLogger.
Единия ти log метод (А) вика другия (Б). Защо си override-нал и двата? Override на (Б) ти е достатъчен. Помисли защо.
С изключение на тези и още няколко по-дребни забележки, ОК са задачите. Лошото е, че си изпуснал exceptions, но вторник ще правим recap на тях.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.