Student Record Template
mediumQuestion 164Create a template class StudentRecord<T, U> that stores a student's name (type T) and grade (type U).
The constructor takes two arguments: StudentRecord(T name, U grade)
Implement:
- print(): prints Name: [name], Grade: [grade] followed by a newline
Do NOT write a main function.
Expected output
Name: Alice, Grade: 95 Name: Bob, Grade: 88.5
= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
Templates
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.