Question: For this assignment you will create a set of simple classes that model a system that maintains a collection of library assets. The system utilizes

For this assignment you will create a set of simple classes that model a system that maintains a collection of library assets. The system utilizes abstract classes and polymorphism to enable an asset manager to keep track of books and periodicals as a single collection. Books are able to be checked out whereas periodicals cannot.

In addition to the classes described below, you will also need to provide a test driver - a separate class with a main() - to exercise the functionality of your system.

You will need to implement the following classes based on the description of their attributes and operations:

  • Asset - this class must be declared abstract, attributes are all private
    • name - the name of the asset
    • id - the unique id of the asset
    • isAvailable - a flag to indicate whether the asset is currently in the library
    • a constructor that requires the creator to supply the id of the asset and appropriately initializes an object
    • public operations to set and get the asset's name
    • public operation to get the asset's id
    • protected operation to get whether or not the asset is in the library
    • public, abstract operation to check out the asset, returns a boolean
    • public, abstract operation to check in the asset, returns a boolean
  • Book - this class is a subclass of Asset
    • authors - a collection (array) of the names the books authors
    • authorCount - the number of authors currently in the collection
    • a constructor that requires the creator to supply the id of the asset and appropriately initializes an object
    • public operations to add an author to the collection of authors and obtain the collection (array) of authors
    • an implementation of the the check out operation
      • if the asset is in the library, it is made unavailable and the operation returns true
      • if the asset is not in the library the operation returns false
    • an implementation of the the check out operation
      • if the asset is not the library, it is made available and the operation returns true
      • if the asset is already in the library the operation returns false
    • an override of toString() which returns a description of the book of the format
      • "" by <author1>, <author2>, ... :: <id></li> </ul> for example, <ul> <li>"Introduction to Algorithms" by Cormen, Leiserson, Rivest :: 123456 </li> </ul> </li> </ul> </li> <li>Periodical - this class is a subclass of Asset <ul> <li>volume - the volume number of the periodical</li> <li>issue - the issue number of the periodical</li> <li>a constructor that requires the creator to supply the id of the asset and appropriately initializes an object</li> <li>public operations to set and get the volume number</li> <li>public operations to set and get the issue number</li> <li>an implementation of the the check out operation <ul> <li>periodicals can't be checked out so this operation always returns false</li> </ul> </li> <li>an implementation of the the check out operation <ul> <li>since periodicals cannot be checked out this operation always returns true</li> </ul> </li> <li>an override of toString() which returns a description of the book of the format <ul> <li>"<title>", <volume>:<issue> :: <id></li> </ul> for example, <ul> <li>"Nature" 493:2 :: 9876543 </li> </ul> </li> </ul> </li> <li>AssetManager <ul> <li>assets - a collection (array) of assets, no two assets have the same id</li> <li>assetCount - the number of assets currently in the collection</li> <li>a constructor (no parameters) that appropriately initializes the object</li> <li>public operation to add an asset, returns a boolean <ul> <li>if there is no asset in the collection with the same id, the asset is added and true is returned</li> <li>if there is an asset in the collection with the same id, the asset is not added and false is returned</li> </ul> </li> <li>public operation to find an asset by id <ul> <li>if an asset with the id is in the collection it is returned</li> <li>if no asset with the id is in the collection null is returned</li> </ul> </li> </ul> </li> </ul> <p>Your submission will consist of a zip file containing just the necessary .java files. As always your code must meet the coding standards.</p> <p>Previous</p> </div> <div class="question-answer-divider"></div> <section class="answerHolder" itemscope itemtype="http://schema.org/Answer"> <div class="answerHolderHeader"> <h2>Step by Step Solution</h2> <div class="answerReviews"> <div class="starIcon"> </div> </div> </div> <div class="questionProperties"> <p>There are 3 Steps involved in it</p> <div class="cart-flex"> <div class="cart cart1"> 1 Expert Approved Answer </div> </div> </div> <div class="step org_answer"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="step-heading step-1">Step: 1 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> <img src="https://www.solutioninn.com/includes/images/document_product_info/blur-text-image.webp" class="blured-ans-image" width="759" height="271" alt="blur-text-image" decoding="async" fetchpriority="high"> <div class="step1Popup"> <span class="heading">Question Has Been Solved by an Expert!</span> <p>Get step-by-step solutions from verified subject matter experts</p> <button class="view_solution_btn step1PopupButton">View Solution</button> </div> </div> <div class="step"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="accordion step-heading">Step: 2 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> </div> <div class="step"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="accordion step-heading">Step: 3 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> </div> </section> <section class="relatedQuestion"> <h3>Students Have Also Explored These Related Databases Questions!</h3> <div class="relatedQuestionSliderHolder"> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/for-this-programming-assignment-you-will-write-a-recursive-algorithm-12536726" > For this programming assignment you will write a recursive algorithm to display the contents of a directory in a computers file system. You will also get a little experience using the API... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/vehicle-rental-system-an-oop-project-the-vehicle-rental-system-8986932" > Vehicle Rental System: An OOP Project The "Vehicle Rental System" is a hands-on project that tests the understanding of object-oriented programming by simulating a real-world vehicle rental system.... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/need-the-code-for-this-along-with-skeleton-please-help-14993376" > Need the code for this along with skeleton. PLEASE HELP! The necessary code for TicketMaster and TrainTravelGUI is given at the end! Train Travel Design We provide here the complete design that you... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/goals-1-perform-usecase-analysis-techniques-to-discover-and-specify-12460496" > Goals: 1. Perform use-case analysis techniques to discover and specify the conceptual classes. 2. Use design principles to translate conceptual class design into an appropriate set of abstract and... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/a-in-systemverilog-what-is-the-difference-between-i-the-17793309" > (a) In SystemVerilog, what is the difference between: (i) The ternary operator ? and if...then...else statements? [2 marks] (ii) always_ff and always_comb? [2 marks] (iii) Blocking, non-blocking and... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/answer-it-recursively-for-this-programming-assignment-you-will-write-12528962" > Answer it recursively For this programming assignment you will write a recursive algorithm to display the contents of a directory in a computers file system. You will also get a little experience... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/for-this-programming-assignment-you-will-write-a-recursive-algorithm-12567005" > For this programming assignment you will write a recursive algorithm to display the contents of a directory in a computers file system. You will also get a little experience using the API... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/assignment-7-ship-registry-cmsc203-concepts-tested-by-this-program-13655748" > Assignment 7 Ship Registry CMSC203 Concepts tested by this program: Reading from / Writing to a file ArrayList For each loop Inheritance Polymorphism Abstract classes Overriding methods super() Sort... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/program-structure-because-you-will-be-working-on-the-same-7143861" > Program Structure Because you will be working on the same project all semester, it is extremely important to organize it correctly from the beginning. Pay careful attention to the class structure... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/southwest-appliances-inc-wp-b21-inherent-risk-and-materiality-memo-3300321" > Southwest Appliances Inc. WP B.2.1 Inherent Risk and Materiality Memo Initials Date Prepared Reviewed Preliminary Inherent Risk Assessment Management policy of maintaining large inventory to meet... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/based-on-their-home-country-how-might-the-organizational-cultures-58637" > Based on their home country, how might the organizational cultures of the four companies mentioned be distinct from one another, and in what ways could they be the same? </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/write-the-iupac-name-of-the-1-point-following-molecule-121931" > Write the IUPAC name of the 1 point following molecule: *Lowercase letters only and DO NOT put space in between. Included CIS/TRANS isomerism in the name. I Your answer </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/critical-thinking-case-2-juana-and-pablo-evaluate-their-disability-27884126" > Critical Thinking Case 2 Juana and Pablo Evaluate Their Disability Income Needs Juana and Pablo Portllo have been married for 2 years and have a 1 - year - old son. They live in Reston, Virginis,... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/which-project-management-tool-uses-the-analogy-skateboard-bicycle-20218957" > Which project management tool uses the analogy "skateboard - bicycle - motorcycle - car"? Group of answer choices Scrum Waterfall Fate - Gate Star - gate </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/fundamentals-of-human-resource-management/3-behavior-ask-whether-the-trainees-onthejob-behavior-changed-because-2106293" > 3. Behavior. Ask whether the trainees on-the-job behavior changed because of the training program. For example, are employees in the stores complaint department more courteous toward disgruntled... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/fundamentals-of-human-resource-management/1-a-wellthoughtout-orientation-program-is-essential-for-all-new-2106295" > 1. A well-thought-out orientation program is essential for all new employees, whether they have experience or not. </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/fundamentals-of-human-resource-management/2-learning-test-the-trainees-to-determine-whether-they-learned-2106292" > 2. Learning. Test the trainees to determine whether they learned the principles, skills, and facts they were supposed to learn. </a> </div> </div> <nav class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/assume-that-the-riskfree-rate-is-3-and-that-the-8271683">Previous Question</a> <a class="nextQuestionButton" href="/study-help/questions/a-certain-dealer-owns-a-warehouse-that-can-store-a-8271685">Next Question</a> </nav> </section> </main> <aside class="expertRight"> <section class="relatedBook" style="margin-bottom:40px; width: 100%;" > <div class="bookHolder" > <div class="relatedBookHeading" > <h2 class="heading">Recommended Textbook</h2> </div> <div class="bookMainInfo" > <div class="bookImage" style="width: 100px !important; min-width: 100px; flex-shrink: 0; margin-right: 20px;"> <a href="/textbooks/fundamentals-of-database-system-7th-edition-9789332582705"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/64ec5d30a801c_47350.jpg" width="100" height="131" alt="Fundamentals Of Database System" loading="lazy" style="width: 100px !important;"> </a> <a href="/textbooks/computer-science-ubercode-2514" style="margin-top: 8px; display: block; text-align: left;">More Books</a> </div> <div class="bookInfo" style="text-align: left;"> <span class="bookTitle" style="text-align: left;"> <a href="/textbooks/fundamentals-of-database-system-7th-edition-9789332582705" style="text-align: left;"> Fundamentals Of Database System </a> </span> <div class="bookMetaInfo" style="text-align: left;"> <p class="bookAuthor" style="text-align: left;"> <b>Authors:</b> <span>Elmasri Ramez And Navathe Shamkant</span> </p> <p class="bookEdition" style="text-align: left;"> 7th Edition </p> <p class="bookEdition" style="text-align: left;"> 978-9332582705 </p> </div></div></div> </div> </section> <div class="post-question-section"> <div class="description-question-section"> <span class="post-question-section-title">Ask a Question and Get Instant Help!</span> </div> <div class="text-area-post-question"> <form action="/study-help/post-question?ref=search" method="post" enctype="multipart/form-data"> <textarea rows="4" class="form-control form-posting-margin" name="textarea-question-content" id="textarea-question-content" placeholder="Type Your Question ...."></textarea> <button type="submit" class="btn btn-sm btn-submit-post-question text-center">Get Answer</button> </form> </div> </div> </aside> </div> </div> <div class="promo items-center justify-center hidden"> <div class="app_promo"> <span class="app_promo_dismiss"> <i class="fa-solid fa-x"></i> </span> <div class="app-button"> <div class="image-wrapper"> <img width="30" height="30" src="https://www.solutioninn.com/includes/images/rewamp/common/mobile-app-logo.png" decoding="async" fetchpriority="high" alt="SolutionInn App Logo"> <strong>Study Help</strong> </div> <button class="app_promo_action redirection" data-question-open-url='q_id=8271684&q_type=2'> Open in App </button> </div> </div> </div> </div> </div> <div class="blank-portion"></div> <footer> <div class="container footerHolder"> <div class="footerLinksFlex"> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Services</p> <ul> <li><a href="/site-map">Sitemap</a></li> <li><a href="/fun/">Fun</a></li> <li><a href="/study-help/definitions">Definitions</a></li> <li><a href="/tutors/become-a-tutor">Become Tutor</a></li> <li><a href="/books/used-textbooks">Used Textbooks</a></li> <li><a href="/study-help/categories">Study Help Categories</a></li> <li><a href="/study-help/latest-questions">Recent Questions</a></li> <li><a href="/study-help/questions-and-answers">Expert Questions</a></li> <li><a href="/clothing">Campus Wear</a></li> <li><a href="/sell-books">Sell Your Books</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Company Info</p> <ul> <li><a href="/security">Security</a></li> <li><a href="/copyrights">Copyrights</a></li> <li><a href="/privacy">Privacy Policy</a></li> <li><a href="/conditions">Terms & Conditions</a></li> <li><a href="/solutioninn-fee">SolutionInn Fee</a></li> <li><a href="/scholarships">Scholarship</a></li> <li><a href="/online-quiz">Online Quiz</a></li> <li><a href="/study-feedback">Give Feedback, Get Rewards</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Get In Touch</p> <ul> <li><a href="/about-us">About Us</a></li> <li><a href="/support">Contact Us</a></li> <li><a href="/career">Career</a></li> <li><a href="/jobs">Jobs</a></li> <li><a href="/support">FAQ</a></li> <li><a href="https://www.studentbeans.com/en-us/us/beansid-connect/hosted/solutioninn" target="_blank" rel="noopener nofollow">Student Discount</a></li> <li><a href="/campus-ambassador-program">Campus Ambassador</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-12"> <p>Secure Payment</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/common/footer/secure_payment_method.png" class="img-fluid mb-3" width="243" height="28" alt="payment-verified-icon" loading="lazy"> </div> </div> <p>Download Our App</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="1"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/google-play-svg.svg" alt="SolutionInn - Study Help App for Android" width="116" height="40" class="img-fluid mb-3 " loading="lazy"> </div> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="2"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/apple-store-download-icon.svg" alt="SolutionInn - Study Help App for iOS" width="116" height="40" class="img-fluid mb-3" loading="lazy"> </div> </div> </div> </div> </div> <div class="footer-bottom"> <p>© 2026 SolutionInn. All Rights Reserved</p> </div></footer> <script> window.addEventListener("load",function(){jQuery(document).ready(function(t){ // Clarity tracking (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "sjv6tuxsok"); // Helper to read a cookie by name function getCookie(name) { return document.cookie .split('; ') .map(v => v.split('=')) .reduce((acc, [k, val]) => (k === name ? decodeURIComponent(val || '') : acc), ''); } // Read cookies var si = getCookie('si_u_id'); var uid = getCookie('u_id'); var zen = getCookie('zenid'); // Send to Clarity if (si) clarity('set', 'si_u_id', si); if (uid) clarity('set', 'u_id', uid); if (zen) clarity('set', 'zenid', zen); clarity('set', 'ip_address', '216.73.216.28'); t.ajax({type:"POST",url:"/",data:{trackUserActivity:!0,reqUri:document.URL,referer:document.referrer},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(t){t.ajax({type:"POST",url:"/",data:{insertCrawler:!0,reqUri:document.URL,parseTime:"0.056",queryTime:"0.01654768548584",queryCount:"30"},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(){function t(t="",n=!1){var i="itms-apps://itunes.apple.com/app/id6462455425",e="openApp://action?"+t;isAndroid()?(setTimeout(function(){return window.location="market://details?id=com.solutioninn.studyhelp",!1},25),window.location=e):isIOS()?(setTimeout(function(){return window.location=i,!1},25),window.location=e):(i="https://apps.apple.com/in/app/id6462455425",n&&(i="https://play.google.com/store/apps/details?id=com.solutioninn.studyhelp"),window.open("about:blank","_blank").location.href=i)}jQuery("#appModal").modal("show"),jQuery(".download-app-btn").click(function(){t(jQuery(this).attr("data-question-open-url"))}),jQuery(".redirection").click(function(){var n=jQuery(this).attr("data-question-open-url"),i=jQuery(this).attr("data-id");void 0!=n?1==i?t(n,!0):t(n,!1):1==i?t("",!0):t("",!1)}),jQuery(".app-notification-close").click(function(){jQuery(".app-notification-section").css("visibility","hidden");var t=new FormData;t.append("hide_notification",!0),jQuery.ajax({type:"POST",url:"/",data:t,cache:!1,contentType:!1,processData:!1,beforeSend:function(){},success:function(t){location.reload()}})})})},!1); </script> </body> </html>