Develop an online store which sells dvds and books execpt


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 style="text-align: justify;">For AudioBooks it would be the same for books, except the price would be the discounted price and we</p> <p style="text-align: justify;">would append: | RunningTime: <runningtime>.</p> <p style="text-align: justify;">For DVDs it would be:</p> <p style="text-align: justify;">Title: <title> | Director: <director> | Price: <price> | Year: <year> | DvdCode: <dvdcode></p> <p style="text-align: justify;">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 style="text-align: justify;">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 style="text-align: justify;">The menu option displayed would now look like:</p> <p style="text-align: justify;">**Welcome to the Comets Books and DVDs Store (Catalog Section)**</p> <p style="text-align: justify;">Choose from the following options:</p> <p style="text-align: justify;">1 - Add Book</p> <p style="text-align: justify;">2 - Add AudioBook</p> <p style="text-align: justify;">3 - Add DVD</p> <p style="text-align: justify;">4 - Remove Book</p> <p style="text-align: justify;">5 - Remove DVD</p> <p style="text-align: justify;">6 - Display Catalog</p> <p style="text-align: justify;">9 - Exit store</p> <p style="text-align: justify;">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 style="text-align: justify;">You may implement the methods however you want as long as you satisfy the class relationships, and satisfy the following behavior:</p> <p style="text-align: justify;"><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 style="text-align: justify;"><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 style="text-align: justify;">If <strong>option 6</strong> is selected then display the entire Catalog to the User by displaying all the Book</p> <p style="text-align: justify;">information followed by all the DVD information, with the following line to separate the two.</p> <p style="text-align: justify;">The information for each Book or DVD must be displayed using the respective toString methods.</p> <p style="text-align: justify;">Continue the looping until <strong>option 9</strong> is selected, and when option 9 is entered, end the program.</p></p> </div> <div id="viewreadmore" class="link"> <a id="readmore" href="javascript:void(0);" class="read-more-trigger mar_top10" onclick="changeheight(this)">View Complete Question</a> </div> <div id="DivSolution"> <h4> Solution Preview : </h4> <div class="seprator"> </div> <p> </p> <div class="downloadfiles"> <h5> Prepared by a verified Expert</h5> <h6> Basic Computer Science: Develop an online store which sells dvds and books execpt</h6> <h5> Reference No:- TGS02491322</h5> <input type="submit" name="getPaid" value="Purchase Solution File" id="getPaid" class="btn btn-success btn-lg btn-block-sm mar_btm20" /> <p> Now Priced at $10 (50% Discount)</p> </div> <div style="text-align: justify"></div> </div> </div> <div class="row"> <div class="col-sm-12 reviewbox"> <div id="PlnRated"> <div class="row recomded"> <div class="recomdedbox col-sm-2 col-xs-12"> <p class="inner"><i class="fa fa-thumbs-o-up"></i> Recommended <b>(90%)</b></p> </div> <div class="recomdedbox col-sm-2 col-xs-12"> <p class="inner rating"><i class="fa fa-star"></i> Rated <b>(4.3/5)</b></p> </div> </div> </div> <div class="row "> <div class="panel-group review" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel-heading" role="tab" id="headingTwo"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Have a Question? (oR Write a Review) </a> </h4> </div> <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> <div class="panel-body"> <div class="col-sm-12"> <div class="row search searchbg message"> <span id="RequiredFieldValidator1" style="visibility:hidden;">Write atleast 100 words!!</span> <textarea name="txtcomments" id="txtcomments" maxlength="1000" ValidationGroup="Review" placeholder="Write your review" class="form-control" rows="6"></textarea> <div class="pull-right mar_top20"> <input type="submit" name="btnReviewSubmit" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnReviewSubmit", "", true, "Review", "", false, false))" id="btnReviewSubmit" class="btn btn-primary pull-right" /> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="user-comments-area hidden-xs"> <h4 class="text-uppercase mar_btm20"> <i class="fa fa-question-circle"></i>   Recent Questions Asked Basic Computer Science</h4> <ul class="user-comments-list"> <table id="dlMaterials" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_0" class="studenthdname" href="https://www.tutorsglobe.com/question/analyze-methods-used-to-improve-the-behavior-and-attitudes-52491318.aspx">Analyze methods used to improve the behavior and attitudes</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_0">assignment employee performancelength 6-8 slides with speaker notes of 200-250 words per slides excluding title and</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_1" class="studenthdname" href="https://www.tutorsglobe.com/question/in-the-windows-server-backup-console-which-of-the-following-52491319.aspx">In the windows server backup console which of the following</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_1">in the windows server backup console which of the following did you use to schedule a backup of the erpdocuments</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_2" class="studenthdname" href="https://www.tutorsglobe.com/question/assuming-that-the-success-rate-of-each-raider-at-each-trial-52491320.aspx">Assuming that the success rate of each raider at each trial</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_2">question a corporate raider has been successful in 11 of 31 takeover attempts another corporate raider has been</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_3" class="studenthdname" href="https://www.tutorsglobe.com/question/how-does-the-communications-feedback-that-tv-shows-writers-52491321.aspx">How does the communications feedback that tv shows writers</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_3">case one the viewers voice influences tv programmingamerican tv producers broadcasted entertainment programs supported</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_4" class="studenthdname" href="https://www.tutorsglobe.com/question/develop-an-online-store-which-sells-dvds-and-books-execpt-52491322.aspx">Develop an online store which sells dvds and books execpt</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_4">java programming questiondevelop an online store which sells dvds and books execpt this timewe will also be selling</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_5" class="studenthdname" href="https://www.tutorsglobe.com/question/these-entities-play-a-significant-role-in-a-nation-and-it-52491323.aspx">These entities play a significant role in a nation and it</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_5">response to the following discussions from classmates x5 with approximately 150 words or more each include a reference</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_6" class="studenthdname" href="https://www.tutorsglobe.com/question/using-the-proper-programming-techniques-shown-in-class-52491324.aspx">Using the proper programming techniques shown in class</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_6">using the proper programming techniques shown in class which of the following methods are available on every object</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_7" class="studenthdname" href="https://www.tutorsglobe.com/question/describe-pertinent-information-related-to-the-wider-scope-52491325.aspx">Describe pertinent information related to the wider scope</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_7">describe pertinent information related to the wider scope of the ethical issue what elements in the companys culture</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <span class="mar_lft5">Q :</span> <a id="dlMaterials_hypermaterial_8" class="studenthdname" href="https://www.tutorsglobe.com/question/conduct-a-one-tailed-test-aimed-at-proving-that-the-52491326.aspx">Conduct a one-tailed test aimed at proving that the</a></h5> <p class="answer"> <span id="dlMaterials_lblQuestion_8">question a physicians group is interested in testing to determine whether more people in small towns choose a physician</span></p> </div> <!-- /comment-box --> </li> </td> </tr> </table> </ul> <!-- /user-comments-list --> </div> </div> <div class="col-md-4 col-xs-12 login-area innerpage"> <div class="row"> <div class="details col-md-12"> <div class="col-md-4"> <div class="circle orange"> <i class="fa fa-question"></i> </div> <p> 1937579 </p> <p> Questions<br /> Asked</p> </div> <div class="col-md-4"> <div class="circle yellow"> <i class="fa fa-user-secret"></i> </div> <p> 3,689</p> <p> Active Tutors</p> </div> <div class="col-md-4"> <div class="circle green"> <i class="fa fa-thumbs-o-up"></i> </div> <p> 1455195</p> <p> Questions<br /> Answered</p> </div> <p><b> Start Excelling in your courses, Ask a tutor for help and get answers for your problems !! </b></p> <a href="https://www.tutorsglobe.com/post-your-job-for-free.aspx" class="btn btn-primary btn-lg mar_top10">ask Question</a> </div> </div> <div class="row"> <div class="user-comments-area hidden-xs"> <hr /> <h4 class="text-uppercase mar_btm20"> <i class="fa fa-question-circle"></i> Asked Questions</h4> <hr /> <ul class="user-comments-list"> <table id="dlNewReviews" cellspacing="0" style="width:100%;border-collapse:collapse;"> <tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_0" class="studenthdname" href="https://www.tutorsglobe.com/question/care-for-infant-after-right-femoral-cardiac-catheterization-53439399.aspx">Care for infant after right femoral cardiac catheterization</a></h5> <p> <span id="dlNewReviews_lblReviews_0">Question: Which finding would concern the nurse who's caring for an infant after a right femoral cardiac catheterization? </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_1" class="studenthdname" href="https://www.tutorsglobe.com/question/identifying-the-gaps-and-burden-in-nursing-practice-53439400.aspx">Identifying the gaps and burden in nursing practice</a></h5> <p> <span id="dlNewReviews_lblReviews_1">Describe a quality or safety issue, identifying the gaps and burden in nursing practice in prevention and management of sepsis</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_2" class="studenthdname" href="https://www.tutorsglobe.com/question/what-intervention-is-most-appropriate-for-nurse-to-perform-53439401.aspx">What intervention is most appropriate for nurse to perform</a></h5> <p> <span id="dlNewReviews_lblReviews_2">What intervention is most appropriate for the nurse to perform? Remove the security device because it's a choking hazard. </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_3" class="studenthdname" href="https://www.tutorsglobe.com/question/client-with-a-mental-health-condition-is-prescribed-53439402.aspx">Client with a mental health condition is prescribed</a></h5> <p> <span id="dlNewReviews_lblReviews_3">The nurse notes that a client with a mental health condition is prescribed a medication with a high therapeutic index.</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_4" class="studenthdname" href="https://www.tutorsglobe.com/question/client-prescribed-phenelzine-for-treatment-of-depression-53439403.aspx">Client prescribed phenelzine for treatment of depression</a></h5> <p> <span id="dlNewReviews_lblReviews_4">Question: The nurse provides care to a client who is prescribed phenelzine for the treatment of depression. </span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_5" class="studenthdname" href="https://www.tutorsglobe.com/question/communication-issues-with-non-english-speaking-patients-53439404.aspx">Communication issues with non-english-speaking patients</a></h5> <p> <span id="dlNewReviews_lblReviews_5">Discuss communication issues associated with non-English-speaking patients and instructions on specific routes for the administration of medication</span></p> </div> <!-- /comment-box --> </li> </td> </tr><tr> <td> <li> <div class="comment-box"> <h5> <a id="dlNewReviews_hyperQues_6" class="studenthdname" href="https://www.tutorsglobe.com/question/how-to-improve-outcome-and-stability-for-the-family-53439405.aspx">How to improve outcome and stability for the family</a></h5> <p> <span id="dlNewReviews_lblReviews_6">What is the primary place for you to focus your attention to improve outcome and stability for the family you are working with?</span></p> </div> <!-- /comment-box --> </li> </td> </tr> </table> </ul> </div> </div> </div> </div> </div> </div> </div> <script> var url = 'https://www.tutorsglobe.com/include/javascript/watiWidget.js'; var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url; var options = { "enabled":true, "chatButtonSetting":{ "backgroundColor":"#00e785", "ctaText":"Whatsapp Support!!", "borderRadius":"25", "marginLeft": "0", "marginRight": "20", "marginBottom": "20", "ctaIconWATI":false, "position":"left" }, "brandSetting":{ "brandName":"Tutorsglobe", "brandSubTitle":"Trusted Since 2005", "brandImg":"https://www.tutorsglobe.com/include/images/chat-logo.svg", "welcomeText":"Hi there!\nDo you Need help?", "messageText":"Hello, Tutorsglobe !! I have a question!", "backgroundColor":"#00e785", "ctaText":"Chat with Whatsapp", "borderRadius":"25", "autoShow":false, "phoneNumber":"441416286080" } }; s.onload = function() { CreateWhatsappChatWidget(options); }; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); </script> <footer class="site-footer"> <div class="container"> <div class="footerlinks"> <a href="https://www.tutorsglobe.com/">Home</a> | <a href="https://www.tutorsglobe.com/about-us.aspx">Company Overview</a> | <a href="https://www.tutorsglobe.com/services.aspx">Services</a> | <a href="https://www.tutorsglobe.com/library/">Discover Q&A</a> | <a href="https://www.tutorsglobe.com/sitemap.aspx">Sitemap</a> | <a href="https://www.tutorsglobe.com/contact-us.aspx">Contact Us</a> | <a href="https://www.tutorsglobe.com/terms-and-conditions.aspx">T & C</a> | <a href="https://www.tutorsglobe.com/refundcancelpolicy.aspx">Refund Policy</a> | <a href="https://www.tutorsglobe.com/copyright-infringement-policy.aspx">Copyright Policy</a> | <a href="https://www.tutorsglobe.com/blog/archive/">Blog</a> | <a href="https://www.tutorsglobe.com/library/archive.aspx">Q&A</a> | <a href="https://www.tutorsglobe.com/education-directory.aspx">Directory</a> </div> <p>©TutorsGlobe</a> All rights reserved 2022-2023. </p> <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "product", "name": "Tutorsglobe", "image": "https://www.tutorsglobe.com/IncludeLib/Images/logo.png", "description": "elearning Platform - Tutor Service", "brand": { "@type": "elearning", "name": "Tutorsglobe" }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.9", "ratingCount": "37128" } } </script> <a href="#" class="settings"><i class="fa fa-angle-up"></i></a> <ul class="social-icons"> <li><a href="https://www.facebook.com/TutorsGlobe" rel="nofollow" target="_blank"><i class="fa fa-facebook-square"></i></a></li> <li><a href="https://twitter.com/Tutorsglobe" rel="nofollow" target="_blank"><i class="fa fa-twitter-square"></i></a></li> <li><a href="#" rel="nofollow"><i class="fa fa-youtube-square"></i></a></li> <li><a href="https://www.linkedin.com/company/tutorsglobe" target="_blank" rel="nofollow"><i class="fa fa-linkedin-square"></i></a></li> </ul> </div> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-32333066-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.tutorsglobe.com/IncludeLib/js/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-5E9QFMFDJR"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-5E9QFMFDJR'); </script> </footer> </div> <!-- /pageWrap --> <div class="overlay"> </div> <!-- JavaScript Files ================================================== --> <script type="text/javascript" src="../IncludeLib/js/jquery-1.11.2.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/bootstrap.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/jquery.mCustomScrollbar.concat.min.js"></script> <script type="text/javascript" src="../IncludeLib/js/script.js"></script> <script type="text/javascript" src="../IncludeLib/js/ie10-viewport-bug-workaround.js"></script> <script type="text/javascript"> //<![CDATA[ var Page_Validators = new Array(document.getElementById("RequiredFieldValidator1")); //]]> </script> <script type="text/javascript"> //<![CDATA[ var RequiredFieldValidator1 = document.all ? document.all["RequiredFieldValidator1"] : document.getElementById("RequiredFieldValidator1"); RequiredFieldValidator1.controltovalidate = "txtcomments"; RequiredFieldValidator1.errormessage = "Write atleast 100 words!!"; RequiredFieldValidator1.validationGroup = "Review"; RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid"; RequiredFieldValidator1.initialvalue = ""; //]]> </script> <script type="text/javascript"> //<![CDATA[ var Page_ValidationActive = false; if (typeof(ValidatorOnLoad) == "function") { ValidatorOnLoad(); } function ValidatorOnSubmit() { if (Page_ValidationActive) { return ValidatorCommonOnSubmit(); } else { return true; } } //]]> </script> </form> </body> </html>