# 10. Abstract classes and inheritance in Scala homework ## Задания ### Preface Implement all the things with `???` body. *All tests should pass.* I have additional test for the functionality. My tests also *should pass*. Feel free to add more test cases. ### How to pass Create a new branch `homework-10`. You *should not* commit your solution to your `*master*` branch, only to `homework-10` branch. You can do as many commits as you want to `homework-10`. Please provide any commit wiht meaningful commit message following the format ``` HOMEWORK-10 - <brief explanation> <detailed explanation if neede> ``` Yes, `HOMEWORK-10` is in upper case. Yes, `HOMEWORK-10` then ` ` (**space**) then `-` (**dash**) then ` ` (**space**) then brief explanation. After the implementation (with tests) is done create *merge request* (aka code review aka pr) and add me as a reviewer... and the battle begins! ### IntSet #### Code templates The implementation should be done here: * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/main/scala/karazin/scala/users/group/set/homework/Homework.scala * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/test/scala/karazin/scala/users/group/set/homework/arbitraries.scalaroup/classes/homework/HomeworkSpecification.scala * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/test/scala/karazin/scala/users/group/set/homework/HomeworkSpecification.scala #### Set operations You are challenged to implement tree-like set for integers based on characteristic functions. The set should support following operations: * inclusion * **[Optional task]** removing * if contains * ∪ — union * ∩ — intersection * ∖ — complement * ∆ — disjunctive union ### Peano numbers #### Code templates The implementation should be done here: * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/main/scala/karazin/scala/users/group/peano/numbers/homework/Homework.scala * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/test/scala/karazin/scala/users/group/peano/numbers/homework/HomeworkSpecification.scala * https://github.com/KarazinScalaUsersGroup/scala-course-2020/blob/master/src/test/scala/karazin/scala/users/group/peano/numbers/homework/arbitraries.scala #### Peano numbers operations You are challenged to implement peano numbers. The set should support following operations: * isZero * predecessor * successor * \+ * \- * **[Optional task**] toInt * **[Optional task]** fromInt #### Test cases Test cases deliberately set empty. Please discuss in Q&A chat what cases could be added to tests. ## Проблемы с подсветкой синтаксиса для Dotty Проверьте настройки проекта: ![](https://i.imgur.com/Li71dFd.png) ![](https://i.imgur.com/3Aeic62.png) ## Ограничение доступа к форку Удалите группу `scala-course-2020` из форка, как это показано здесь: ![](https://i.imgur.com/vlQRWD8.png)