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.