DTO implementation with POJO

Report a typo

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;

    //constructors, getters, and setters
}

Your client doesn't need the information about the product's date of arrival and its vendor. Implement the ProductDTO class considering this fact. Do it with the help of a POJO class. Your DTO implementation must have a constructor with all fields as arguments. It must also have getters and setters for the fields.

Note that your class can't be public in this task due to the testing platform specifics. The methods should have a public modifier, however.

Sample Input 1:

No input.

Sample Output 1:

Good job!
Write a program in Java 17
class ProductDTO {
//your code
}
___

Create a free account to access the full topic