100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CPSC 1110 Final Exam Verified Study Questions And Answers $12.49   Add to cart

Exam (elaborations)

CPSC 1110 Final Exam Verified Study Questions And Answers

 0 view  0 purchase
  • Course
  • CPSC 1110
  • Institution
  • CPSC 1110

CPSC 1110 Final Exam Verified Study Questions And Answers

Preview 2 out of 10  pages

  • November 7, 2024
  • 10
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CPSC 1110
  • CPSC 1110
avatar-seller
ElevatedExcellence
CPSC 1110 Final Exam Verified Study
Questions And Answers
All of its features are related to the concept that the class represents. CORRECT
ANSWERS Under which of the following conditions would the public interface of a class
be considered cohesive?

a) All of its features are public and none of its features are static.
b) All of its features are related to the concept that the class represents.
c) The quality of the public interface is related as moderate to high.
d) It is obvious that the public interface refers to multiple concepts.

A method and its caller. CORRECT ANSWERS Pre- and postconditions may be viewed
as a contract between which of the following parties?

a) A method and its caller.
b) a class and its interface.
c) A method signature and its implementation.
d) An object and its class.

If it is not met, the method is not responsible for computing the correct result.
CORRECT ANSWERS Which of the following statements is true regarding the
precondition of a method?

a) It is a suggestion to the caller of the method regarding method input values.
b) It guarantees the object will be in a certain state after the method call is completed.
c) If it is not met, the method is not responsible for computing the correct result.
d) It limits the potential data type of the parameter variables.

Dependency between classes. CORRECT ANSWERS What is coupling?

a) Coupling is an inconsistent design pattern
b) For every subclass, we have at most one superclass.
c) Dependency between classes.
d) Coupling suggests that a class will run slowly.

A guarantee that the object is in a certain state after the method call is complete.
CORRECT ANSWERS Which of the following statements describes one aspect of a
postcondition?

a) A logical condition in a program that you believe to be true.
b) A requirement that the caller of a method must meet.
c) A set of criteria defined by the caller of a method.
d) A guarantee that the object is in a certain state after the method call is complete.

, A subclass may inherit methods and instances variables from its superclass, and may
also implement its own instance variables. CORRECT ANSWERS Which of the
following is true regarding subclasses?

a) A subclass that inherits methods from its superclass may not override the methods.
b) A subclass that inherits instance variables from its superclass may not declare
additional instance variables.
c) A subclass may inherit methods or instance variables from its superclass but not
both.
d) A subclass may inherit methods and instances variables from its superclass, and
may also implement its own instance variables.

The subclass must simply use the name of the superclass instance variable. CORRECT
ANSWERS What must a subclass do to modify a protected superclass instance
variable?

a) The subclass must simply use the name of the superclass instance variable.
b) The subclass must declare its own instance variable with the same name as the
superclass instance variable.
c) The subclass must use a public method of the superclass to update the superclass;s
private instance variable.
d) The subclass must have its own public method to update the superclass's protected
instance variable.

A subclass has no access to private instance variables of its superclass. CORRECT
ANSWERS Which of the following is true regarding subclasses?

a) A subclass has access to private instance variables of its superclass.
b) A subclass has no access to private instance variables of its superclass.
c) A subclass does have access to public instance variables of its superclass.
d) A subclass must specify the implicit parameter to use methods inherited from its
superclass.

The subclass's instance variable is said to shadow the superclass's variable.
CORRECT ANSWERS If a superclass and a subclass both have an instance variable
with the same name, which statement is true?

a) The superclass's variables will be affected if the subclass code updated the variable.
b) Both variables will be affected if the sibclass code updates the variable.
c) The subclass's instance variable is said to shadow the superclass's variable.
d) The superclass's instance variable is said to shadow the subclass's variable.

Must use the same method name and the same parameter types. CORRECT
ANSWERS To override a superclass method in a subclass, the subclass method....

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ElevatedExcellence. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

81113 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.49
  • (0)
  Add to cart