CJCoding With Joseph
15free / daySign inCreate account

Student Record Template

Create 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 — print one after the last line.

Hints2 available
Topics:
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.