Write the Java code for the calculareDiameter method.

Answers

Answer 1

Answer:

* Program to find diameter, circumference and area of circle.

*/

import java.util.Scanner;

public class Circle {

   public static void main(String[] args) {

       // Declare constant for PI

       final double PI = 3.141592653;

       Scanner in = new Scanner(System.in);

       /* Input radius of circle from user. */

       System.out.println("Please enter radius of the circle : ");

       int r = in.nextInt();

       /* Calculate diameter, circumference and area. */

       int d = 2 * r;

       double circumference = 2 * PI * r;

       double area = PI * r * r;

       /* Print diameter, circumference and area of circle. */

       System.out.println("Diameter of circle is : " + d);

       System.out.println("Circumference of circle is : " + circumference);

       System.out.println("Area of circle is : " + area);

   }

}


Related Questions

Write the following numbers in binary. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 46. 55. 61.​

Answers

0 1 10 11
Explanaition:

What is the different type of secondary memory of a computer system.? explain

Answers

Explanation:

Solid state storage devices

optical storage devices

magnetic storage devices

which computer are used by mobile employees as Meter readers.​

Answers

Explanation:

handheld computers

Some handheld computers have miniature or specialized keyboards. Many handheld computers are industry-specific and serve the needs of mobile employees, such as meter readers and parcel delivery people, whose jobs require them to move from place to place.

Class B { Public: Void b1(); Protected: Void b2(); }; Class A : public B { Public: Void a1(); Protected: Void a2(); }; Class C: public A { Public: Void c1(); }; Void main () { B temp1; A temp2; C temp3; } a) Name all member functions of all classes visible through temp1 in the main function? b) Name all member functions of all classes visible through temp2 in the main function? c) Name all member functions of all classes visible through temp3 in the main function? d) Which class is the parent of class A? e) Which class is the child of class A?​

Answers

Answer:

write the questions a little clear we can't read it

Can someone compress this ipv6 address? 558c:0000:0000:d367:7c8e:1216:0000:66be

Answers

558c::d367:7c8e:1216:0:66be

Suppose you and four of your friends are wirelessly connected with the home wireless router. [03] At this moment router is not transmitting data to the outgoing link and all of you want to browse internet and send packets of same size to the router. Consider the bandwidth of the outgoing link is20Mbps , packet size is 2500 bytes and the processing delay of each packet is
2μs . If your packet is queued at position eleven, calculate the delay after which your packet will be transmitted

Answers

format please? i cant understand

What is touch pad ? Computer class four

Answers

Answer:

A touch pad is an input device used for pointing on a computer display screen.

Who innovated an aeroplane? ​

Answers

Answer:

White brothers!!

Explanation:

so in media literacy,
what roles do confirmation bias, stereotyping, and other cognitive biases impact how we interpret events, news, and information? ​

Answers

Answer:

Confirmation biases impact how we gather information, but they also influence how we interpret and recall information. For example, people who support or oppose a particular issue will not only seek information to support it, they will also interpret news stories in a way that upholds their existing ideas.

If Scheme were a pure functional language, could it include DISPLAY ? Why or why not?​

Answers

Answer:

When Scheme is a pure functional language, it cannot include the function DISPLAY. Since the pure functional languages will return the same value whenever the same expression is evaluated, and the DISPLAY would be the output and thus it cannot be part of the purely functional language. Thus in the pure functional language we can evaluate the expressions with the same arguments and it returns the same value since there is no state to change.

Explanation:

I need someone to explain gor me python coding!

Answers

Answer:

Explanation:

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general purpose language, meaning it can be used to create variety of different programs and isn't specialised for any specific problems

3 type of keyboarding

Answers

Answer:

Mechanical Keyboards, Wireless Keyboards and Projection Keyboards

Explanation:

hope it helps

Input two numbers and work out their sim, subtraction, multiplication, division, remainder, average and sum of the squares of the numbers.

Answers

def ultimate_math (num1, num2):

try:

array_num = [num1, num2]

print (num1 + num2)

print (num1 - num2)

print (num1 * num2)

print (num1 / num2)

print (num1 % num2)

print ((num1 + num2) / (len(array_num)))

print ((num1**2) + (num2**2))

except ValueError:

return "Invalid Input"

user_num1 = float (input (" Please enter a num: "))

user_num2 = float (input (" Please enter a second num: "))

print (ultimate_math (user_num1, user_num2))

Kith Smallest Number Real World Example

Hello!

What are five reasons why one would need to find the kth smallest number of an array? Also known as the Selection Problem.

I'm looking for 5 real world examples.

Will definitely give brainliest!


The Selection Problem is a problem where we must find the kth order statistic of a given array. As in, we must find the largest kth number. For example, if our array is [1, 3, 4, 5, 9], and k = 3, we would want to find the 3rd largest number, so our algorithm should output the number 4.

Answers

Answer:

A new coffee shop is being built. Its location is the reflection of the arcade's coordinates across

the y-axis. Which procedure will find the correct distance between the arcade and the new coffee shop

why is Touchpad used in the laptop computer​

Answers

Answer:

in controlling the mouse or cursor

Explanation:

as is it known tha a cursor is a poniting device. and the only way to control it without a mouse is the touchpad

1011111 ÷ 11 in numerical​

Answers

Answer:

91919.18182

Explanation:

Answer:

91,919 .1

HOPE IT HELPS .

Write a Visual Basic Program to display factorial series upto nth term 1! 2! 3! 4! ...!

Answers

Answer:

n = n(n-1)!

Explanation:

expanding the factorial we get;

1!=1.

2!=2x1.

3!=3x2x1.

4!=4x3x2x1.

5!=5x4x3x2x1.

we can rewrite the above factorials as:

1!=1

2!=2!

3!=2!x3

4!=4x3!

5!=5x4!

the pattern applies such that if we have n th number we get it's factorial as;

n = n(n-1)!

viết chương trình hoàn chỉnh các yêu cầu sau:
a. Định nghĩa hàm có tên là PSTG(), có hai tham số kiểu nguyên x và y hàm trả về giá trị phân số x/y ở dạng tối giản.
b. Gọi hàm đã định nghĩa ở trên trong hàm main () để in lên mà hình một phân số x/y ở dạng tối giản, với x và y được nhập từ bàn phím.

Answers

Explanation:

the perimeter of an aluminium sheet is 120 CM if its length is reduced by 10% and its breadth is increased by 20% the perimeter does not change find the measure of the length and the breadth of the sheet

What is the output of this Python program, if the user types 3 as input?

Answers

0 1 2 will be the output of the function

will social media lose its relevance?​

Answers

Judging from it's prevalence and popularity, there will be a long way to go until people start to lose interest with expressing themselves online. So no, social media will not lose its relevance, but maybe when technology is dead, then it will.

what dose the following tool's do?
1-caption
2-back color
3-font
4-alignment​

Answers

Caption:it is used to display speaker's name and describe relevant sounds that are inaccessible to people of hard hearing or who are deaf

Back color: it is used to fill a section's interior. it contains numerical expressions that corresponds

Font: it is used to add style to a document or webpage

Alignment: it is used to describe how text is placed on a screen.

If you like my answer,mark as brainliest

consider a hard disk with the following specifications :
3.5 in diameter

Answers

Answer:

usable capacity = 10 GB

Number of cylinders = 256

Block size = 4 KB

(1)Bytes in each cylinder = (10*230)/(256) = (10*222) = 40 MegaBytes

(2)Number of Blocks in each cylinder = (10*222)/(212) = 10K

(3)capacity of one track = 40 MegaBytes/(10*2) = 2 MB

Rotation speed = 3840 RPM

Number of rotations per second = 3840/60 = 64

Transfer rate = (2*64) = 128 MB/sec

Explanation:

computer in education are used for teaching and learning aids​

Answers

i think the answer is 9 but my head really hurt so i’m not sure

Suppose a Huffman tree is to be built for 5 characters. Give a set of 5 characters, and their distinct probabilities (no duplicates), that would result in the tallest possible tree. Show the tree. Derive the average code length: write the expression, you don't have to simplify it down to a single value.

Answers

I love chipotle do you live chipotle

fill in the blank with the correct response

Answers

Answer:

regenerates

Explanation:

a hub regenerates it's signal bit by bit as it travels down the physical medium

How teachers apply stenhouse theory

Answers

Answer:

In curriculum, a vision of knowledge, the role of the educator and a concept of the process of education are all present. In this sense, Stenhouse suggests that the role of teachers and professors is fundamental in the elaboration and implementation of curriculum.

how do you copy a file​

Answers

Answer:

right click and press control c

Which one is the result of the ouWhen you move a file to the Recycle Bin, it will be immediately deleted from your computer.

A. True

B. Fals

Answers

Answer:

B => false

Explanation:

it just keep it on recycle bin => not being removed

False

Explaination :

The deleted file will stay in Recycle Bin for a short period of time before it's permanently deleted from your computer

Algorithm
Read marks and print letter grade according to that.

Answers

Answer:

OKAYYYY

Explanation:

BIJJJJJJJSGJSKWOWJWNWHWHEHIWJAJWJHWHS SJSJBEJEJEJEJE SJEJBEBE

In what tab can a user find the workspace option?

Answers

D. View.
You can find the workspace and preview of the file in View.
Other Questions
anyone know if its a b c or d? Yemi earns 8000naira a month and Bisi earns 6000naira a month. Find the ratio between their income. WILL MARK BRAINLIEST !! find the coordinates F after a dilation about the origin of 2.5 write your answer in AB form root (b) A sugarcane is monocotyledon; therefore it has _______________________ root Why manual task/handling is important? given m(n)=2n^2-10n-14,find m(4)+m(-1) What is one Pascal pressure? What is its unit? write the balanced chemical equation for the following word equation. sodium+sulphate Acidsodium sulphate +hydrogen I dont know if I get this right so can someone correct it or check it ? What were the aims of the Civil Rights Movement? Match each word to know with its definition.scarcitysomething that leads to a resultbirth ratea number showing how many babiesare born at a certain place or timefactora population so dense that it harmsthe environment or quality of lifelife expectancyhow long the average person isexpected to liveoverpopulationthe state of not having enoughsupplies Ex3 :Use the correct passive form of these1. An island ............. by water ( cover )2. I ..... to the party last night but I didn't come ( invite )3. Mary accidents ........ by reckless driving ( cause )4. A new dormitory .... in the university campus now. ( build )5. Thank goodness ! My jewelry ........... in the robbery last night ( steal / not ) A woman deposit $600 into an account that pay 5 1/4% interest per year. How much interest will she recieve in one year ? I need help with coming up with a thesis for Wonder Woman and Black Panther, I want the focus to be about each of their compassion I just don't know how to piece together a good thesis statement for my essay. Pls help thank u :) factorisation of 4x^2-5x-1 Why an apple and a glass of milk can give you more nutrition as compared to the milk shake Prepared from apple and milk. Justify it based on the physiology of GIT. Which of the following is the same for both Senators and Representatives?1. The number of years they serve per term.2. The number of times they can be re-elected.3. The minimum age at the time of their election.4. The length of time they have been US citizens. How did the crocodile end up being a guest at his house? You drop a book on your foot. Immediately, you feel a sharp, stinging pain. Pain fibers called __________ are responsible for this sensation. Then, about a minute later, you feel a dull, lingering pain. Pain fibers called __________ are responsible for this sensation. What is the value of x in the equation -2/3x+9 = 3/4x-3?