CPSC2150 Final Exam Review 2024 Graded A+
CPSC2150 Final Exam Review 2024 Graded A+ What should be included in a user story? - Answer-The role of the user, the action the user will take in the system, and the benefit to the user Can the system itself be in a user story? - Answer-No Which of the following are examples of non-functional requirements? A. The system should run on Unix B. The system must be written in Java C. The user is able to view the status of their order D. As a customer, I can place an order on the website, so I can place an order without having to call the store - Answer-A. The system should run on Unix B. The system must be written in Java What are the three parts of a UML class diagram? - Answer-The name, attributes, and methods of a class (T/F) If you are creating a UML class diagram for a person, and that person will have multiple phone numbers, the data type of the "PhoneNumber" attribute should be a list or an array. - Answer-False Which symbol is used to show that a method or attribute is private? - Answer-"-" Which symbol is used to show that an attribute or method is package visible? - Answer- "~" Which symbol is used to show that an attribute or method is public? - Answer-"+" (T/F) In a UML Activity diagram, an "Activity" can be something that would take multiple lines of code to write, as long as it does not require and decisions - Answer-True (T/F) In a UML Activity Diagram, an "Activity" cannot be a call to another function - Answer-False (T/F) In a UML Activity Diagram, the text inside of an "Activity" or a "Decision" has to be written in code. - Answer-False (T/F) In a UML Activity Diagram, a "Decision" may have multiple paths leaving it. - Answer-True (T/F) Drawing UML diagrams is an important part of our design process. - Answer-True Who is responsible for making sure the precondition of a method is true? - Answer-The implementer of the client code that calls the method Who is responsible for making sure the postcondition of a method is true - Answer-The implementer of the method At which times is it safe to assume that the invariants are true? - Answer-After the constructor of the class has completed, at the very beginning of a public method, and right after a public method has finished (T/F) It is a best practice to have an if statement at the beginning of each method implementation to check that the preconditions are true - Answer-False Every single class in Java extends the ___________________________ class - Answer-Object If you do not override the toString method in a class that you create, what will happen when you call toString on an object of that class? - Answer-A string showing the memory address will be returned What Java operator will tell us whether or not an object's data type is a certain class - Answer-instanceOf Packages in Java allow us to have... A. An array with different datatypes in it B. A logical structure and grouping of classes C. An opportunity to reuse the names of a class since it will be in a distinct package D. Another layer of encapsulation by encapsulating classes together - Answer-B. A logical structure and grouping of classes C. An opportunity to reuse the names of a class since it will be in a distinct package D. Another layer of encapsulation by encapsulating classes together (T/F) A class can be in multiple packages. - Answer-False In Java, if you do not specify a visibility level for a class, the visibility level will be ________________________________ - Answer-package A static member belongs to the ______ - Answer-class (T/F) You can call a static member of a class without creating an instance of that class, by calling it directly from the class name. - Answer-True If you have a reference type variable called foo that is declared final, which of the following cannot change?
Written for
- Institution
- CPSC 2150
- Module
- CPSC 2150
Document information
- Uploaded on
- February 27, 2024
- Number of pages
- 59
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cpsc2150 final exam review 2024 graded a