상황고객이 특정 상점을 여러 차례 신고하여 차단된 상태에서상점이 물건을 등록하지 못하도록 하는 상황을 가정상품 등록 기능을 구현한 응용 서비스는 상점 계정이 차단 상태가 아닐 때만 상품을 생성할 수 있다.기존 응용 서비스 코드 예시public class RegisterProductService { public ProductId registerNewProduct(NewProductRequest req) { Store store = storeRepository.findById(req.getStoreId()); checkNull(store); if (store.isBlocked()) { throw new StoreBlockedException(); } ProductId id = productRepository..
package org.example.알고리즘.혼자놀기의달인; class Solution { public static void main(String[] args) { int[] cards = {8, 6, 3, 7, 2, 5, 1, 4}; Solution solution = new Solution(); System.out.println(solution.solution(cards)); } public int solution(int[] cards) { int maxScore = 0; for (int start = 1; start
package org.example.알고리즘.합승택시요금; import java.util.Arrays; class Solution { public static void main(String[] args) { Solution solution = new Solution(); System.out.println(solution.solution(6, 4, 6, 2, new int[][]{{4, 1, 10}, {3, 5, 24}, {5, 6, 2}, {3, 1, 41}, {5, 1, 24}, {4, 6, 50}, {2, 4, 66}, {2, 3, 22}, {1, 6, 25}})); System.out.println("================================"); System.out.println(..
package org.example.알고리즘.전략망을둘로나누기; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; class Solution { public static void main(String[] args) { Solution solution = new Solution(); System.out.println(solution.solution(9, new int[][]{{1, 3}, {2, 3}, {3, 4}, {4, 5}, {4, 6}, {4, 7}, {7, 8}, {7, 9}})); System.out.println("================================"); System.out.prin..
도메인 모델의 정의개념적 표현도메인의 주요 구성 요소, 기능 , 관계 등을 포괄적으로 이해하기 위한 모델주문 도메인 모델 예시객체 모델 구성 요소객체를 모델링하는 부분에서 유리함상태 다이어그램 이용한 주문 상태 모델링관계가 중요한 도메인인 경우 그래프로 도메인을 모델링이 가능하다.계산 규칙이 중요하다면 수학 공식을 활용해서 도메인 모델을 만들 수 있음.표현방식은 도메인을 이해할 수만 있으면 어떤 것이든 상관없다. Uploaded by N2T