Question: Java Programming question: Develop an online store which sells dvds and books execpt this time, we will also be selling AudioBooks which are specialized versions

Java Programming question:

Develop an online store which sells dvds and books execpt this time,

we will also be selling AudioBooks which are specialized versions of Books (i.e., extension will come into play here). Use of multiple classes is a must for this Assignment and the perspective will be that of a store owner maintaining a Catalog.

The updated requirements for entities are as follows:

Each CatalogItem has a title of type String.

Each CatalogItem has a price of type double.

Each Book (is a CatalogItem) has an author which is of type String.

Each Book has an ISBN number which is of type int. Every book has a unique ISBN number.

Each AudioBook has all of the properties of a Book, and in addition has a property named

runningTime of type double (conceptually you can think of this as minutes, but it doesn't matter

for the purposes of the assignment).

Each DVD (is a CatalogItem) has director which is of type String.

Each DVD has a year which is of type int.

Each DVD has an dvdcode which is of type int and is unique for all DVDs.

Each of the properties is mandatory (cannot be a default) and private, and only retrieved via public getter methods (for example: getPrice which would return the price of a Book or DVD), and the properties can only be set via constructor functions.

Additionally, AudioBooks are special - when the price is retrieved via the method getPrice, the method in

the parent (Book) class is overridden, and instead the price is retrieved as the regular price of the book with a 10% discount (i.e., 90% of the price).

Each of the classes must define a toString method which *returns* information about the entity as follows:

For Books it would be:

Title: | Author: <author> | Price: <price> | ISBN: <isbn></p> <p>For AudioBooks it would be the same for books, except the price would be the discounted price and we</p> <p>would append: | RunningTime: <runningtime>.</p> <p>For DVDs it would be:</p> <p>Title: <title> | Director: <director> | Price: <price> | Year: <year> | DvdCode: <dvdcode></p> <p>We do not have a limit on the number of Books/AudioBooks/DVDs that our store can hold, and thus, ArrayLists would be useful here. You should have two ArrayLists: one for Books and one for DVDs and the ArrayLists should be typed accordingly (i.e., the code should not be declared unsafe upon compilation). You are *not allowed* to have a separate ArrayList for AudioBooks.</p> <p>The distinction between Books and AudioBooks should be easy enough using the instanceof operator. Also there is no such thing as a standalone CatalogItem [Hint: this isn't a concrete class]. Meaning it's Abstract!</p> <p>The menu option displayed would now look like:</p> <p> </p> <p>**Welcome to the Comets Books and DVDs Store (Catalog Section)**</p> <p>Choose from the following options:</p> <p>1 - Add Book</p> <p>2 - Add AudioBook</p> <p>3 - Add DVD</p> <p>4 - Remove Book</p> <p>5 - Remove DVD</p> <p>6 - Display Catalog</p> <p>9 - Exit store</p> <p> </p> <p>Then, within a loop, if the user enters an option that is not 1, 2, 3, 4, 5, 6, or 9, display the message "This option is not acceptable" and loop back to redisplay the menu. Continue in this manner until a correct option is input.</p> <p>You may implement the methods however you want as long as you satisfy the class relationships, and satisfy the following behavior:</p> <p> </p> <p><strong>If options 1, 2 or 3</strong> are entered, follow-up by asking the User to enter the required details. Invalid values are not allowed: for example, a book must have a non-empty title and author, and a positive running time and price. An AudioBook must also have a positive running time. Similar restrictions apply on DVDs. If the User enters something invalid, prompt them to enter it again. If the User tries to add a Book or DVD that already exists (i.e., we already have a Book with that ISBN number or a DVD with that dvdcode) then let the User know that this is the case and return to the main menu. [Hint: Therefore, when options 1, 2 or 3 are entered, the first thing to ask the User for would be the ISBN number or the DVD code respectively].</p> <p> </p> <p><strong>If option 4</strong> is selected, ask the User to enter the ISBN number to remove: if it exists in the Catalog,t hen remove it; and if it doesn't then let the User know by saying "The Book doesn't exist in the Catalog" (and then return to the main menu). Similar behavior applies to <strong>option 5</strong>, except this time with DVDs. After successful removal, display the Catalog (i.e., the behavior of option 6, and redisplay the main menu).</p> <p> </p> <p>If <strong>option 6</strong> is selected then display the entire Catalog to the User by displaying all the Book</p> <p>information followed by all the DVD information, with the following line to separate the two.</p> <p>The information for each Book or DVD must be displayed using the respective toString methods.</p> <p>Continue the looping until <strong>option 9</strong> is selected, and when option 9 is entered, end the program.</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/continue-developing-the-online-store-from-assignment-2-which-sells-13526704" > Continue developing the online store from Assignment 2 which sells DVDs and Books, except this time, we will also be selling AudioBooks which are specialized versions of Books (i.e., extension will... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/continue-developing-the-online-store-from-assignment-2-which-sells-13632645" > Continue developing the online store from Assignment 2 which sells DVDs and Books, except this time, we will also be selling AudioBooks which are specialized versions of Books (i.e., extension will... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/imagine-being-an-advisor-to-hank-harris-what-would-you-14460321" > Imagine being an advisor to Hank Harris. What would you suggest should be Seller Labs' competitive strategy going forward? (Please use the case study below to answer the question in two-three... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/hello-i-am-needing-help-on-this-assignment-please-asap-3807035" > Hello, I am needing help on this assignment please ASAP so I can study it as I have a test on Thursday over this and many other things. let me know if there are any questions. Thank you. UNITED... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/case-11-equal-exchange-doing-well-by-doing-good1-rev-10682035" > Case 11 Equal Exchange: Doing Well by Doing Good1 Rev. Dr. Benita W. Harris Asbury United Methodist Church Frank Shipper, PhD Perdue School of Business, Salisbury University Karen P. Manz Author and... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/could-the-clubcard-concept-be-expanded-to-better-use-the-19114384" > Could the Clubcard concept be expanded to better use the rich mine of information Tesco has about where, when and what customers buy? Keeping ethical concerns in mind, how could the Clubcard program... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/benchmarking-an-international-journal-impact-of-eprocurement-on-procurement-practices-10662538" > Benchmarking: An International Journal Impact of e-procurement on procurement practices and performance Gioconda Quesada Marvin E. Gonzlez James Mueller Rene Mueller Downloaded by UNIVERSITY OF... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/supply-chain-management-introduction-outline-what-is-supply-chain-management-17507329" > Supply Chain Management Introduction Outline What is supply chain management? Significance of supply chain management. Push vs. Pull processes utdallas.edu/~metin 1 A Generic Supply Chain Sources:... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/using-harts-text-as-a-guide-provide-one-example-of-1231933" > Using Hart's text as a guide, provide one example of a digital "tool" that is frequently used in Global retail Introduction The purpose ofthis paper is to discuss critically arguments about how... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/in-this-write-up-the-following-should-be-covered-what-19866665" > In this write up, the following should be covered: What is the primary issue facing the firm? What are the secondary issues facing the firm? What is the most appropriate action for the firm? What... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/give-examples-of-transactions-that-a-increase-an-asset-and-a" > Give examples of transactions that: a. Increase an asset and a liability b. Increase an asset and shareholders equity c. Increase an asset and decrease a different asset d. Decrease an asset and a... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/a-beaker-contains-water-up-to-a-height-h-and-464646" > A beaker contains water up to a height h, and K.oil above water up to another height h. Find the apparent shift in the position of the bottom of the beaker when viewed from above. Refractive index of... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/an-endowment-is-created-when-the-principal-donated-to-a-27901724" > An endowment is created when the principal donated to a private-purpose trust is ______. Multiple choice question. expendable either expendable or nonexpendable nonexpendable </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/connor-contributed-450000-cash-to-qualified-public-charities-in-2021-15408283" > Connor contributed $450,000 cash to qualified public charities in 2021. His AGI was $400,000. Which of the following statement is true? a. Connors charitable contribution deduction is limited to... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/15-on-very-controversial-issues-it-often-is-best-to-2124804" > 15. On very controversial issues, it often is best to delay or avoid your involvement as long as possible. </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/12-it-is-advisable-to-always-tell-people-everything-you-2124801" > 12. It is advisable to always tell people everything you know about a situation. </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/14-reaching-organizational-goals-requires-that-organizational-politics-and-power-2124803" > 14. Reaching organizational goals requires that organizational politics and power be avoided whenever possible. </a> </div> </div> <nav class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/import-javautilscanner-public-class-errors-public-static-void-main-13087138">Previous Question</a> <a class="nextQuestionButton" href="/study-help/questions/please-help-with-this-lab-in-c-78-ch7-lab-13087140">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/accounting-and-auditing-research-and-databases-practitioner-s-desk-reference-1st-edition-9781118334423"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/6304a79d41a80_12170.jpg" width="100" height="131" alt="Accounting And Auditing Research And Databases Practitioner's Desk Reference" loading="lazy" style="width: 100px !important;"> </a> <a href="/textbooks/computer-science-if-else-statements-2712" 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/accounting-and-auditing-research-and-databases-practitioner-s-desk-reference-1st-edition-9781118334423" style="text-align: left;"> Accounting And Auditing Research And Databases Practitioner's Desk Reference </a> </span> <div class="bookMetaInfo" style="text-align: left;"> <p class="bookAuthor" style="text-align: left;"> <b>Authors:</b> <span>Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson</span> </p> <p class="bookEdition" style="text-align: left;"> 1st Edition </p> <p class="bookEdition" style="text-align: left;"> 1118334426, 978-1118334423 </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=13087139&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.134'); 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>