Clemson CPSC 2150 Exam 1 & Exam 2
QUIZ: Who is responsible for making sure that the postcondition of a method is met? a. The client that calls the method b. The implementer of the method c. Neither the client not the implementer is responsible d. Both the client and the implementer are responsible ANS ; b. The implementer of the method QUIZ: You have a class called MyStats that has a method called myAverage that takes in an array and returns the average of the values in the array, In another code file and package you call myAverage on an array called arr with: Double avg = mySAverage(arr) Which of the following have to be true in order for this code to work? a. myAverage must be a public method b. myAverage must be a private method c. myAverage must be a final method d. myAverage must be a static method ANS ; a. myAverage must be a public method d. myAverage must be a static method
Written for
- Institution
- CNA - Certified Nursing Assistant
- Course
- CNA - Certified Nursing Assistant
Document information
- Uploaded on
- February 13, 2024
- Number of pages
- 17
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
clemson cpsc 2150 exam 1 exam 2