Lesson 34 of 34

Mini Project: Library Management

15 min 50 XP

चला सगळे एकत्र करून एक छोटा project बनवूया. Library मध्ये पुस्तके आहेत; विद्यार्थी ती उसनी घेऊ आणि परत करू शकतात. प्रत्येक command input ची एक ओळ म्हणून येते, अगदी खऱ्या coding-round प्रश्नासारखी.

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

हा project तुमच्या resume मध्ये टाका: तो GitHub वर push करा आणि due dates व fines जोडून वाढवा.

Challenge

+50 XP

Commands वरून library चालवा. पहिली ओळ n, म्हणजे commands ची संख्या. प्रत्येक command यांपैकी एक: ADD id title (title एक शब्द) → काहीच print होत नाही BORROW id → "Borrowed title", किंवा "title is already borrowed", किंवा अनोळखी id साठी "No such book id" RETURN id → "Returned title", किंवा "title was not borrowed" COUNT → "Available: k"

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.