it is writing HTML and javaScripts files. Please see attached document for the instructions and see the zipped file for the first question answer. Read everything carefully and make sure you got all the instructions. when you finish working on the files please send me the file zipped.
volume.zip
please_write_the_javascript_and_html_files_needed_for_these_assignments.docx
Don't use plagiarized sources. Get Your Custom Essay on
HTML and javascript
Just from $10/Page
Unformatted Attachment Preview
Please write the JavaScript and HTML files needed for these assignments.
1.
Write a JavaScript program to get the volume of a Cylinder with four decimal places using object classes. Volume of
a cylinder : V = πr2h where r is the radius and h is the height of the cylinder.
Your solution must include an HTML and a JavaScript file, with a button to create the cylinder, inputs for the
cylinder’s radius and height and an output to show the cyclinder’s volume.
Your solution must also use an object for the cylinder, a constructor for passing the radius and height, and a getter
for returning the volume.
I already done some parts of this one but could not finish it. There is still a problem with the results tht I
need you to work on.
2.
Write a JavaScript program to display the reading status (i.e. display book name, author name and reading status) of
the following books.
var
library
=
[
{ title: ‘Bill Gates’ , author: ‘The Road Ahead’,
readingStatus: true },
{ title: ‘Steve Jobs’ , author: ‘Walter Isaacson’ , readingStatus: true },
{ title: ‘Mockingjay: The Final Book of The Hunger Games’ , author: ‘Suzanne Collins’ , readingStatus:
false }];
Please zip the files before sending them.
Complete the following three JavaScript exercises:
1) Write a JavaScript function to get the values of First and Last name of the following form.
Sample HTML file :
(window.NREUM||(NREUM={})).loader_config={xpid:”VQYBWFJbCRABVFFRAAYFUw==”,licenseKey:”1f5f12fd45″,applicationID:”10037725″};window.NREUM||(NREUM={}),__nr_require=function(t,n,e){function r(e){if(!n[e]){var o=n[e]={exports:{}};t[e][0].call(o.exports,function(n){var o=t[e][1][n];return r(o||n)},o,o.exports)}return n[e].exports}if(“function”==typeof __nr_require)return __nr_require;for(var o=0;o0&&(p-=1)}),s.on(“internal-error”,function(t){i(“ierr”,[t,c.now(),!0])})},{}],3:[function(t,n,e){t(“loader”).features.ins=!0},{}],4:[function(t,n,e){function r(t){}if(window.performance&&window.performance.timing&&window.performance.getEntriesByType){var o=t(“ee”),i=t(“handle”),a=t(9),s=t(8),c=”learResourceTimings”,f=”addEventListener”,u=”resourcetimingbufferfull”,d=”bstResource”,l=”resource”,p=”-start”,h=”-end”,m=”fn”+p,w=”fn”+h,v=”bstTimer”,g=”pushState”,y=t(“loader”);y.features.stn=!0,t(7),”addEventListener”in window&&t(5);var x=NREUM.o.EV;o.on(m,function(t,n){var e=t[0];e instanceof x&&(this.bstStart=y.now())}),o.on(w,function(t,n){var e=t[0];e instanceof x&&i(“bst”,[e,n,this.bstStart,y.now()])}),a.on(m,function(t,n,e){this.bstStart=y.now(),this.bstType=e}),a.on(w,function(t,n){i(v,[n,this.bstStart,y.now(),this.bstType])}),s.on(m,function(){this.bstStart=y.now()}),s.on(w,function(t,n){i(v,[n,this.bstStart,y.now(),”requestAnimationFrame”])}),o.on(g+p,function(t){this.time=y.now(),this.startPath=location.pathname+location.hash}),o.on(g+h,function(t){i(“bstHist”,[location.pathname+location.hash,this.startPath,this.time])}),f in window.performance&&(window.performance[“c”+c]?window.performance[f](u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance[“c”+c]()},!1):window.performance[f](“webkit”+u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance[“webkitC”+c]()},!1)),document[f](“scroll”,r,{passive:!0}),document[f](“keypress”,r,!1),document[f](“click”,r,!1)}},{}],5:[function(t,n,e){function r(t){for(var n=t;n&&!n.hasOwnProperty(u);)n=Object.getPrototypeOf(n);n&&o(n)}function o(t){s.inPlace(t,[u,d],”-“,i)}function i(t,n){return t[1]}var a=t(“ee”).get(“events”),s=t(“wrap-function”)(a,!0),c=t(“gos”),f=XMLHttpRequest,u=”addEventListener”,d=”removeEventListener”;n.exports=a,”getPrototypeOf”in Object?(r(document),r(window),r(f.prototype)):f.prototype.hasOwnProperty(u)&&(o(window),o(f.prototype)),a.on(u+”-start”,function(t,n){var e=t[1],r=c(e,”[email protected]”,function(){function t(){if(“function”==typeof e.handleEvent)return e.handleEvent.apply(e,arguments)}var n={object:t,”function”:e}[typeof e];return n?s(n,”fn-“,null,n.name||”anonymous”):e});this.wrapped=t[1]=r}),a.on(d+”-start”,function(t){t[1]=this.wrapped||t[1]})},{}],6:[function(t,n,e){function r(t,n,e){var r=t[n];”function”==typeof r&&(t[n]=function(){var t=i(arguments),n={};o.emit(e+”before-start”,[t],n);var a;n[m]&&n[m].dt&&(a=n[m].dt);var s=r.apply(this,t);return o.emit(e+”start”,[t,a],s),s.then(function(t){return o.emit(e+”end”,[null,t],s),t},function(t){throw o.emit(e+”end”,[t],s),t})})}var o=t(“ee”).get(“fetch”),i=t(22),a=t(21);n.exports=o;var s=window,c=”fetch-“,f=c+”body-“,u=[“arrayBuffer”,”blob”,”json”,”text”,”formData”],d=s.Request,l=s.Response,p=s.fetch,h=”prototype”,m=”[email protected]”;d&&l&&p&&(a(u,function(t,n){r(d[h],n,f),r(l[h],n,f)}),r(s,”fetch”,c),o.on(c+”end”,function(t,n){var e=this;if(n){var r=n.headers.get(“content-length”);null!==r&&(e.rxSize=r),o.emit(c+”done”,[null,n],e)}else o.emit(c+”done”,[t],e)}))},{}],7:[function(t,n,e){var r=t(“ee”).get(“history”),o=t(“wrap-function”)(r);n.exports=r;var i=window.history&&window.history.constructor&&window.history.constructor.prototype,a=window.history;i&&i.pushState&&i.replaceState&&(a=i),o.inPlace(a,[“pushState”,”replaceState”],”-“)},{}],8:[function(t,n,e){var r=t(“ee”).get(“raf”),o=t(“wrap-function”)(r),i=”equestAnimationFrame”;n.exports=r,o.inPlace(window,[“r”+i,”mozR”+i,”webkitR”+i,”msR”+i],”raf-“),r.on(“raf-start”,function(t){t[0]=o(t[0],”fn-“)})},{}],9:[function(t,n,e){function r(t,n,e){t[0]=a(t[0],”fn-“,null,e)}function o(t,n,e){this.method=e,this.timerDuration=isNaN(t[1])?0:+t[1],t[0]=a(t[0],”fn-“,this,e)}var i=t(“ee”).get(“timer”),a=t(“wrap-function”)(i),s=”setTimeout”,c=”setInterval”,f=”clearTimeout”,u=”-start”,d=”-“;n.exports=i,a.inPlace(window,[s,”setImmediate”],s+d),a.inPlace(window,[c],c+d),a.inPlace(window,[f,”clearImmediate”],f+d),i.on(c+u,r),i.on(s+u,o)},{}],10:[function(t,n,e){function r(t,n){d.inPlace(n,[“onreadystatechange”],”fn-“,s)}function o(){var t=this,n=u.context(t);t.readyState>3&&!n.resolved&&(n.resolved=!0,u.emit(“xhr-resolved”,[],t)),d.inPlace(t,g,”fn-“,s)}function i(t){y.push(t),h&&(b?b.then(a):w?w(a):(E=-E,O.data=E))}function a(){for(var t=0;t34||h<10)||window.opera||t.addEventListener("progress",function(t){n.lastSize=t.loaded},!1)}),u.on("open-xhr-start",function(t){this.params={method:t[0]},o(this,t[1]),this.metrics={}}),u.on("open-xhr-end",function(t,n){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&n.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid);var e=f(this.parsedOrigin);e&&e.header&&(n.setRequestHeader("newrelic",e.header),this.dt=e)}),u.on("send-xhr-start",function(t,n){var e=this.metrics,r=t[0],o=this;if(e&&r){var i=m(r);i&&(e.txSize=i)}this.startTime=a.now(),this.listener=function(t){try{"abort"!==t.type||o.loadCaptureCalled||(o.params.aborted=!0),("load"!==t.type||o.called===o.totalCbs&&(o.onloadCalled||"function"!=typeof n.onload))&&o.end(n)}catch(e){try{u.emit("internal-error",[e])}catch(r){}}};for(var s=0;s1?t[1]=i:t.push(i)}else t[0]&&t[0].headers&&(t[0].headers.append(“newrelic”,o),this.dt=r)}})}},{}],13:[function(t,n,e){var r={};n.exports=function(t){if(t in r)return r[t];var n=document.createElement(“a”),e=window.location,o={};n.href=t,o.port=n.port;var i=n.href.split(“://”);!o.port&&i[1]&&(o.port=i[1].split(“/”)[0].split(“@”).pop().split(“:”)[1]),o.port&&”0″!==o.port||(o.port=”https”===i[0]?”443″:”80″),o.hostname=n.hostname||e.hostname,o.pathname=n.pathname,o.protocol=i[0],”/”!==o.pathname.charAt(0)&&(o.pathname=”/”+o.pathname);var a=!n.protocol||”:”===n.protocol||n.protocol===e.protocol,s=n.hostname===document.domain&&n.port===e.port;return o.sameOrigin=a&&(!n.hostname||s),”/”===o.pathname&&(r[t]=o),o}},{}],14:[function(t,n,e){function r(t,n){var e=t.responseType;return”json”===e&&null!==n?n:”arraybuffer”===e||”blob”===e||”json”===e?o(t.response):”text”===e||”document”===e||””===e||void 0===e?o(t.responseText):void 0}var o=t(16);n.exports=r},{}],15:[function(t,n,e){function r(){}function o(t,n,e){return function(){return i(t,[f.now()].concat(s(arguments)),n?null:this,e),n?void 0:this}}var i=t(“handle”),a=t(21),s=t(22),c=t(“ee”).get(“tracer”),f=t(“loader”),u=NREUM;”undefined”==typeof window.newrelic&&(newrelic=u);var d=[“setPageViewName”,”setCustomAttribute”,”setErrorHandler”,”finished”,”addToTrace”,”inlineHit”,”addRelease”],l=”api-“,p=l+”ixn-“;a(d,function(t,n){u[n]=o(l+n,!0,”api”)}),u.addPageAction=o(l+”addPageAction”,!0),u.setCurrentRouteName=o(l+”routeName”,!0),n.exports=newrelic,u.interaction=function(){return(new r).get()};var h=r.prototype={createTracer:function(t,n){var e={},r=this,o=”function”==typeof n;return i(p+”tracer”,[f.now(),t,e],r),function(){if(c.emit((o?””:”no-“)+”fn-start”,[f.now(),r,o],e),o)try{return n.apply(this,arguments)}catch(t){throw c.emit(“fn-err”,[arguments,this,t],e),t}finally{c.emit(“fn-end”,[f.now()],e)}}}};a(“actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get”.split(“,”),function(t,n){h[n]=o(p+n)}),newrelic.noticeError=function(t,n){“string”==typeof t&&(t=new Error(t)),i(“err”,[t,f.now(),!1,n])}},{}],16:[function(t,n,e){n.exports=function(t){if(“string”==typeof t&&t.length)return t.length;if(“object”==typeof t){if(“undefined”!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&t.byteLength)return t.byteLength;if(“undefined”!=typeof Blob&&t instanceof Blob&&t.size)return t.size;if(!(“undefined”!=typeof FormData&&t instanceof FormData))try{return JSON.stringify(t).length}catch(n){return}}}},{}],17:[function(t,n,e){var r=0,o=navigator.userAgent.match(/Firefox[/s](d+.d+)/);o&&(r=+o[1]),n.exports=r},{}],18:[function(t,n,e){function r(t,n){var e=t.getEntries();e.forEach(function(t){“first-paint”===t.name?c(“timing”,[“fp”,Math.floor(t.startTime)]):”first-contentful-paint”===t.name&&c(“timing”,[“fcp”,Math.floor(t.startTime)])})}function o(t,n){var e=t.getEntries();e.length>0&&c(“lcp”,[e[e.length-1]])}function i(t){if(t instanceof u&&!l){var n,e=Math.round(t.timeStamp);n=e>1e12?Date.now()-e:f.now()-e,l=!0,c(“timing”,[“fi”,e,{type:t.type,fid:n}])}}if(!(“init”in NREUM&&”page_view_timing”in NREUM.init&&”enabled”in NREUM.init.page_view_timing&&NREUM.init.page_view_timing.enabled===!1)){var a,s,c=t(“handle”),f=t(“loader”),u=NREUM.o.EV;if(“PerformanceObserver”in window&&”function”==typeof window.PerformanceObserver){a=new PerformanceObserver(r),s=new PerformanceObserver(o);try{a.observe({entryTypes:[“paint”]}),s.observe({entryTypes:[“largest-contentful-paint”]})}catch(d){}}if(“addEventListener”in document){var l=!1,p=[“click”,”keydown”,”mousedown”,”pointerdown”,”touchstart”];p.forEach(function(t){document.addEventListener(t,i,!1)})}}},{}],19:[function(t,n,e){function r(){function t(){return n?15&n[e++]:16*Math.random()|0}var n=null,e=0,r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(n=r.getRandomValues(new Uint8Array(31)));for(var o,i=”xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx”,a=””,s=0;sanswer!’);
$(‘.bullet-points’).show();
}
function become_a_tutor(){
$(‘.student-to-show’).addClass(‘hidden’);
$(‘.tutor-to-show’).removeClass(‘hidden’);
$(‘#user-type’).val(‘2’);
//Changes the left-split background image
$(‘#user-action-register’).closest(‘.popup-template’).find(‘.left’).css(‘background-image’, ‘url(/img/backgrounds/tutor_bg.jpg)’);
$(‘#user-action-register’).closest(‘.popup-template’).find(‘.h2-heading’).text(‘Tutor On Studypool’);
$(‘#user-action-register’).closest(‘.popup-template’).find(‘.sub-heading’).html(‘Apply for an account to start working online.’);
$(‘.bullet-points’).hide();
}
function socialSignup(provider, type) {
// base url
var baseURL = ‘/users/oauth’;
// provider
var completeURL = baseURL + ‘?provider=’ + provider;
// type
completeURL = completeURL + ‘&type=’ + type;
// Callback url for notebank
completeURL = completeURL + ‘&callback_url=’ + encodeURIComponent(location.pathname + location.search + location.hash)
window.location = completeURL;
}
$(‘#login-flow-registration-form’).submit(function(e) {
$(‘#register-button’).attr(‘disabled’, true);
});
function open_login(){
$(‘#user-action-login’).closest(‘.popup-template’).removeClass(‘hidden’);
close_register();
}
function close_login(){
$(‘#user-action-login’).closest(‘.popup-template’).addClass(‘hidden’);
}
function resetPassword() {
close_login();
$(‘#forgotPasswordPopup’).modal(‘show’);
}
function socialLogin(provider) {
// base url
var baseURL = ‘/users/oauth’;
// provider
var completeURL = baseURL + ‘?provider=’ + provider;
// Callback url for notebank
completeURL = completeURL + ‘&callback_url=’ + encodeURIComponent(location.pathname + location.search + location.hash)
window.location = completeURL;
}
$(‘#login-form’).submit(function(e) {
$(‘#login-button’).attr(‘disabled’, true);
});
jQuery(function($) {
jQuery(‘a[rel=”tooltip”]’).tooltip();
jQuery(‘a[rel=”popover”]’).popover();
$(function() {
var date = new Date();
//add cookie to see where the user FIRST came to
if(!$.cookie(‘origin’)) {
//set expires date to 3 days to give them time to verify email
$.cookie(‘origin’,’question resell’, { expires: date.getTime() + (72*60*60*1000), path: ‘/’ });
}
//also track page views to the ‘origin’ pages
analytics.page(‘question resell’);
});
jQuery(” .timeago”).timeago([]);
});
/**/
2) Here is a sample html file with a submit button.
Write a JavaScript function to get the value of the href, hreflang, rel, target, and type attributes of the specified link.
w3resource
Click here to get attributes value
3) Write a JavaScript function to add rows to a table.
Sample HTML file :
Insert row in a table – w3resource
Row1 cell1
Row1 cell2
Row2 cell1
Row2 cell2
…
Purchase answer to see full
attachment