Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Page 1 of 3 ASSIGNMENT 2 15 Points CIS 114 In EVERY file submitted (except graphics , JSON and XML files) you MUST place the

Page

1

of

3

ASSIGNMENT

2

15

Points

CIS

114

In EVERY file submitted (except graphics

,

JSON and XML

files) you

MUST place the

following

information

near

the top of the page

use JavaScript or HTML comments

depending on

the file type.

JavaScript c

omments are // (single line) or /* */ (multi

-

line)

HTML comments

use

--

This is a comment.

--

>

CSS files use

only

multi

-

line

/* */

comments.

Your Full Name

Your Email @my.smccd.edu

CIS

114 OL

File Name

Assignment #

Date

Your full name must ALSO appea

r in the title bar when HTML files are

displayed in

the browser. Use the element in the document head to</p> <p>do this. 1 point will be</p> <p>deducted for each</p> <p>time a</p> <p>file</p> <p>is</p> <p>missing</p> <p>this or</p> <p>any</p> <p>of the above information.</p> <p>1.</p> <p>Do the following:</p> <p></p> <p>Read</p> <p>c</p> <p>hapter</p> <p>s</p> <p>4+5</p> <p>in</p> <p>Murachs</p> <p>JavaScript and</p> <p>jQuery</p> <p>text</p> <p>book.</p> <p>The books files</p> <p>can be downloaded from</p> <p>Canvas.</p> <p></p> <p>Read the Block Bindings section</p> <p>from</p> <p>Un</p> <p>derstanding ECMAScript 6</p> <p>:</p> <p>https://leanpub.com/understandinges6/read/#leanpub</p> <p>-</p> <p>auto</p> <p>-</p> <p>block</p> <p>-</p> <p>bindings</p> <p></p> <p>Follow all CIS 114 Programming Guidelines (see handout)</p> <p>2.</p> <p>Do</p> <p>exercise</p> <p>4</p> <p>-</p> <p>2</p> <p>at the end of</p> <p>chapter</p> <p>4 (to be submitted)</p> <p>.</p> <p>3.</p> <p>Do exercises 5</p> <p>-</p> <p>1 and 5</p> <p>-</p> <p>2 at the en</p> <p>d of chapter 4 (NOT to be submitted).</p> <p>4.</p> <p>Develop an application that calculates the sales tax and total after the user enters the</p> <p>subtotal and tax rate.</p> <p>Page</p> <p>2</p> <p>of</p> <p>3</p> <p>A.</p> <p>Download the</p> <p>assignment 2</p> <p>files from Canvas.</p> <p>Open the HTML and</p> <p>JavaScript files in</p> <p>the sales_t</p> <p>ax folder.</p> <p>B.</p> <p>In the JavaScript file, note that the $ function has been coded for you.</p> <p>It gets</p> <p>the</p> <p>o</p> <p>bject for the HTML element that i</p> <p>s specified by the id attribute.</p> <p>C.</p> <p>Code an event handler (function) named processEntries() that gets the user</p> <p>entries, calcu</p> <p>lates the sales tax and total, and displays those results in the text</p> <p>boxes.</p> <p>Format the</p> <p>sales tax and</p> <p>total as currency with 2 places past the</p> <p>decimal point.</p> <p>D.</p> <p>Code an onload event handler that attaches the processEntries() function to the</p> <p>click event of the Calculate button. Then, test what you have so far.</p> <p>E.</p> <p>Add data validation to the</p> <p>processEntries() function. The subtotal entry</p> <p>must</p> <p>be</p> <p>a valid, positive number less than 10,000.</p> <p>The tax rate should be a valid,</p> <p>positive number</p> <p>less than 12. The error messages should be displayed in</p> <p>alert</p> <p>dialog boxes, and the error messages should be:</p> <p>Subtotal must be > 0 and < 10000</p> <p>Tax Rate must be > 0 and < 12</p> <p>F.</p> <p>Add JavaScript that moves the cursor to the Subtotal field when the</p> <p>application</p> <p>starts and when the user clicks on the Calculate button.</p> <p>G.</p> <p>Add the JavaScript event handler for the click e</p> <p>vent of the Clear button. This</p> <p>should clear all text boxes and move the cursor to the Subtotal field.</p> <p>H.</p> <p>Add JavaScript event handlers for the click events of the Subtotal and Tax</p> <p>Rate</p> <p>text boxes.</p> <p>Each handler should clear the data from the text</p> </div> </section> <section class="answerHolder"> <div class="answerHolderHeader"> <div class="answer-heading"> <h2>Step by Step Solution</h2> </div> <div class="answerReviews"> <div class="starReview"> <div class="starIcon"> </div> <div class="starText"> </div> </div> </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/practical-database-programming-with-visual-c-net-1st-edition-9780470467275"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/64f026d9471b6_48847.jpg" width="100" height="131" alt="Practical Database Programming With Visual C# .NET" loading="lazy"> </a> </div> <div class="bookInfo" > <h3 class="bookTitle"> <a href="/textbooks/practical-database-programming-with-visual-c-net-1st-edition-9780470467275"> Practical Database Programming With Visual C# .NET </a> </h3> <div class="bookMetaInfo" > <p class="bookAuthor"> <b>Authors:</b> <span>Ying Bai</span> </p> <p class="bookEdition"> 1st Edition </p> <p class="bookEdition"> 0470467274, 978-0470467275 </p> </div></div></div> <a href="/textbooks/computer-science-implementing-vectors-2720" 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> <a class="relatedQuestionText" href="/study-help/fundamentals-of-human-resource-management/what-might-change-when-youre-able-to-distinguish-a-2111667" > - What might change when you're able to distinguish a truth from a perception? </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="/consider-the-situation-in-example-87-a-new-gauge-is" > Consider the situation in Example 8.7. A new gauge is being evaluated for this process. The same operator measures the same 20 parts twice using the new gauge and obtains the data shown in Table... </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/question-4-which-of-the-following-are-examples-of-search-13224453" > Question 4 Which of the following are examples of search engines? ( Choose all that apply. ) Google Apple Bing Linux </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/a-fiveyear-project-requires-an-investment-of-281-and-has-11835570" > A five-year project requires an investment of -281 and has the following cash flows in years 1 through 5 , respectively (all cash flows in dollars): 152,128,296,20, and 189 . Without actually... </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/a-pharmacy-has-four-counter-to-serve-blood-pressure-test-1375719" > A Pharmacy has four counter to serve Blood pressure test for customer. Customers arrive according to a Poisson distribution at the rate of 1 every 10 minutes. However, only 85% seek service at 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/the-document-that-governs-the-relationship-between-the-anote-holder-1377449" > The document that governs the relationship between the A-Note holder and the B-Note holder is the a)Subordination Agreement b)Intercreditor Agreement c)Participation or Co-lender Agreement... </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/select-the-misleading-graph-line-chart-of-monthly-average-temperature-1377847" > Select the misleading graph. Line chart of Monthly average temperature. Month is on the x axis and average temperature is on the y-axis. Scatterplot with rainfall on the x-axis and tree density on... </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/greece-is-now-subject-to-enhanced-supervision-by-euro-zone-2941204" > Greece is now subject to "enhanced supervision" by euro zone creditors, having exited the bail- out programme in August 2018. The government has committed to meeting annual primary budget __________... </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/a-manufacturing-company-has-recently-outsourced-its-entire-operations-processes-1378323" > A manufacturing company has recently outsourced its entire operations processes. Moreover, the CEO has decided to start an e-commerce business model to find a new market to target consumers with... </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/organization-development/valamis-develops-lxps-for-other-companies-go-to-wwwvalamiscomstoriesamadeus-watch-2124716" > Valamis develops LXPs for other companies. Go to www.valamis.com/stories/amadeus. Watch the videos. How is the LXP helping Amadeus? What features does it provide that lead to more effective employee... </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/organization-development/explain-how-you-could-use-lean-thinking-for-developing-online-2124713" > Explain how you could use lean thinking for developing online training. </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/supply-chain-management-a-logistics/what-different-ways-in-which-supply-chains-may-choose-to-2124721" > What different ways in which supply chains may choose to compete in the marketplace </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/c-c-main-stegman-13224451">Previous Question</a> <a class="nextQuestionButton" href="/study-help/questions/question-4-which-of-the-following-are-examples-of-search-13224453">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" width="40" height="40" loading="lazy" src="includes/images/mobile/finalLogo.png"> <p class="app_promo_title font-sans items-center">View Answer in SolutionInn App</p> </div> <button class="app_promo_action redirection question_open_url='q_id=13224452&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(t){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("question_open_url"))}),jQuery(".redirection").click(function(){var n=jQuery(this).attr("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>