stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
CSE3PSD / CSE5008 Semester Review (part 1 of 2)! Flashcards | StudBud
Explore
/
CSE3PSD / CSE5008 Semester Review (part 1 of 2)!
CSE3PSD / CSE5008 Semester Review (part 1 of 2)!
40 terms
·
StudBud Administration
·
402 plays
Imported from external platform
Flashcards
40 cards
F
Practice quiz
P
Host live
L
Questions
40
Answers
1
If a Circle is a Shape, and I store a Circle in a Shape variable, this is an example of...
Inheritance
Encapsulation
Abstraction
Polymorphism
2
When two modules have completely different purposes, they are said to be _________.
Orthogonal
Fragile
Biographical
Cohesive
3
The Liskov Substitution Principle, named for Turing Awardee Barbara Liskov, is most associated with...
Refactoring
Encapsulation
Polymorphism
Clean code
4
When making a change to one class requires changes to be made in a seemingly unrelated class, this is a sign of...
Fragility
Rigidity
Immobility
Viscosity
5
Which of the following best describes how Large Language Models such as ChatGPT generate their answers?
Probabilistic selection of the most likely next word
Asking Sam Altman
Translating the input into a programming language
Human-like reasoning and understanding
6
In the context of software development, DRY means...
Document Read Yield
Don't Repeat Yourself
Dry, but in ALL CAPS.
Don't Ransack Younglings
7
If a single interface is being used for multiple orthogonal purposes, that likely violates the...
Liskov Substitution Principle
Single Responsiblity Principle
Interface Segregation Principle
Open-Closed Principle
8
The Open-Closed Principle states that classes should be "Open for extension, but closed for ___________."
Encapsulation
Modification
Interaction
Abstraction
9
A function reads a file, processes the data in it, and writes it to a different file. Which SOLID principle is violated?
Open-Closed Principle
Dependency Inversion Principle
Interface Segregation Principle
Single Responsibility Principle
10
Which SOLID principle can be restated: "Depend upon abstractions; do not depend upon concretions."
Liskov Subsitution Principle
Single Responsibility Principle
Open-Closed Principle
Dependency Inversion Principle
11
What is the term, associated with refactoring, for a sign that a passage of code could perhaps be improved?
Ticket
Code smell
Compiler error
Logic error
12
When code to solve a particular problem appears in various different places in a solution, this may be a sign of code...
Fragility
Rigidity
Immobility
Viscosity
13
Which of the following scenarios may violate the Liskov Substitution Principle? (Assume B is a subclass of A)
B inherits all data and behaviour from A without modification.
B overrides a method from A.
B has additional data members.
B implements an addtional method.
14
Which of the following statements about software development is TRUE?
Agile is always preferred to waterfall.
It doesn't matter whether you use agile or waterfall.
Waterfall is always preferred to agile.
It depends on context; they have different strengths and weaknesses.
15
When your codebase is already good, so you are encouraged to continue good behaviours, this is a sign of positive...
Viscosity
Rigidity
Immobility
Fragility
16
When you model a system's behaviour in code, you are engaging in...
Polymorphism
Encapsulation
Abstraction
Inheritance
17
When I say something like, "Let the code tell you what it needs," I mean
Create a quick and dirty solution that works and refactor as needed
"Use the Force, Luke."
Some hippy-dippy nonsense
Ask ChatGPT how to solve it
18
Which of these is the "Nobel Prize of Computing"?
McDonald's All-American Award
Fields Medal
Australian of the Year
Turing Award
19
When a bit of code is highly cohesive, it probably abides by the ...
Dependency Inversion Principle
Liskov Substitution Principle
Interface Segregation Principle
Single Responsibility Principle
20
What is NOT a practice associated with "clean code?"
Short functions
Incremental improvement
Informative variable/function names
Extensive commenting
21
Which SOLID design principle emphasizes that subclasses should be substitutable for their base classes?
Dependency Inversion Principle
Single Responsibility Principle
Liskov Substitution Principle
Open-Closed Principle
22
"Red, green, refactor" is a common shorthand for what style of development?
Test-driven development
Pair programming
Waterfall model
Extreme Programming (XP)
23
When a class gets some of its behaviour or state from its parent class(es), this is known as...
Polymorphism
Encapsulation
Inheritance
Abstraction
24
A set of best practices for C++ development can be found in
Your local library
Refactoring: Improving the Design of Existing Code
Design Patterns: Elements of Reusable Object-Oriented Software
the CPP Core Guidelines
25
When the elements (data or behaviours) within a module are closely related, the module is said to have high ________.
Orthogonality
Abstraction
Cohesion
Functionality
26
Which of these refers to the practice of restructuring code without changing its behaviour?
Refactoring
Debugging
Interpreting
Adding features
27
In C++, what do the Rule of Zero/Three/Five refer to proper use of?
Constructors and destructors
For and while loops
Integer and floating point numbers
Polymorphic types
28
Which of these is NOT one of the SOLID design principles?
Liskov Substitution Principle
Single Responsibility Principle
Dependency Inversion Principle
Input-Output Principle
29
Which of these is considered a code smell?
A function that accepts many parameters
Private methods in a class
Well-named variables
Code that takes a long time to run
30
Why shouldn't you rely on comments to document your code?
Comments appear in one place, good names apply everywhere.
Asserts (and similar) enable the compiler to assist you; comments don't.
Comments can get "out of sync" with the associated code.
All of the above.
31
Which of these is a code smell associated with extensive use of literal values in code?
Message chain
Magic numbers
Long method
Duplicate code
32
In the context of software development, YAGNI means...
Younglings, Anakin! Go Numb Inside!
You Aren't Gonna Need It
Your Application Got No Input
Yes, And! Great Notion for Improvisation
33
Which of the following statements about test-driven development is FALSE?
It is an agile development practice.
It involves tests being written before the associated production code.
It decreases productivity.
It generally results in high test coverage.
34
Which OOP concept is best described as "information hiding?"
Polymorphism
Abstraction
Encapsulation
Inheritance
35
When any attempt to make changes to a codebase causes an error to appear somewhere else, that is a sign of...
Viscosity
Immobility
Fragility
Rigidity
36
Which of the following statements about code smells is FALSE?
Code smells get less bothersome as you get used to them.
Code smells can often be removed or improved by refactoring.
Overly long methods are a bad code smell.
Code smells can occur even in functioning code.
37
Which of these is NOT a source of "bit rot"?
Discontinued web services
Software updates
Compiler errors
Changes to underlying APIs
38
Based on what you know about Large Language Models, which response best describes their output?
Total nonsense
Bug-free
Provably correct
Plausible
39
Which SOLID principle suggests that clients should not be forced to depend upon methods they don't use?
Open-Closed Principle
Interface Segregation Principle
Dependency Inversion Principle
Liskov Substitution Principle
40
Which programming paradigm has been the main focus of this class?
Procedural
Functional
Object-oriented
Logical