Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. In a call to a method in another class, the method name is usually preceded b

ID: 3590534 • Letter: 1

Question

1. In a call to a method in another class, the method name is usually preceded by another word and a dot. What is this other word: a) when the method is a class method? b) when the method is an instance method? 2. Using Java API methods saves programming time and improves program quality. (T/F 3. All Java API methods are class methods. (T/F) 4. What does this statement do? import java.util. [Don't just say, "It imports java util." Explain with different words. void). What does that type name tell you? Assuming that x, y, and z are double variables, write Java statements that implement these 5. In all Java API method headings, the method name is preceded by the name of a type (or the word 6. mathematical operations: z square root of y c) b) z sin(x), where x is in degrees. 7. Assuming stringVal is a String variable that contains a string representation of an int number, and intVal is an int variable, write a Java statement that converts what's in stringVal to an int and then assigns it to intVal. Write a Java expression that evaluates to true if and only if a character, ch, is an alphabetical lowercase letter. 8. 9. Given the initialization: String rachelcarson "if, knowing, we have concluded that we are being asked" + " to take senseless and frightening risks; we should" + " look about and see what other course is open to us." Write a Java code fragment that inserts-just before the semicolon inside the above text- the following additional text: String insert = ", then we should no longer accept the counsel of those" + "who tell us that we must fill our world with" + "poisonous chemicals" 10. Declare and initialize a format specifier string called format, so that it specifies an arbitrary string, a tab, a dollar sign, and a floating point number. The floating point number should include comma separators between every three integer digits and two decimal places to the right of the decimal point. Then, use this specifier in aprintf statement to output the string label, "transmission", and the dollar amount, $4,388.69, like this: transmission $4,388.69

Explanation / Answer

If you post more than one question, as per chegg guidelines I have to answer only the first one.

1.

(a) The word used is the class name.

(b) Instance methods are called by the objects. Hence, the word the the object name or reference.

e.g: Double ob = new Double()

Here, ob is the object name.