Follow these steps to implement the example:
- Create a class named Person. This class will have six attributes to define some basic characteristics of a person. We will implement the methods to get() and set() the values of the attributes, but they won't be included here:
public class Person { private int id; private String firstName; private String lastName; private Date birthDate; private int salary; private double coeficient;
- Now, implement a class named PersonGenerator. This class will only have a method named generatedPersonList() to generate a list of Person objects with random values with the size specified in parameters. This is the source code of this class:
public class PersonGenerator { public static ...