
Create a class named Person with a string variable 'name' and an integer variable 'age,' such that these variables are not accessible outside the class and implement a way to initialize the variables and print the variables.
Functions: 1.setValue- that sets the variables value. 2.getValue- that prints the variables value.The first line of input contains a single string Name, representing the name of the person.
The second line of input contains a single integer Age, representing the age of the person.
Output Format:
The only line of output prints the name and age by sticking to the sample input format. Mind that the output string won't have preceding or trailing spaces.
Afzal
67
The name of the person is Afzal and the age is 67.
Ali
30
The name of the person is Ali and the age is 30.
The input name is Ali and the input age is 30 which is printed in the specified format.