Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming, using namespace std and iostream. You were given two text files with comma separated values: books.txt, which is a list of books and

C++ Programming, using namespace std and iostream. You were given two text files with comma separated values: books.txt, which is a list of books and their authors, and ratings.txt, which is a list of users and their ratings of those books. The first task is to read these files and load their contents into arrays for convenient processing. Sample lines from books.txt: Douglas Adams,The Hitchhiker's Guide To The Galaxy Richard Adams,Watership Down Mitch Albom,The Five People You Meet in Heaven (etc.) - The format is , Sample lines from ratings.txt: cynthia,4 3 1 0 3 0 5 1 5 2 2 2 1 4 4 2 0 1 1 2 3 2 1 1 3 4 1 2 1 3 0 0 3 1 1 3 2 3 1 2 3 4 5 5 0 1 3 2 2 4 diane,3 1 1 0 2 2 3 1 0 1 4 3 1 2 1 1 5 2 4 0 3 2 1 5 4 5 0 2 3 3 5 2 2 1 4 5 2 4 5 2 3 3 5 5 4 1 3 4 2 3 (etc.) - The format is <username>,<rating_0> <rating_1> <rating_2> <rating_50> - The order of ratings, rating_0, rating_1, rating_2,... correspond to the order of books in the books.txt file Note: For this homework, assume there are 50 books and 100 users at the max(86 users to be exact).</p> <p> <strong>Question 1</strong> Write a function readBooks that populates a pair of arrays with the titles and authors found in books.txt. This function should: Accept five input arguments in this order: string: the name of the file to be read string array: titles string array: authors int: the number of </p> <p> <strong>Question 2</strong> Write a function readRatings that performs a similar task on the user ratings file. Each username represented in ratings.txt is followed by list of integers--ratings of each book in books.txt. Rating Meaning 0 Did not read 1 Hell No - hate it!! 2 Dont like it. 3 Meh - neither hot nor cold 4 Liked it! 5 Mind Blown - Loved it! Your function should: Accept six arguments in this order: string: the name of the file to be read string array: usernames 2D int array: list of ratings for each user (first index specifies user) int : number of users currently stored in the arrays int: row capacity of the 2D array (convention: array[row][column]) [assume to be 100] int: column capacity of the 2D array [assume to be 50] Use ifstream, stringstream, and getline to read and parse data from the file, placing usernames in the usernames array and book ratings in the ratings array (stoi will also be useful here) Print the username of each user as they are added to the system cout << username << "..." << endl; Return the total number of users in the system, as an integer. If the file cannot be opened, return -1 Hint: You can use the split() function that was used during recitation Note: Although user can specify the name of the file to read from, assume the default filename to be ratings.txt Expected output: cynthia... diane... joan... barbara... (etc.)</p> <p> <strong>Question 3</strong> It will be useful to display the contents of your library. Next, make a function printAllBooks that meets the following criteria: Accept three arguments in this order: string array: titles string array: authors int: number of books This function does not return anything If the number of books is 0, print No books are stored Otherwise, print Here is a list of books and then each book in a new line using the following statement cout << titles[i] << " by " << authors[i] << endl; Expected output (assuming you have read the data from books.txt) The Hitchhiker's Guide To The Galaxy by Douglas Adams Watership Down by Richard Adams The Five People You Meet in Heaven by Mitch Albom Speak by Laurie Halse Anderson (etc.)</p> <p> <strong>Question 4</strong> Write a function getUserReadCount for determining how many books a particular user has read and reviewed. This function should: Accept five arguments in this order: string: username for whom we want a read count string array: all users 2D int array: list of all ratings, one row for each user int: number of users in the arrays int: number of books accounted for in the 2D array Return the number of books read/reviewed by the specified user, as an integer. If the program has not read ratings.txt or books.txt, it must read it first before executing this function. In this case, return -1 after printing the following message: cout << name << " does not exist in the database" << endl; If instead the database is initialized but the user is not found, return -1 after printing the following message : cout << name << " does not exist in the database" << endl; Highly recommend: Write a helper function that searches the user array for a particular username and returns its index.</p> <p> <strong>Question 5</strong> Finally, create a function calcAvgRating that returns the average (mean) rating for a particular book. This function should: Accept five arguments in this order: string: book title for which you want the average rating string array: titles 2D int array: list of ratings for each user (same comment here) int: number of users in the arrays int: number of books accounted for in the 2D array Return the average rating of the specified book as a double If the program has not read ratings.txt or books.txt, it must read it first before executing this function. In this case, return -1 after printing the following message: cout << bookTitle << " does not exist in the database" << endl; If instead the database is initialized but the book is not found, return -1 after printing the following message: cout << bookTitle << " does not exist in the database" << endl; Highly recommend: Write a helper function that searches the titles array for a particular book and returns its index. Note: If the user has not reviewed the book it should not be added while calculating the average.</p> <p> <strong>Driver function</strong></p> <p>The menu will run on a loop, continually offering the user six options until they opt to quit.</p> <p>Example menu Select a numerical option: ======Main Menu===== 1. Read book file 2. Read user file 3. Print book list 4. Find number of books user rated 5. Get average rating 6. Quit</p> <p>1. Initialize library Prompt the user for a file name. Pass the file name to your readBooks function. Print the total number of books in the database in the following format: Total books in the database: If no books are saved to the database due to wrong file name, then print the following message: No books saved to the database</p> <p>2. Initialize user catalog Prompt the user for a file name. Pass the file name to your readRatings function Print the total number of users in the database in the following format: Total users in the database: If no books are saved to the database due to wrong file name, then print the following message: No users saved to the database</p> <p>3. Display library Call your printAllBooks function.</p> <p>4. Get number of books reviewed by a user Prompt the user for a username. Pass the username to your getUserReadCount function If the user exists in the system, print the result in the following format: rated books</p> <p>5. Get average rating for a title Prompt the user for a title. Pass the title to your calcAvgRating function If the title exists in the database, print the result in the following format: The average rating for is Note: is a double with 2 decimal points.</p> <p>6. Quit Print good bye! before exiting</p> </div> </section> <section class="answerHolder"> <div class="answerHolderHeader"> <div class="answer-heading"> <h2>Step by Step Solution</h2> </div> </div> <div class="answerSteps"> <p>There are <span>3</span> Steps involved in it</p> <div class="step"> <h3>Step: 1</h3> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp" width="759" height="271" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <div class="step1Popup"> <h3>Get Instant Access to Expert-Tailored Solutions</h3> <p>See step-by-step solutions with expert insights and AI powered tools for academic success</p> <button class="view_solution_btn step1PopupButton">View Solution</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 2</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class=" view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 3</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class="view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> </div> </section> </div> <div class="expertRight"> <section class="AIRedirect"> <div class="AIHolder"> <h2>Ace Your Homework with AI</h2> <p>Get the answers you need in no time with our AI-driven, step-by-step assistance</p> <a class="AILink" href="/ask_ai">Get Started</a> </div> </section> <section class="relatedBook"> <div class="bookHolder"> <div class="relatedBookHeading"> <h2>Recommended Textbook for</h2> <object class="freeTagImage" type="image/svg+xml" data="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/document_product_info/free.svg" name="free-book-icon"></object> </div> <div class="bookMainInfo"> <div class="bookImage"> <a href="/textbooks/database-and-expert-systems-applications-33rd-international-conference-dexa-2022-vienna-austria-august-22-24-2022-proceedings-part-2-lncs-13427-1st-edition-978-3031124259-175977"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/2024/01/6597e5c3e1203_5716597e5c3dbc14.jpg" width="100" height="131" alt="Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427" loading="lazy"> </a> </div> <div class="bookInfo"> <h3 class="bookTitle"> <a href="/textbooks/database-and-expert-systems-applications-33rd-international-conference-dexa-2022-vienna-austria-august-22-24-2022-proceedings-part-2-lncs-13427-1st-edition-978-3031124259-175977"> Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427 </a> </h3> <div class="bookMetaInfo"> <p class="bookAuthor"> <b>Authors:</b> <span>Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil</span> </p> <p class="bookEdition"> 1st Edition </p><p class="bookISBN"> <a href="/textbooks/database-and-expert-systems-applications-33rd-international-conference-dexa-2022-vienna-austria-august-22-24-2022-proceedings-part-2-lncs-13427-1st-edition-978-3031124259-175977"> <b>ISBN:</b> 3031124251, 978-3031124259 </a> </p></div></div></div><a href="/textbooks/computer-science-memory-layout-2634" class="viewMoreBooks">More Books</a> </div> </section> </div> </div> <section class="relatedQuestion"> <div class="relatedQuestionHolder"> <h4>Students also viewed these Databases questions</h4> <div class="relatedQuestionSliderHolder"> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/what-is-the-difference-between-the-operation-of-a-thermosyphon" > What is the difference between the operation of a thermosyphon solar water heater system and an active, closed loop solar water heater? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/note-subject-database-managment-system-there-isare-tables-having-more-12495770" > NOTE: SUBJECT DATABASE Managment system There is/are table(s) having more than one FK (which are neither PK nor part of PK) True/False True Q: Relationship Line lies between having cardinality &... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/managerial-communication-strategies/what-if-any-information-would-you-share-with-ms-stevens-2114961" > What, if any, information would you share with Ms. Stevens to debrief her on the meeting with Patrick and his parents? Would you share a copy of the file presented in Case 1.3 with Ms. Stevens? Could... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/tremont-inc-sells-tire-rims-its-sales-budget-for-the" > Tremont, Inc., sells tire rims. Its sales budget for the nine months ended September 30 follows: In the past, cost of goods sold has been 40% of total sales. The director of marketing and the... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/c-programming-using-namespace-std-and-iostream-you-were-given-13525923" > C++ Programming, using namespace std and iostream. You were given two text files with comma separated values: books.txt, which is a list of books and their authors, and ratings.txt, which is a list... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/bc-n-d-just-paid-its-annual-dividend-of-60-6406858" > BC n D just paid its annual dividend of $.60 a share. The projected dividends for the next five years are $.30, $.50, $.75, $1.00, and $1.20, respectively. After that time, the dividends will be held... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/1224-pm-sat-sep-30-m-chapter-2-h-homework-5120016" > 12:24 PM Sat Sep 30 M Chapter 2: H Homework Help X Chapter 2: Homework 2 Question 3 of 8 < > Part 5 * Your answer is incorrect. Chapter 2: Homework 2 Question 3 of 8 < > 5/10 E III Current Attempt in... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/required-calculate-the-missing-amounts-turek-incorporated-income-statement-year-1461312" > Required: Calculate the missing amounts. TUREK, INCORPORATED Income Statement Year ended December 31, 2024 Revenues Expenses: Salaries $ 30,500 Advertising Utilities 4,300 2,300 Net income Beginning... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/create-graphs-or-plots-of-the-following-equations-or-situations-4986956" > Create graphs or plots of the following equations or situations. Use an online graphing calculator of your choice or your own graphing calculator, choose an appropriate viewing window that completely... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/the-following-information-for-dorado-corporation-relates-to-the-threemonth-868123" > The following information for Dorado Corporation relates to the three-month period ending September 30. Price per Units Unit Sales 445,000 $ 40 Beginning inventory 39,000 22 Purchases 420,000 Ending... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/questions/which-financial-statements-analysis-tool-would-you-use-to-compare-6264443" > which financial statements analysis tool would you use to compare Microsoft with a small grocery store? What are the pitfalls? Explain. Please add reference </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/marketing-strategy-planning/question-what-is-the-doughnut-hole-in-hsa-coverage-2125741" > Question What is the doughnut hole in HSA coverage? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/marketing-strategy-planning/question-may-a-taxpayer-roll-over-unused-balances-from-2125744" > Question May a taxpayer roll over unused balances from health reimbursement arrangements (HRAs) or health flexible spending accounts (health FSAs)? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"><span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span></div> </div> <a class="relatedQuestionText" href="/study-help/marketing-strategy-planning/question-can-an-hsa-be-designed-to-provide-benefits-2125740" > Question Can an HSA be designed to provide benefits primarily for a selected group of executives? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> </div> </div> </section> <hr class="expert-separator"> <div class="next-previous-button"> <div class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/the-four-types-of-creep-are-scope-13525922">Previous Question</a><a class="nextQuestionButton" href="/study-help/questions/c-programming-assignment-2-unit-conversion-tables-this-programming-project-13525924">Next Question</a> </div> </div> </div> <div class="promo items-center justify-center hidden" style="margin-left:-15px;"> <div class="app_promo"> <div class="app_promo_headline"> <img class="app_promo_icon" alt="Mobile App Logo" loading="lazy" width="40" height="40" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png"> <p class="app_promo_title font-sans items-center">Study smarter with the SolutionInn App</p> </div> <button class="app_promo_action redirection question_open_url='q_id=13525923&q_type=2'"> Download on the App Store </button> <button class="btn btn-default app_promo_dismiss"> Continue with the mobile website </button> </div> </div> </main></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="/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> </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> </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="/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>© 2024 SolutionInn. All Rights Reserved</p> </div></footer> <script> window.addEventListener("load",function(){jQuery(document).ready(function(e){e.ajax({type:"POST",url:"/",data:{insertCrawler:!0,reqUri:document.URL,parseTime:"0.366",queryTime:"0.30754074758911",queryCount:"78"},success:function(e){}})})},!1); </script> <script> window.addEventListener("load",function(){jQuery(document).ready(function(){function n(n="",t=!1){var o="itms-apps://itunes.apple.com/app/id6462455425",i="openApp://action?"+n;isAndroid()?(setTimeout(function(){return window.location="market://details?id=com.solutioninn.studyhelp",!1},25),window.location=i):isIOS()?(setTimeout(function(){return window.location=o,!1},25),window.location=i):(o="https://apps.apple.com/in/app/id6462455425",t&&(o="https://play.google.com/store/apps/details?id=com.solutioninn.studyhelp"),window.open("about:blank","_blank").location.href=o)}jQuery("#appModal").modal("show"),jQuery(".download-app-btn").click(function(){n(jQuery(this).attr("question_open_url"))}),jQuery(".redirection").click(function(){var t=jQuery(this).attr("question_open_url"),o=jQuery(this).attr("data-id");void 0!=t?1==o?n(t,!0):n(t,!1):1==o?n("",!0):n("",!1)}),jQuery(".app-notification-close").click(function(){jQuery(".app-notification-section").css("visibility","hidden");var n=new FormData;n.append("hide_notification",!0),jQuery.ajax({type:"POST",url:"/",data:n,cache:!1,contentType:!1,processData:!1,beforeSend:function(){},success:function(n){location.reload()}})})})},!1); </script> </body> </html>