Lesson 34 of 34

Mini Project: Library Management

15 min 50 XP

இதுவரை கற்றதை ஒரு சிறிய project-ல் இணைப்போம். Library-ல் புத்தகங்கள் உள்ளன; மாணவர்கள் புத்தகம் எடுக்கலாம் (borrow), திருப்பித் தரலாம் (return). ஒவ்வொரு command-ம் ஒரு வரியாக வரும்.

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-ல் போட்டு, due date, fine போன்ற அம்சங்களைச் சேர்த்துப் பெரிதாக்குங்கள்.

Challenge

+50 XP

Commands-ஐப் படித்து library-ஐ இயக்குங்கள். முதல் வரி: command எண்ணிக்கை n. ஒவ்வொரு 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.