Java Using NetBean
Given a cylinder with radius of 5 and height of 8, write a program to calculate the volume of this cylinder. You need to define a constant value PI in your program.

import java.util.Scanner;
class Main
{
static final double PI=3.14;//constant defined
public static void main(String args[])
{
int radius=5,height=8;
double volume=PI*radius*radius*height;
System.out.println("volume of Cylinder is: " +volume);
}//main ends here
}//class ends here
Java Using NetBean Given a cylinder with radius of 5 and height of 8, write a...
Java Using NetBean Design a math method rectArea to calculate rectangle area = width * height. Your main program will get width and height from user and call rectArea for calculation and then the main program will show the final result.
The volume of a right circular cylinder is calculated by Trh where ris radius and his height Write a user-defined MATLAB function to compute the volume given radius and height. For the function name and arguments use Volume - Volume cylinder (Radius, Height). You do not need to call the function, you need to write the function as is would be in your current folder available to be called from a program. The function will take in the indicated inputs,...
Java Programing. Using NetBean Write a program to draw a line connecting two circles. These two circles can be dragged by mouse. And when circles are dragged, the line should be adjusted so that it still connect these two circles (binding property)
Write a program that asks the user to input the radius and height of a cylinder and the unit weight of the material (in pounds per square feet). The program computes the surface area of the cylinder and the total weight of the cylinder. The program uses two functions: One function to read the data from the keyboard, the other function to calculate the surface area and the weight of the cylinder. The weight of the cylinder is printed from...
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...
QUESTION 4 Find the surface area of a cylinder with a radius of 3 and a height of 10. The surface area is TT units (Do not use pi in your answer as it is already written with the units above) QUESTION 5 Find the volume of a cone with a radius of 6 and a height of 8. The volume is IT units (Do not use pi in your answer as it is already written with the units above)...
a) A cylinder has a radius of 0.25±0.2 cm and a height of 0.52±0.3cm. Find the volume of the cylinder and its absolute error. b)Given that x = 5.00±0.02cm, y=8.00±0.04cm. Find the value of ? = ? 8 + 5? and its percent error and absolute error.
using Java The formula to compute the volume of a sphere is: volume = ( 4 3 ) π r 3 where r is the radius of the sphere and π is 3.14159. Assume a variable radius has already been declared (type double) and initialized with the value of the radius of a sphere. Write java statements to do the following: Declare a constant PI and initialize it to 3.14159 Declare a variable volume of type double Calculate the volume...
Java Programing. Using NetBean Write a program to draw a line connecting two circles. These two circles can be dragged by mouse. And when circles are dragged, the line should be adjusted so that it still connect these two circles (binding property)
Using MATLAB
18. A cylinder with base radius r and height h is con- structed inside a sphere such that it is in contact with the surface of a sphere, as shown in the figー ure. The radius of the sphere is R- 11 in. (a) Create a polynomial expression for the vol- / >1 ume V of the cylinder in terms of h. (b) Make a plot of V versus h for 0 shs11 in. (c) Using the roots...