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.
Artem-Darius Weber
5f3c510253
|
4 weeks ago | |
---|---|---|
.. | ||
README.md | 4 weeks ago | |
contact.rb | 4 weeks ago | |
main.rb | 4 weeks ago | |
person.rb | 4 weeks ago | |
student.rb | 4 weeks ago | |
student_repository.rb | 4 weeks ago | |
student_short.rb | 4 weeks ago | |
students.txt | 4 weeks ago |
README.md
Lab 2
"И тут я обнаружил что случайно сделал 3-5 задачи в 1-2"
Диаграмма классов:
classDiagram
class Contact {
- phone : String?
- telegram : String?
- email : String?
+ Contact(phone : String?, telegram : String?, email : String?)
+ valid_phone_number() : Boolean
+ valid_telegram() : Boolean
+ valid_email() : Boolean
+ present() : Boolean
+ info() : String
- validate_contacts()
+ new_from_info(info_string : String) : Contact
}
class Person {
- id : String
- git : String
- contact : Contact
+ Person(id : String, git : String, contact : Contact)
+ git_present() : Boolean
+ contact_present() : Boolean
+ contact_info() : String
+ valid_git(git : String) : Boolean
+ valid_id(id : String) : Boolean
- validate_person()
}
class StudentRepository {
+ read_from_txt(file_path : String) : List~Student~
+ write_to_txt(file_path : String, students : List~Student~)
}
class StudentShort {
- surname_initials : String
- contact : String
+ StudentShort(id : String, git : String, surname_initials : String, contact : Contact)
+ from_student(student : Student) : StudentShort
+ from_string(id : String, info_string : String) : StudentShort
+ to_s() : String
}
class Student {
- surname : String
- name : String
- patronymic : String
+ Student(id : String, git : String, contact : Contact, surname : String, name : String, patronymic : String)
+ from_string(student_string : String) : Student
+ surname_and_initials() : String
+ to_s() : String
+ get_info() : String
- validate_student()
}
Contact <|-- Person
Person <|-- Student
Person <|-- StudentShort
Student <.. StudentRepository
где + - public, - - private