Question: Need help with these scenarios Question 1 Write a JavaScript program to get the volume of a Cylinder with four decimal places using object classes.
Need help with these scenarios
Question 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.
Question 2
Write a JavaScript program to display the reading status (i.e. display book name, author name and reading status) of the following books.
Question 3
Write a JavaScript function to parse an URL. Your solution must use
var a = document.createElement('a');
to create an anchor object.
Your solution should have a button to start the parsing, an input for the user to enter a URL, and four outputs for the following properties:
protocol
hostname
port
query
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
