struct Engineer {
name: String,
role: String,
education: String,
spoken_languages: Vec<String>,
interests: Vec<String>,
}
impl Engineer {
fn new(
name: String,
role: String,
education:String,
spoken_languages: Vec<String>,
interests: Vec<String>) -> Engineer {
Engineer {
name,
role,
education,
spoken_languages,
interests,
}
}
fn print_info(&self) {
println!("Name: {}", self.name);
println!("Role: {}", self.role);
println!("Education: {}", self.education);
println!("I can speak: {:?}", self.spoken_languages);
println!("My interests are: {:?}", self.interests);
}
}
fn main() {
let engineer = Engineer::new(
String::from("Victor Boyer"),
String::from("Software Engineer"),
String::from("B.S. in Mathematics, B.S. in Quantitative Finance, M.S. in Applied Mathematics"),
vec![String::from("English"), String::from("German")],
vec![
String::from("Cryptology"),
String::from("Parallel systems"),
String::from("GPU Acceleration/CUDA"),
String::from("High Performance Computing")],
);
engineer.print_info();
}
building tomorrow's unmaintainable code today
- Washington, US
Popular repositories Loading
-
-
-
-
otwarchive
otwarchive PublicForked from otwcode/otwarchive
The Organization for Transformative Works (OTW) - Archive Of Our Own (AO3) Project
Ruby
-
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.