You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kubsu-sm5-ruby/lab2
Artem-Darius Weber d392be8d5d
refactor: update Student class initialization and validation; add StudentRepository for file operations
4 weeks ago
..
README.md docs: add class diagram to README.md for Person, Student, and StudentShort classes 1 month ago
contact.rb feat: add Contact class with validation for phone, telegram, and email 4 weeks ago
main.rb feat: add StudentShort class with immutable fields and constructors 4 months ago
person.rb refactor: simplify Person class initialization and validation logic 4 weeks ago
student.rb refactor: update Student class initialization and validation; add StudentRepository for file operations 4 weeks ago
student_repository.rb refactor: update Student class initialization and validation; add StudentRepository for file operations 4 weeks ago
student_short.rb refactor: enhance StudentShort initialization and add from_student method 4 weeks ago

README.md

Lab 2

"И тут я обнаружил что случайно сделал 3-5 задачи в 1-2"

Диаграмма классов:

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