Write a program in C++ that makes use of three classes namely:
Student - stores student name and registration number
Mark - stores the test scores obtained in two subjects
Result - inherits student details from student and test scores from mark and displays the student details and the total of the test scores.
The program should create one object called graduate.