CS 180 Fall 2023 Final QUESTIONS AND ANSWERS
An algorithm must be "complete". What does this mean? correct answer: A. It must give the right answer(s). -- This means that it is correct. B. It must handle anything that comes up. -- This means that it is complete. || CORRECT ANSWER C. It must end, i.e., not run forever. -- This means that it will end. D. It must be understandable to the person who or machine that is going to execute it. -- This is true, but not what "complete" means. E. It must be written in a programming language. -- Not necessary. Algorithms are stated in lots of languages. In class Robot is a method that begins... public static void main(String[] args) { Which best describes method main()? correct answer: A. Method main() is where program execution begins. -- Without a main method, your class is not a program.||CORRECT ANSWER B. Method main() is the Constructor method of class Robot. -- That would be named Robot (the name of the class). C. Method main() must be the only method in class Robot. -- There can be lots of methods in class Robot. D. Method main() must be where all input/output is done. -- Input/output can be done in any methods in class Robot. E. Method main() must be the first method at the top of class Robot. -- The main method can be anywhere in the set of methods.
Written for
- Institution
- CSC - Cyber Secure Coder
- Course
- CSC - Cyber Secure Coder
Document information
- Uploaded on
- May 18, 2023
- Number of pages
- 12
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cs 180 fall 2023 final questions and answers
Also available in package deal