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

1. A class can have more than one constructor (true or false (4 pts.) 2. A const

ID: 3668734 • Letter: 1

Question

1. A class can have more than one constructor (true or false (4 pts.) 2. A constructor has the same name as the class (true or false) (4 pts.) 3. Circle the keyword below that is used to instantiate an object: (4 pts.) a. get b. set C. new d. static 4. In a class' API, we see this method: (3 pts. each) void foo a. what is the method name? b. how many arguments does the method take? c. does the method return a value? 5. In the same class, we also see this method API: (3 pts. each) double foo Bar int a a. How many arguments does this method take? b. What is the data type of the argument? c. What is the data type of the return value?

Explanation / Answer

Answers:

1. True

2. True

3. (c) New

4. (a) a method without return type, without arguments

   (b) Zero

   (c) No

5. (a) 1

(b) int

   (c) double

6. Student s = new Student("Kumar",6000);

7. s.getName();

8. s.getCredits();

9. s.getStudentYear();

10. Student s1 = new Student();

11. s1.setName("Marybeth");

12. ABCDEFGHIJ

13. cms 167

14. 6

15. um

16. A

17.

18.

19. java.util

20. java.lang