Answered step by step
Verified Expert Solution
Link Copied!

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 methods/functions 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 2 functions with the following specifications:
1. borrowBook function should mark a book as available/unavailable
2. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

4. Identify the stage of the road of trials in The Wizard of Oz.

Answered: 1 week ago

Question

what is the break even point in units

Answered: 1 week ago