Question: declare and initialize 4 variables with a type of double that will represent 4 side lengths of a quadrilateral ( a 4 sided polygon )
declare and initialize variables with a type of double that will represent side lengths of a quadrilateral a sided polygon Choose appropriate variable names, and choose appropriate initial values for these variables.
b declare and initialize an additional variable of type double to hold the sum of the side lengths this is the perimeter
c declare and initialize an additional variable of type double to hold the average of the side lengths. the average is the sum of the side lengths, divided by the number of sides, in this case
d write a java statement to print out a message that shows the average side length. Do not print just the average, print meaningful text along with the average
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
