diff --git a/lab2/README.md b/lab2/README.md index 5ad6678..da36500 100644 --- a/lab2/README.md +++ b/lab2/README.md @@ -2,3 +2,50 @@ > "И тут я обнаружил что случайно сделал 3-5 задачи в 1-2" +## Диаграмма классов: + +```mermaid +classDiagram + class Person { + +id: String + +git: String + -phone: String + -telegram: String + -email: String + +initialize(args: Hash) + +set_contacts(phone: String, telegram: String, email: String) + +git_present(): Boolean + +contact_present(): Boolean + +contact_info(): String + +valid_phone_number?(phone: String): Boolean + +valid_name?(name: String): Boolean + +valid_telegram?(telegram: String): Boolean + +valid_email?(email: String): Boolean + +valid_git?(git: String): Boolean + } + + class Student { + +surname: String + +name: String + +patronymic: String + +initialize(args: Hash) + +from_string(student_string: String): Student + +read_from_txt(file_path: String): List~Student~ + +write_to_txt(file_path: String, students: List~Student~) + +surname_and_initials(): String + +to_s(): String + +get_info(): String + } + + class StudentShort { + +surname_initials: String + +contact: String + +initialize(student: Student) + +from_string(id: String, info_string: String): StudentShort + } + + Person <|-- Student + Person <|-- StudentShort +``` + +где + - public, - - private