The person class is an illustration of constructors;
In computer programs, constructors are automatically called when the object of a class is created
The class and the constructor program written in C++ programming language is as follows:
int main(){
string fname, lname,dob,idno,mobileno;
cin>>lname; cin>>fname; cin>>dob; cin>>idno; cin>>mobileno;
Person c(fname,lname,dob,idno,mobileno);
if(mobileno.length() == 12){
if(mobileno[3] == '-' && mobileno[7] == '-'){
cout << "Name: " << c.getfname() << " " << c.getlname() << endl
<< "Date of birth: " << c.getdob() << endl
<< "ID number: " << c.getid() << endl
<< "Mobile: " << c.getmobile() << endl
<< "Age: "<< getAge(dob)<<endl;
;
}
}
The complete program is added as an attachment
Read more about C++ programs at:
https://brainly.com/question/13168905
#SPJ1