CPSC 2150 Final Review ||with A+ Guaranteed Solutions.
Some important differences between Java and C++ include... correct answers 1. Every class in Java can have its own main function 2. Everything in Java is inside a class 3. Since Java runs in its own virtual environment, the same Java code can run on any operating system What are the three parts of a UML class diagram? correct answers 1. The methods of the class 2. The name of the class 3. The attributes of the class Which of the following can be in an Abstract Class? correct answers 1. any type of private methods 2. public methods with a body (non-abstract) 3. public abstract methods 4. private data variables A _______________ can extend a ______________ in java (order matters) correct answers 1. interface, interface 2. Class, Abstract Class 3. Class, Class When running Java code on Unix, what determines what directory our code file needs to be located in? correct answers The name of the package At which times is it sage to assume that the invariant of a class is true? correct answers 1. After a public method has finished 2. At the beginning of a public method 3. After the constructor for the object has completed Which symbol is used to show that an attribute or method is package visible in UML? correct answers ~ Every single class in Java extends the ______________ class correct answers object When the final keyword is used on a reference variable (of type Foo), which of the following are true about that reference variable? correct answers 1. The reference (memory location) cannot change 2. The value of the referenced object can change Who is responsible for making sure that the postcondition of a method is met? correct answers The implementer of the method In order to run your code in IntelliJ you need to create a ____________ correct answers Build Configuration Who is responsible for making sure that the precondition of a method is met? correct answers The client that calls the method
Written for
- Institution
- CPSC 2150
- Course
- CPSC 2150
Document information
- Uploaded on
- March 25, 2024
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
some important differences between java and c in
Also available in package deal