1 StudentShort Class
Artem-Darius Weber edited this page 7 months ago
This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

Класс StudentShort

Атрибуты:

  • id: Integer — Идентификатор студента.
  • surname_initials: String — Фамилия и инициалы студента.
  • git: String — Ссылка на GitHub.
  • contact: String — Основной контакт студента (неизменяемый).

Методы:

  • initialize(student: Student) — Конструктор, инициализирующий объект StudentShort из объекта Student. Поля задаются на основе переданного объекта и не могут быть изменены напрямую.
  • self.from_string(id: Integer, info_string: String) -> StudentShort — Создает объект StudentShort из строки, содержащей фамилию с инициалами, ссылку на GitHub и контактную информацию.

Описание:

  • Класс: StudentShort
    • Атрибуты:
      • +id: Integer
      • +surname_initials: String
      • +git: String
      • +contact: String
    • Методы:
      • +initialize(student: Student)
      • +from_string(id: Integer, info_string: String) -> StudentShort

Приватные методы:

  • initialize_from_data(id, surname_initials, git, contact) — Инициализирует объект с данными, переданными в формате отдельных полей.
Table of Contents