Product 객체를 만들어 이 문제를 해결해봤다. 먼저 Product class class Product { int code; int date; int maximum; int remain; public Product(int code, int date, int maximum, int remain) { this.code = code; this.date = date; this.maximum = maximum; this.remain = remain; } // Getter 메서드들... } Product 객체를 생성한 후에 조건에 맞는 product만을 선별을 해야한다. 그리고 sort_by에 맞는 정렬 기준을 생성해준다. for(int i = 0; i < data.length; i++) { Product pr..
프로그래머스 - 데이터 분석
Product 객체를 만들어 이 문제를 해결해봤다. 먼저 Product class class Product { int code; int date; int maximum; int remain; public Product(int code, int date, int maximum, int remain) { this.code = code; this.date = date; this.maximum = maximum; this.remain = remain; } // Getter 메서드들... } Product 객체를 생성한 후에 조건에 맞는 product만을 선별을 해야한다. 그리고 sort_by에 맞는 정렬 기준을 생성해준다. for(int i = 0; i < data.length; i++) { Product pr..
2024.04.01