Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.(TCO 1) The.javaextension on a file means that the file(Points : 6) contains Java source code. contains HTML. is produced by the Java compiler

image text in transcribedimage text in transcribed

1.(TCO 1) The.javaextension on a file means that the file(Points : 6) contains Java source code. contains HTML. is produced by the Java compiler (javac). contains a machine specific executable image. 2.(TCO 1) Every Java application is required to have(Points : 6) at least one public static method called main. at least one data member. a String variable which holds the name of the application. a content pane and several GUI components. 3.(TCO 1) Which is a correct way to invoke the static method sqrt of the Math class? (Points : 6) sqrt(900); math.sqrt(900); Math.sqrt(900); Math math = new Math(); math.sqrt(900); 4.(TCO 1) Which line below creates a String object that displays the value of current to 3 decimal digit accuracy, given voltage and resistance variables which are of type double? (Points : 6) String res = 2.28 (Diameter, Circumference and Area of a Circle) Here's a peek ahead. In this chapter, you learned about integers and the type int. Java can also represent floating-point numbers that contain decimal points, such as 3.14159. Write an application that inputs from the user the radius of a circle as an integer and prints the circle's diameter, circumference and area using the floating-point value 3.14159 for it. Use the techniques shown in Fig. 2.7. [Note: You may also use the predefined con- stant Math. PI for the value of it. This constant is more precise than the value 3.14159. Class Math is defined in package java.lang. Classes in that package are imported automatically, so you do not need to import class Math to use it.] Use the following formulas (r is the radius): diameter 2r circumference - 2r area-Tr larion in a variable. Rather, specify each calculation as the value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles of Incident Response and Disaster Recovery

Authors: Michael E. Whitman, Herbert J. Mattord, Andrew Green

2nd edition

1111138052, 9781285712628 , 978-1111138059

More Books

Students also viewed these Computer Network questions

Question

=+b) What was the purpose of using Major as a blocking factor?

Answered: 1 week ago