and Answers Latest Updated (Graded A+)
INTRO TO CP HYBRID QUIZZES REVIEW
HYBRID 1
1. What is required inside the multi-line comment block (/* */) you place at the top of each
source code 1le in this course?
Answer: My full name, my professor’s name, due date, last modi1ed date, description of the
program.
2. Eclipse stores all of your projects inside a workspace folder.
3. Is a dedicated installer required for Eclipse, or can it be downloaded as a Zip archive?
Answer: Eclipse can be downloaded as a Zip archive, an installer is not required.
4. When working in Eclipse, to edit and compile code you use the Java Perspective.
5. After creating a project in Eclipse, and adding .java 1les they are located in the projects src
folder.
HYBRID 2
1. How do you set a breakpoint in Eclipse?
Answers:
➢ double click on the margin on the left side of the source code view.
➢ right-click on the margin on the left side of the source code view and select toggle
breakpoint in the drop-down menu.
➢ use the Run menu, and select toggle breakpoint from the menu.
2. What was the actual value inside the sum when we would expect 0.8 to have been assigned?
(refer to the hybrid 2 activity).
Answer: 0.7999999999999999
3. If you accidentally step into an API method, like System.in, what action(s) could you perform
to return to your own code and / or exit the debugging session?
Answers:
➢ Use the Resume button so the program runs to completion
➢ Use the Red Terminate button to end the program
➢ Select the method name matching my method that I was debugging in the Debug View
(far left side of screen), then use step over.
4. What was the actual value inside the sum when we would expect 0.3 to have been assigned?
(refer to the hybrid 2 activity).
, Answer: 0.30000000000000004
5. What was the output from the program in the hybrid 2 activity?
Answer: 0.9999999999999999
HYBRID 3
1. What is the diagram type we are learning to use in UMLet?
Answer: UML Class Diagram
2. What is the name of the template item for creating a simple UML class diagram?
Answer: SimpleClass.
3. What is the default 1le extension for UMLet diagrams?
Answer: .uxf
4. How do you add a horizontal line in a UML Class Diagram in UMLet?
Answer: you can enter two hyphens in the properties for the diagram, then hit enter
5. What was the mistake in the sample solution for class Car? (See appendix in Hybrid 03
handout).
Answer: the get method for model was returning the value of the make variable
HYBRID 4
1. What's the diIerence between double and Double?
Answer: double is a primitive data type initialized via an wrapper class initialized via
autoboxing.
2. What data type does the format speci1er %s work with?
Answer: String
3. What data type does the format speci1er %d work with?
Answer: int
4. What data type does the format speci1ed %f work with?
Answer: Roating numbers or double
5. What does %n do when used in a format String?
Answer: write an operating system appropriate line terminator into the output
\n vs %n:
HYBRID 05
1. What's version control?
Answer: Version control software tracks changes to 1les so that you can easily revert to older
versions of the 1les if needed
2. Who created Git?
Answer: Linus Torvalds
3. What's Git?