isys350homework9.docx - JSP DOCUMENT <@page import=\"java.text.NumberFormat%> <@page contentType=\"text\/html pageEncoding=\"UTF-8%> <!DOCTYPE html> <html>

isys350homework9.docx - JSP DOCUMENT <@page...

This preview shows page 1 - 3 out of 5 pages.

JSP DOCUMENT <%@page import="java.text.NumberFormat"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <% String strValue, strLife; strValue=request.getParameter("pValue"); strLife=request.getParameter("pLife"); double value, life, amountleft, depreciation, orgval, totalDepreciation = 0; orgval = Double.parseDouble(strValue); value=Double.parseDouble(strValue); life=Double.parseDouble(strLife); depreciation = value * 2 / life; amountleft = value; NumberFormat nf = NumberFormat.getCurrencyInstance(); out.print("Double Declining Depreciation Table" + "<br>"); out.print("Property Value: <input type='text' name='pValue' value='" + nf.format(value) + "' /><br>"); out.print("Property Life: <input type='text' name='pLife' value='" + life + "' /><br>"); totalDepreciation=0; out.print( "<table border='1' width='400' cellspacing=1>"); out.print("<thead> <tr> <th>Year</th> <th>Value at Beginning of Year </th>"); out.print("<th>Depreciation During Year</th> <th>Total at End of Year</th></tr> </thead>");
Image of page 1
out.print("<tbody>"); for (int count = 1; count <= life; count++) { if (count < life){ depreciation = amountleft * 2 / life; out.print("<tr>"); out.print(" <td >" + count + "</td>"); out.print(" <td >" + nf.format(amountleft) + "</td>"); out.print(" <td>" + nf.format(depreciation) + "</td>"); totalDepreciation+=depreciation; out.print(" <td>" + nf.format(totalDepreciation) + "</td>");
Image of page 2

Want to read all 5 pages?

Image of page 3

Want to read all 5 pages?

You've reached the end of your free preview.

Want to read all 5 pages?

  • Fall '10
  • LI

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

\nJSP Page<\/title>\n<\/head>\n<body>\n<%\nStrin","type":"homework","course_id":4299582,"doc_date":"2018-01-10 01:29:29","filehash":"e4a70c01f4cae63e64ca842e74ba2f4ca97bb6af","user_id":100000755707802,"pages":0,"username":"BrandiR45","resource_url":"https:\/\/www.coursehero.com\/file\/27575691\/isys350homework9docx\/"}, fileHash: "e4a70c01f4cae63e64ca842e74ba2f4ca97bb6af", title: "isys350homework9.docx", dbFilename: 27575691, } var _docLandingProps = { isFrqBlocker: false, isLoggedIn: false, isNew: false, isDesktop: true, isPremier: false, permissionType: "basic", hasUnlocks: false, unlocksRemaining: 0, unlockUrl: "/unlock-document/27575691/isys350homework9docx/", mobileUxBucket: 0, blockerRefreshBucket: 0 } var _lockedDocumentMetadataProperties = { "pagesInSplit": 2, "splitIndex": 0, "splitHash": "6f05lk", "identifiedQuestionTypes": [] } var _documentMetadataProperties = { "dbFilename": 27575691, "schoolName": "San Francisco State University", "schoolId": 362, "courseName": "Business Application Development", "courseId": 1407183, "departmentName": "", "departmentId": 50743, "termName": "Spring", "termId": 3, "documentType": "homework", "pagesInDoc": 5 } var _documentSocialProofProperties = { "docViews": 43, "docConversions": 0, "docRatingCount": 4, "docRatingPercent": "100.00000", "totalDocumentUnlocks": 8, "uploadUserUserType": "Student", "uploadUserId": "100000755707802" } </script> <script src='/assets/js/compiled/legacy/document/basic/chunk.vendors~legacy/document/basic/basic-doc-landing-app.863b3e64d5d6d5dd60c2.js' type='text/javascript'></script><script src='/assets/js/compiled/legacy/document/basic/basic-doc-landing-app.79400b43752de9604d75.js' type='text/javascript'></script> <script src='/assets/js/compiled/legacy/document/express-unlock/chunk.vendors~legacy/document/express-unlock/app.97acb4b91554c49de5e8.js' type='text/javascript'></script><script src='/assets/js/compiled/legacy/document/express-unlock/app.0b50648fa743f2645028.js' type='text/javascript'></script> <script async type='text/javascript' src='/sym-assets/js/practice-problem-entry-point-index-7857588-62abfc0.js'></script> <script type="text/javascript"> var frqBlocker = false; var showOutOfViewsBlocker = 0; var schoolId = 362; var schoolName = "San Francisco State University" ; var isQIV2 = false; // MCQ Answer Blurring AB Test Bucket 2 var startPage = 1; var canDisplayMcq = false; var mobileUxBucket = 0; var canDisplayQuestionMcq = false; var unlockUrl = "/unlock-document/27575691/isys350homework9docx/"; var permissionType = "basic"; var endPage = 3; var dbFilename = 27575691; var routeFilename = "27575691"; if ($.lazyLoadXT) $.extend($.lazyLoadXT, { autoInit: false, srcAttr: 'data-null', selector: '' }); // For Mixpanel Tracking var contentType = 'document'; var dbFilename = 27575691; var similarQuestionId = 0; window.recentlyViewedDocuments = []; var tracker = new MixpanelEventTracking(); (function(m,p,n){ if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1 && 'storage' in navigator && 'estimate' in navigator.storage) { navigator.storage.estimate().then(function(r){tracker.super_properties[m]=r.quota>Math.pow(2,20)*120?n:p}) } else if (/Safari/.test(navigator.userAgent)) { tracker.super_properties[m]=(function(){try{window.openDatabase(null,null,null,null);return 1}catch(e){return 0}})()?n:p } else if ("MozAppearance" in document.documentElement.style){ var x=indexedDB.open('x');x.onerror=function(){tracker.super_properties[m]=p},x.onsuccess=function(){tracker.super_properties[m]=n;} }})('Browser Mode','Private','Normal') tracker.super_properties['Page Name'] = 'Document - Basic'; tracker.super_properties['Reader View Enabled'] = 'No'; tracker.super_properties['Previews Left'] = 'Yes'; tracker.super_properties['Has Answered DQ'] = 0; var pageNum = 1; var endPage = 3; var course = {"school_name":"San Francisco State University","prof_name":"LI","dept_acro":"ISYS","term_string":"Fall","course_id":1407183,"canonical_course_id":1407183,"school_id":362,"dept_id":50743,"course_num":"350","year":2010,"term":1,"prof_id":215613,"course_name":"Business Application Development","verified":1,"professor":{"prof_id":215613,"school_id":362,"dept_id":0,"name":"LI"},"resource_url":"https:\/\/www.coursehero.com\/sitemap\/schools\/362-San-Francisco-State-University\/courses\/1407183-ISYS350\/"}; // IntersectionObserver may need to be loaded from polyfill.io. $(document).ready(function() { onScrollDirectionChangeWithElementVisible(document.getElementById('ch-footer'), function(direction) { if(direction == "down"){ $('.ch_basicDocPage_limitABContainer').addClass('limitAB_disappear').removeClass('limitAB_appear'); } else { $('.ch_basicDocPage_limitABContainer').removeClass('limitAB_disappear').addClass('limitAB_appear'); } }); }); // Adjust bookmark button positioning for mobile secondary splits $(document).ready(function () { //setup attributes for ga tracking $(".bdp_stickyHeader_action, .bdp_header_action, .bdp_roadblock_action, .bdp_viewDoc_action").attr('data-doc-landing-ga', 'Sign Up'); $("#ch-header").find("a").attr('data-doc-landing-ga', "Header"); $("#ch_breadcrumbs").find("a").attr('data-doc-landing-ga', "Breadcrumb"); $("#bdp_documentsAsideNarrow_bundle").find("a").attr('data-doc-landing-ga', "Side Related"); $(".ch_docs-related_bundle").find("a").attr('data-doc-landing-ga', "Bottom Related"); $(".ch_docInfo_container").find("a").attr('data-doc-landing-ga', "Doc Info"); $(".ch_appDownload_bundle").find("a").attr('data-doc-landing-ga', "App"); $(".ch_docSocialShare_bundle").find("a").attr('data-doc-landing-ga', "Social"); $(".ch-footer-links_container").find("a").attr('data-doc-landing-ga', "Footer"); }); // set page num change to only occur after scroll from 1st page var pageScrolls = 0; // IntersectionObserver may need to be loaded from polyfill.io. $(document).ready(function() { var el = document.getElementsByClassName('bdp_preview_single')[0]; if (!el) return; onScrollDirectionChangeWithElementVisible(el, function(direction) { if (direction === 'up' && pageNum > 1) { pageNum--; } else if (direction === 'down' && pageScrolls > 0 && pageNum < endPage) { pageScrolls++; pageNum++; } else if (direction === 'down' && pageScrolls < 1) { pageScrolls = 1; } $('.greenText').text(pageNum); }); }); $("#view-more-related").on('click', function () { tracker.track("View More Button Click", {"Type": "Doc"}); }); $("[data-ch-mixpanel-doc-thumb-tracking]").on('click', function (event) { var document_number = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-thumb-tracking'); var location = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-location'); var algorithm = jQuery(event.delegateTarget).attr('data-ch-mixpanel-doc-algorithm'); if (document_number) { var properties = {}; properties['Document Number'] = document_number; properties['Location'] = location; properties['Algorithm'] = algorithm; tracker.track("Doc Landing Related Content Clicks", properties); } }); function getUserId() { return -1; } // MCQ CTA amplitude tracking $(document).on('click', '.mcq_subscribe_action', function (e) { var properties = {}; var conversionName = e.currentTarget.getAttribute('data-ch-mixpanel-conversion-tracking'); if (conversionName) { properties['Conversion Name'] = conversionName; tracker.track('Conversion Action', properties); } }); // Amplitude user properties var userProperties = {}; userProperties['DQ AB Test'] = 0; tracker.setUserProperties(-1, userProperties); window.isPremierDocPage = false; var department = null; department = "ISYS"; $("#doc_link_expired_close_btn").on('click', function (e) { e.preventDefault(); $(".doc_link_expired").hide(); }); $("#show_more_endorse_info_btn").on('click', function () { $("#endorsed_by_info").toggle(); }); CHAnalytics.setPagePrefix("logged_out_doc_"); CHAnalytics.setPageDefaultActionTargetType("document"); //commenting out in case we ever want to show the Intercom or question widget again var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; var ctrlKey = isMac ? "metaKey" : "ctrlKey"; $(document).ready(function(){ $(window).on('keydown', function(event) { if (!(event.which === 70 && event[ctrlKey])) return true; tracker.track("Browser On Page Search", {}); return true; }); }); </script> <script type="text/javascript"> window.addEventListener("load", function() { $('link[media=none]').each(function(_, link) { link.media = 'screen' }) }) </script> <script type="text/javascript"> CHAnalytics.v("initial").pageView() </script> <script type="text/javascript">window['_props_otherRelatedMaterials'] = {"documents":[],"cocoPercentageBucket":0,"showSolvedLabel":false,"location":"bottom"}</script> <script type="text/javascript">window['_props_otherRelatedMaterials_router'] = {}</script><script type="text/javascript">window['_props_sidebar'] = {"documents":[],"cocoPercentageBucket":0,"showSolvedLabel":false,"location":"left_sidebar"}</script> <script type="text/javascript">window['_props_sidebar_router'] = {}</script><script type="text/javascript" src="/ch-assets/ssi/vendors~f818386c072155f23dd1da2fc6063320dda1f262.js"></script><script type="text/javascript" src="/ch-assets/ssi/common~f818386c072155f23dd1da2fc6063320dda1f262.js"></script><script type="text/javascript" src="/ch-assets/ssi/a28e5ea655fb250d9ba1c80eac602ea13f4d5222.all.bundle.js"></script></body> </html>