I've written a program all by myself, but I just want to make sure I did it right and if anybody has any suggestions on improving it in any way.Define and implement the Die class depicted by the following UML diagram to create an ADT for one die (singular of dice) with faces showing values between 1 and the numberOfFaces on the die. Define a two-parameter constructor with defaults of 6 faces and 1 for face value. Define and implement a roll() method to simulate the rolling of the die by generating a random number between 1 and numberOfFaces and storing that number in faceValue. Provide an accessor to return the dies face value and a print() method to print the dies face value.Use composition to design a PairOfDice class, composed of two six-sided Die objects. Create a driver program with a main() function to rolls a PairDice object 1000 times, counting then displaying the number of snake eyes (i.e. two ones) and box cars (i.e. two sixes) that occur.die.h#ifndef DIE_H#define DIE_Hclass die {private:    int numberOfFaces;    int faceValue;public:    die();    die(int, int);    int roll();    void print();};#endifdie.cpp#include die.h#include<iostream>#include<ctime>#include<random>using namespace std;die::die(){    numberOfFaces=6;    faceValue=1;}die::die(int numOfFaces, int faceVal){    numberOfFaces=numOfFaces;    faceValue=faceVal;}int die::roll(){    faceValue=rand()%numberOfFaces;    return faceValue;}void die::print(){    cout << faceValue << endl;}pairOfDice.h#include die.h#ifndef PAIROFDICE_H#define PAIROFDICE_Hclass pairOfDice :    public die{private:    die die1;    die die2;    int value1;    int value2;    int total;public:    pairOfDice();    int roll();};#endifpairOfDice.cpp#include pairOfDice.hpairOfDice::pairOfDice()    :die(6,1){    value1=1;    value2=1;    total=value1+value2;}int pairOfDice::roll(){    value1=die::roll();    value2=die::roll();    total=value1+value2;    return total;}main.cpp#includepairOfDice.h#include<iostream>using namespace std;int main(){    int rolls=0, total=0, snakeEyes=0, boxCars=0;    pairOfDice dice;    while(rolls<1000)    {        total = dice.roll();        if(total==2)            snakeEyes++;        else if(total==6)            boxCars++;        else            rolls++;    }    cout << rolls <<   << snakeEyes <<   << boxCars << endl;    system(pause);    return 0;}
Modeling a pair of dice using composition in C++
c++;object oriented;random;dice