Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
