feat: completed solutions
This commit is contained in:
@@ -10,16 +10,17 @@
|
||||
//
|
||||
// Make the necessary code changes in the struct `ReportCard` and the impl
|
||||
// block to support alphabetical report cards in addition to numerical ones.
|
||||
use std::fmt::Display;
|
||||
|
||||
// TODO: Adjust the struct as described above.
|
||||
struct ReportCard {
|
||||
grade: f32,
|
||||
struct ReportCard<G: Display> {
|
||||
grade: G,
|
||||
student_name: String,
|
||||
student_age: u8,
|
||||
}
|
||||
|
||||
// TODO: Adjust the impl block as described above.
|
||||
impl ReportCard {
|
||||
impl<G: Display> ReportCard<G> {
|
||||
fn print(&self) -> String {
|
||||
format!(
|
||||
"{} ({}) - achieved a grade of {}",
|
||||
|
||||
Reference in New Issue
Block a user