Question: ALL QUESTIONS PLEASE ASAP Part 10 points, 1 points each] True , False FI. True or False? By convention, a class name starts with small

ALL QUESTIONS PLEASE ASAP  ALL QUESTIONS PLEASE ASAP Part 10 points, 1 points each] True
, False FI. True or False? By convention, a class name starts
with small letter. 2. True or False? Constructors initialize data members. True
or False? It is possible to create user-defined classes in Java. True

Part 10 points, 1 points each] True , False FI. True or False? By convention, a class name starts with small letter. 2. True or False? Constructors initialize data members. True or False? It is possible to create user-defined classes in Java. True or False? The body of a method must be surrounded by curly brace 3. 4. 5. True or False? In a class, there can be only one constructor. 6. True or False? The default constructor takes at least one parameter. 7. True or False? A method of a class can call other methods of that same 8. True or False? The return types of accessor (also called getter) method 9. True or False? Every class in Java (except Object) is a descendant of C 10. True or False? Mutator (also called setter) methods take no parameters Part II [30 points, 2 points each] Multiple Choice 1. In the class header public class TV A. public is the access modifier and TV is the name of the class B. public is the name of the class and TV is the access modifier 2. A method of a class can access A. Only the instance variables (data members) of its class B. Only its parameters C. Only the local variables the method defines D. All of the above 3. In the variable stance variable declaration private int value A. the data tyoe acess moldifer, int sthe name of the instance variable, and value is the data type B. acos im ohe name of the instance variable, int is the data type, and value is the access modifier C. private is the instance variableess modifier, nt is the data type, and value is the name of the D. private is the data is instance variablea type, int is the access modifier, and value is the name of the How to use constant E in Math class? 4. A. Math.E B. Math.EO C. new Math).E D. none of the above 5. The data type of the return value of the toString method is A. Object B. boolean C. String D. Class 6. The data type of the return value of the equals method is A. Object B. boolean C. equals D. class 7. A javadoc comment starts with A. I D. 8. Suppose we call a method foo in Xyz class as follows. What is head of foo? String str Xyz.foo(123) A. public String foo(int i) B. public static String foolint i) C. private static String foo(int i) D. public static int foo(String str) 9. static method can cal A. static method directly B. non-static method directly C. neither of the above D. both A and B 10. In Math class, we have the definition of pow method, how to find the result of 2 public static double pow(double a, double b) Returns the value of the first argument raised to the power of the second argument. A Math.pow(2, 3) B. Math.pow(3, 2) C. pow(2, 3) D. new Math0 pow(2, 3) 11. Call the following method to from String class to convert 123 to a string str. public static String valueOf(int i) Returns the string representation of the int argument. A. String.valueOf0) B. int num String.valueOf 123) C. String str String.valueOf(123): D. None of the above 12. What the return type of constructor? A. none B. String C. boolean D. change from one class to another 13. What means method overload? A. Similar functionality B. Same name C. Different signatures (input parameters differ in at least one of the following: ty number, and order) All of the above D. 14. What is the value of 5+6? B. 56 C. "56 D. none of the above 15. What is the value of '5"+ 6? B. 56 C. "56 D. undefined Part IIl [15 points) Short answer questions. 1. Suppose that we have a gift class with description as data member, what is wrong with the following code? public setDescription (String description) f description this.description; 2. Find errors in the following code. public getDescription (String description) ( return description: 3. Find errors in the following code public equals (Object obj) i return obj.description description

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!