Question: I need help with my JavaScript project. CMPS 1 6 2 : Module 7 Programming Project * { font - family: monospace; } / /
I need help with my JavaScript project.
CMPS : Module Programming Project
fontfamily: monospace;
Objects
console.logObjects;
Complete the implementation of the Circle object that has methods to
calculate the area and circumference. You can find a start of the code
and how the object is supposed to be used below.
NOTE: that the initial code has several lines commented out that
you must complete.
HINT: use the Math.PI to get the value of Pi
Google how to calculate the area and circumference of a circle if
you do not recall.
Round to the nearest th eg nnn
function Circleradius
Replace the question marks to complete the constructor
this.? ;
implement getArea method
this.getArea function
Your code goes here
implement a getCircumference method
this.getCircumference function
Your code goes here
create the Circle object
var circle new Circle;
calculate area, not working yet!
var area circle.getArea;
console.logarea;
calculate circumference, not working yet!
var circumference circle.getCircumference;
console.logcircumference;
Write the same implementation for a rectangle. Note that the constructor
takes two parameters in this case: width and height. There should be two
methods, getArea and getPerimeter.
Like exercise instanciate a rectangle object using the values width
and height then log the area and perimeter to the console.
Browser Control
console.logBrowser Control";
Create a function that:
Opens a popup window that covers roughly one quarter of the current
browser.
a You will need get the window's outer height and outer width, divide
them each by two, and then open a new window using the calculated height
and width values.
b The function should accept an arguement called url. The value of
this argument will be the url of the web page that opens in the popup.
c Add an onclick event to the button below to execute the popup
function. Pass a specific URL in the call.
See console!
IT @ Point Park University
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
