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.