You have a class called Product in your project:
class Product {
private long id;
private String model;
private int price;
private LocalDate dateOfArrival;
private String vendor;
public Product(long id, String model, int price, LocalDate dateOfArrival, String vendor) {
this.id = id;
this.model = model;
this.price = price;
this.dateOfArrival = dateOfArrival;
this.vendor = vendor;
}
public Product() {}
//getters and setters
}The DTO of the class looks like this:
class ProductDTO {
private long id;
private String model;
private int price;
//constructors, getters, and setters
}Write a function that converts a ProductDTO to a Product object. Your company has only one vendor named "SuperVendor" so far. The date of arrival is the 15th of January, 2023.