CPSC 310 Review - Design Principles || with Accurate Answers 100%.
4 views 0 purchase
Course
CPSC 310
Institution
CPSC 310
design principles correct answers high level guidelines to ensure designs are robust
coupling correct answers a measure of the strength of the connection between two program methods
T/F strong coupling is desirable correct answers False
T/F coupled code makes it easier for errors in one pa...
CPSC 310 Review - Design Principles || with Accurate
Answers 100%.
design principles correct answers high level guidelines to ensure designs are robust
coupling correct answers a measure of the strength of the connection between two program
methods
T/F strong coupling is desirable correct answers False
T/F coupled code makes it easier for errors in one part of the system to propagate to another
unrelated part correct answers True
T/F tightly coupled code is easy to reuse than loosely coupled ones correct answers False
T/F it is harder to understand a source code element that is coupled wiht other elements correct
answers False
increase or decrease coupling? minimize the number of interfaces between elements correct
answers decrease
increase or decrease coupling? having more complexity of interfaces correct answers increase
increase of decrease coupling? avoiding control flow contraints that exist between modules
correct answers decrease
data coupling correct answers occurs when classes share data through simple primitive
parameters
stamp coupling correct answers occurs when classes are coupled through data structures
control coupling correct answers occurs when a caller controls the flow of computation within
another unit
global coupling correct answers occurs when classes share global variables
content coupling correct answers occurs when the internal state of one unit is modified by
another unit
cohesion correct answers measures how well elements within a class belong together to perform
a unify task
functional cohesion correct answers code contributes to a single well defined task
, sequential cohesion correct answers arises when operation within a method transform output
from one step and use it as input in the next step
communication cohesion correct answers arises when different tasks are grouped together within
a method only because they work on the same data
procedural cohesion correct answers arises when specific execution sequence happens that is
largely driven by control flow (and not data flow)
temporal cohesion correct answers arises when functionality is grouped only because it happens
at the same point in the execution of the system (and not because functionality itself is related)
logical cohesion correct answers arises when different pieces of functionality are combined
because they contribute to the same task, even when the intent of these pieces are different
coincidental cohesion correct answers arises when functionality is arbitrarily grouped together
we want _______ coupled and _____ cohesive systems
T/F couple and cohesion go hand in hand because because high coupling always indicates low
cohesion, and vice versa correct answers False
T/F couple and cohesion go hand in hand because because they are both related to how easy
systems are to understand and evolve correct answers True
T/F couple and cohesion go hand in hand because they are the only two ways to measure the
quality of our abstractions correct answers False
Suppose you are doing a code review for a system being used to track inventory in department
stores. After inspecting several different classes, you notice that all of these classes access a
variable named waitTime, even though they have very different responsibilities.
What type of coupling is this scenario most likely an example of? Is this a problem that you
should at least consider refactoring?
A. data coupling
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 FullyFocus. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.69. You're not tied to anything after your purchase.