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.