PROGRAMMING:Use of list
Use the exercise list.
*Define the person class
1. Define private attributes string name, int age, and use eclipse to generate each attribute setter, getter, person (string name, int age) with parameters, construction method without parameters, and toString method.
*Define the main class in the main method
1. Define list < person > List = new ArrayList < person > ();
2. Assign value to variable n with keyboard
3. Generate n person objects and add them to the list. The name and age of the person are given by the keyboard
4. Loop the list and output the information of all person objects in the list (calling toString method)
5. Input a string to represent the name and judge whether the person object represented by the string exists in the list. If it exists, output the person; otherwise, output the person does not exist.
###Input format:
First, enter n for the number of objects in one line, and then enter the name and age of a person object in each line
Input a person's name in one line to query
###Output format:
For each object, the information of the object is output in one line.
For the inquired person, the information of the output person is found, otherwise the output person does not exist.
###Input example:
Here is a set of inputs. For example:
```in
three
zhang 23
li 44
wang 33
li
```
```in
three
zhang 23
li 44
wang 33
may
```
###Output example:
The corresponding output is given here. For example:
```out
Person [name=zhang, age=23]
Person [name=li, age=44]
Person [name=wang, age=33]
Person [name=li, age=44]
```
```out
Person [name=zhang, age=23]
Person [name=li, age=44]
Person [name=wang, age=33]
This person does not exist
```
answer:If there is no answer, please comment
*Define the person class
1. Define private attributes string name, int age, and use eclipse to generate each attribute setter, getter, person (string name, int age) with parameters, construction method without parameters, and toString method.
*Define the main class in the main method
1. Define list < person > List = new ArrayList < person > ();
2. Assign value to variable n with keyboard
3. Generate n person objects and add them to the list. The name and age of the person are given by the keyboard
4. Loop the list and output the information of all person objects in the list (calling toString method)
5. Input a string to represent the name and judge whether the person object represented by the string exists in the list. If it exists, output the person; otherwise, output the person does not exist.
###Input format:
First, enter n for the number of objects in one line, and then enter the name and age of a person object in each line
Input a person's name in one line to query
###Output format:
For each object, the information of the object is output in one line.
For the inquired person, the information of the output person is found, otherwise the output person does not exist.
###Input example:
Here is a set of inputs. For example:
```in
three
zhang 23
li 44
wang 33
li
```
```in
three
zhang 23
li 44
wang 33
may
```
###Output example:
The corresponding output is given here. For example:
```out
Person [name=zhang, age=23]
Person [name=li, age=44]
Person [name=wang, age=33]
Person [name=li, age=44]
```
```out
Person [name=zhang, age=23]
Person [name=li, age=44]
Person [name=wang, age=33]
This person does not exist
```
answer:If there is no answer, please comment