From 2932741c0e75604fec68c58cc4e043c7d187bc14 Mon Sep 17 00:00:00 2001 From: Artem Darius Weber Date: Mon, 6 Jan 2025 11:10:14 +0300 Subject: [PATCH] refactor: update class method signatures to remove 'self' and improve readability --- lab2/README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lab2/README.md b/lab2/README.md index cf005eb..28fc2bc 100644 --- a/lab2/README.md +++ b/lab2/README.md @@ -30,9 +30,9 @@ classDiagram + phone=(String) : Boolean + telegram=(String) : Boolean + email=(String) : Boolean - + self.valid_phone_number() : Boolean - + self.valid_telegram() : Boolean - + self.valid_email() : Boolean + + valid_phone_number() : Boolean <> + + valid_telegram() : Boolean <> + + valid_email() : Boolean <> + git_present() : Boolean + contact_present() : Boolean + contact_info() : String @@ -45,16 +45,17 @@ classDiagram } class StudentRepository { - + self.read_from_txt(file_path : String) : List~Student~ - + self.write_to_txt(file_path : String, students : List~Student~) + + read_from_txt(file_path : String) : List~Student~ <> + + write_to_txt(file_path : String, students : List~Student~) <> } class StudentShort { - surname_initials : String + StudentShort(id : String, surname_initials : String, phone: String, telegram: String, email: String) - + self.from_student(student : Student) : StudentShort - + self.from_string(id : String, info_string : String) : StudentShort + + from_student(student : Student) : StudentShort <> + + from_string(id : String, info_string : String) : StudentShort <> + to_s() : String + - parse_contact_string(contact_string: String) : Array <> } class Student { @@ -64,7 +65,7 @@ classDiagram - birth_date : Date - const NAME_REGEX : String + Student(id : String, git : String, phone: String, telegram: String, email: String, surname : String, name : String, patronymic : String, birth_date : Date) - + self.from_string(student_string : String) : Student + + from_string(student_string : String) : Student <> + surname_and_initials() : String + to_s() : String + get_info() : String @@ -72,7 +73,7 @@ classDiagram + name=(name : String) + patronymic=(patronymic : String) + birth_date=(birthdate : String) - + self.valid_name?(name : String) : Boolean + + valid_name?(name : String) : Boolean <> - name_initial(name : String) : String - patronymic(patronymic : String) : String }