feat: update class diagram in README.md to include Contact class and its relationships

lab2
Artem-Darius Weber 4 weeks ago
parent a622813621
commit 80e86e0f99

@ -6,46 +6,63 @@
```mermaid ```mermaid
classDiagram 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 { class Person {
+id: String - id : String
+git: String - git : String
-phone: String - contact : Contact
-telegram: String + Person(id : String, git : String, contact : Contact)
-email: String + git_present() : Boolean
+initialize(args: Hash) + contact_present() : Boolean
+set_contacts(phone: String, telegram: String, email: String) + contact_info() : String
+git_present(): Boolean + valid_git(git : String) : Boolean
+contact_present(): Boolean + valid_id(id : String) : Boolean
+contact_info(): String - validate_person()
+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 { class StudentRepository {
+surname: String + read_from_txt(file_path : String) : List~Student~
+name: String + write_to_txt(file_path : String, students : List~Student~)
+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 { class StudentShort {
+surname_initials: String - surname_initials : String
+contact: String - contact : String
+initialize(student: Student) + StudentShort(id : String, git : String, surname_initials : String, contact : Contact)
+from_string(id: String, info_string: String): StudentShort + 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 <|-- Student
Person <|-- StudentShort Person <|-- StudentShort
Student <.. StudentRepository
``` ```
где + - public, - - private где + - public, - - private

Loading…
Cancel
Save