trait Person {
    fn name(&self) -> String;
}

trait Student: Person {
    fn student_name(&self) -> String {
        self.name()
    }
    fn college(&self) -> String;
}

struct CollegeStudent {
    name: String,
    college: String,
}

impl Person for CollegeStudent {
    fn name(&self) -> String {
        self.name.clone()
    }
}

impl Student for CollegeStudent {
    fn college(&self) -> String {
        self.college.clone()
    }
}

fn main() {
    let student = CollegeStudent {
        name: String::from("Taro Yamada"),
        college: String::from("Tokyo University"),
    };
    println!("名前は {} で、通っている大学は {} です。",
        student.student_name(),
        student.college()
    );
}