nohkwangsun / bookstore Goto Github PK
View Code? Open in Web Editor NEW서점 예제
서점 예제
구매 처리, 멤버와 연동하기
. 구매처리 수정. (불필요)
. 구매이력조회 수정. (조회 기능 추가)
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | 12. Print a user's purchases | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:6
Purchase{title='홍길동', customer='김종국', numberOfPurchase=16}
Purchase{title='홍길동', customer='유재석', numberOfPurchase=11}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | 12. Print a user's purchases | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:12
Type user name:유재석
Purchase{title='홍길동', customer='유재석', numberOfPurchase=11}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | 12. Print a user's purchases | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:q
너무 많은 메뉴 화면에 노출.
사용자 관리, 도서 검색, 구매 내역 등 구분하여 노출 후
명령어로 들어가서 그 후에 또 검색 할 수 있도록 메뉴 구성 필요
멤버 탈퇴
(데이터는 보존)
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='유재석', email='[email protected]', address='10 sbs road', active='true'}
Member{userName='김종국', email='[email protected]', address='11 sbs road', active='true'}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:10
Type user name:김종국
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='유재석', email='[email protected]', address='10 sbs road', active='true'}
Press enter for the menu...
테스트를 위해 웹으로 배포
객체 생성시마다 BookStoreFactory에 의존관계 정의 필요함.
annotation을 통해 자동으로 의존관계 맺을 수있도록 수정 필요
파일에 데이터 저장
. 재고
. 멤버
. 구매
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='김종국', email='[email protected]', address='11 sbs road', active='true'}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:9
Type user name:유재석
Type email:[email protected]
Type address:15 sbs road
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='김종국', email='[email protected]', address='11 sbs road', active='true'}
Member{userName='유재석', email='[email protected]', address='15 sbs road', active='true'}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:q
Process finished with exit code 0
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | 10. Withdraw a member | =
= | | =
= | 11. Modify a member | =
= | | =
= | s. Save | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='김종국', email='[email protected]', address='11 sbs road', active='true'}
Member{userName='유재석', email='[email protected]', address='15 sbs road', active='true'}
Press enter for the menu...
안정적인 데이터 저장을 위해 DB 도입
메모리 데이터로는 Transaction 처리 불가
별도의 저장 기능 불필요
git branch 가이드
$ git branch # git branch 목록 조회
$ git branch feature-003-addstock # git branch 생성
$ git checkout feature-003-addstock # git branch 이동
$ git add . # commit 대상 소스 선택
$ git commit -m “update” # 소스 commit
$ git push --set-upstream origin feature-003-addstock # 최초 push 시 set-upstream 옵션 필요
$ git checkout main # main branch로 이동
$ git merge feature-003-addstock # 로컬에서 git merge, github PR 로 merge 한 경우 생략
$ git pull # github PR로 merge한 경우, 로컬에 반영
화면에 출력시 열맞춤 필요
멤버 수정
도서 정보 파일에서 조회
구매 이력 파일에서 조회
List<Book> bookList = Files.lines(Path.of("booklist.csv"))
.map(line -> {
List<String> book = Arrays.stream(line.split(",")).map(String::trim).toList();
return new Book(book.get(0), book.get(1), book.get(2), Integer.parseInt(book.get(3)), book.get(4), book.get(5));
}).collect(Collectors.toList());
order 제공했음에도 정렬안됨
여러 권을 장바구니에 담아, 최종적으로 전체 목록 확인 후 구매 처리
CLI 웰컴 메시지
종료 처리
알수 없는 명령 처리
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 0. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:3
Error: Unknown command : 3
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 0. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:q
Process finished with exit code 0
회원 등급 관리하여 등급에 맞게 할인 또는 추가 포인트 제공
pid 체크하여 안정적으로 실행/중단 가능하도록 수정
리팩토링 (패키지 및 중복 코드 제거)
도서 추가
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:3
Type title:자바의정석
Type writer:남궁성
Type publisher:도우출판
Type price:30000
Type releaseDate:2017년
Type location:3층
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 자바의정석 | 남궁성 | 30000 | 3층 |
-----------------------------------------------------------
Press enter for the menu...
서버에 오래된 기존 class 파일이 남아 있는 경우가 생김.
재고 추가
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION | STOCK |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 11000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동3 | 작자미상 | 13000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동4 | 작자미상 | 15000 | 2층 10번 | 1 |
-----------------------------------------------------------
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:7
Type title:홍길동
Type stock:3
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION | STOCK |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 | 4 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 11000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동3 | 작자미상 | 13000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동4 | 작자미상 | 15000 | 2층 10번 | 1 |
-----------------------------------------------------------
Press enter for the menu...
github main repo push 되는 경우 자동 배포 처리
모든 트랜잭션에 대해 이력 데이터 저장
타이틀 검색
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 0. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:2
Search Keyword:길동2
-----------------------------------------------------------
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
Press enter for the menu...
데이터 읽기 초기화 작업을 main으로 옮기면서 문제 발생.
bookservice 객체를 생성해서 파일 데이터 초기화하는 곳은 main 이었으나,
실제 사용하는 bookservice는 다른 곳 (clicommand) 에서 객체 생성해서 사용하고 있었음.
bookservice 인스턴스를 싱글톤 (단일 객체) 으로 만들어서 어디서 불러오든 동일하게 처리.
리팩토링. 명령어 분리
command 담긴 패키지 변경하면, COMMAND_PACKAGE 상수를 항상 맞춰야 함.
BASE_PACKAGE로 처리하여 하위 디렉토리를 모두 찾도록 수정
도서 구매
재고 갱신
구매 이력 조회
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION | STOCK |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 11000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동3 | 작자미상 | 13000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동4 | 작자미상 | 15000 | 2층 10번 | 1 |
-----------------------------------------------------------
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:5
Type title:홍길동
Type customer:정국
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION | STOCK |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 | 0 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 11000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동3 | 작자미상 | 13000 | 2층 10번 | 1 |
-----------------------------------------------------------
| 홍길동4 | 작자미상 | 15000 | 2층 10번 | 1 |
-----------------------------------------------------------
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:6
Purchase{title='홍길동', customer='정국', numberOfPurchase=1}
Press enter for the menu...
회원 등록
/Users/pieuler/Library/Java/JavaVirtualMachines/temurin-18.0.1/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=65298:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/pieuler/workspaces/hw-project/nohkwangsun/bookstore/bookstore/out/production/bookstore com.onlinejava.project.bookstore.Main
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='유재석', email='[email protected]', address='10 sbs road'}
Member{userName='김종국', email='[email protected]', address='11 sbs road'}
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:9
Type user name:조세호
Type email:[email protected]
Type address:13 running road
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | 9. Add new member | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='유재석', email='[email protected]', address='10 sbs road'}
Member{userName='김종국', email='[email protected]', address='11 sbs road'}
Member{userName='조세호', email='[email protected]', address='13 running road'}
Press enter for the menu...
책 목록 조회
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 0. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION |
-----------------------------------------------------------
| 홍길동 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
Press enter for the menu...
프로젝트를 3개로 분리
서버-클라이언트 프로그램
배포
도서 삭제
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:4
Type title:홍길동
Press enter for the menu...
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:1
-----------------------------------------------------------
| TITLE | WRITER | PRICE | LOCATION |
-----------------------------------------------------------
| 홍길동1 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
| 홍길동2 | 작자미상 | 10000 | 2층 10번 |
-----------------------------------------------------------
Press enter for the menu...
회원 목록 조회
/Users/pieuler/Library/Java/JavaVirtualMachines/temurin-18.0.1/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=63068:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/pieuler/workspaces/hw-project/nohkwangsun/bookstore/bookstore/out/production/bookstore com.onlinejava.project.bookstore.Main
======================================================================
= =
= =
= Welcome to Bookstore =
= =
= ------------------------------------ =
= | | =
= | 1. Print book list | =
= | | =
= | 2. Book Search | =
= | | =
= | 3. Add new book | =
= | | =
= | 4. Delete a book | =
= | | =
= | 5. buy a book | =
= | | =
= | 6. Print purchase list | =
= | | =
= | 7. Add book stock | =
= | | =
= | 8. Print member list | =
= | | =
= | q. Quit | =
= | | =
= ------------------------------------ =
= =
======================================================================
Type the number of the command you want to run:8
Member{userName='유재석', email='[email protected]', address='10 sbs road'}
Member{userName='김종국', email='[email protected]', address='11 sbs road'}
Press enter for the menu...
github 프로젝트 세팅
구매시 기본 포인트 0.5% 제공
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.