refactor: update class method signatures to remove 'self' and improve readability

lab2
Artem-Darius Weber 3 days ago
parent e327cf09f6
commit 2932741c0e

@ -30,9 +30,9 @@ classDiagram
+ phone=(String) : Boolean + phone=(String) : Boolean
+ telegram=(String) : Boolean + telegram=(String) : Boolean
+ email=(String) : Boolean + email=(String) : Boolean
+ self.valid_phone_number() : Boolean + valid_phone_number() : Boolean <<class>>
+ self.valid_telegram() : Boolean + valid_telegram() : Boolean <<class>>
+ self.valid_email() : Boolean + valid_email() : Boolean <<class>>
+ git_present() : Boolean + git_present() : Boolean
+ contact_present() : Boolean + contact_present() : Boolean
+ contact_info() : String + contact_info() : String
@ -45,16 +45,17 @@ classDiagram
} }
class StudentRepository { class StudentRepository {
+ self.read_from_txt(file_path : String) : List~Student~ + read_from_txt(file_path : String) : List~Student~ <<class>>
+ self.write_to_txt(file_path : String, students : List~Student~) + write_to_txt(file_path : String, students : List~Student~) <<class>>
} }
class StudentShort { class StudentShort {
- surname_initials : String - surname_initials : String
+ StudentShort(id : String, surname_initials : String, phone: String, telegram: String, email: String) + StudentShort(id : String, surname_initials : String, phone: String, telegram: String, email: String)
+ self.from_student(student : Student) : StudentShort + from_student(student : Student) : StudentShort <<class>>
+ self.from_string(id : String, info_string : String) : StudentShort + from_string(id : String, info_string : String) : StudentShort <<class>>
+ to_s() : String + to_s() : String
- parse_contact_string(contact_string: String) : Array<String> <<class>>
} }
class Student { class Student {
@ -64,7 +65,7 @@ classDiagram
- birth_date : Date - birth_date : Date
- const NAME_REGEX : String - const NAME_REGEX : String
+ Student(id : String, git : String, phone: String, telegram: String, email: String, surname : String, name : String, patronymic : String, birth_date : Date) + 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 <<class>>
+ surname_and_initials() : String + surname_and_initials() : String
+ to_s() : String + to_s() : String
+ get_info() : String + get_info() : String
@ -72,7 +73,7 @@ classDiagram
+ name=(name : String) + name=(name : String)
+ patronymic=(patronymic : String) + patronymic=(patronymic : String)
+ birth_date=(birthdate : String) + birth_date=(birthdate : String)
+ self.valid_name?(name : String) : Boolean + valid_name?(name : String) : Boolean <<class>>
- name_initial(name : String) : String - name_initial(name : String) : String
- patronymic(patronymic : String) : String - patronymic(patronymic : String) : String
} }

Loading…
Cancel
Save