Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use Kotlin Playground or IDE or you choice to write code. Please populate with sample data to ensure that methods / functions work as
Please use Kotlin Playground or IDE or you choice to write code. Please populate with sample data to ensure that methodsfunctions work as expected. Once completed, please share your code with you instructor.
OOP
Design a set of Kotlin classes to represent a library system. One model should represent a Book whereas the other should be a Library class. See below for additional requirements:
Methods:
addBook method that consume a Book and adds it List. The list should be editable
removeBook method should have ability to remove a book by title
displayAvailableBooks method should be able to printout all books and author in collection
Functional
Write functions with the following specifications:
borrowBook function should mark a book as availableunavailable
getAvailableBooksCountByAuthor function should return the number of books written bay a particular author.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started