public void registerBookFunction(int mode) { switch (mode) { case 0: // 책 번호 bookNo = enterBookNoFunction(); this.registerBookFunction(1); break; case 1: // 책 이름 bookName = this.enterBookNameFunction(); this.registerBookFunction(2); break; case 2: // 책 저자 bookAuthor = this.enterBookAuthorFunction(); this.registerBookFunction(3); break; case 3: // 책 수량 bookQuantity = this.enterBookQuantityFunction(); this.registerBookFunction(4); break; case 4: // 책 가격 bookPrice = this.enterBookPriceFunction(); break; } sd.bookInfoInsert(bookNo, bookName, bookAuthor, bookPrice, bookQuantity); sd.insertBookRentNo(bookNo); print.bookRegisterSuccessMessage(); run.bookMenu(); }