100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CS 151 EXAM QUESTIONS AND ANSWERS. VERIFIED 2025/2026.

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
07-12-2025
Written in
2025/2026

CS 151 EXAM QUESTIONS AND ANSWERS. VERIFIED 2025/2026.

Institution
CS 151
Course
CS 151









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS 151
Course
CS 151

Document information

Uploaded on
December 7, 2025
Number of pages
12
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS 151 EXAM QUESTIONS AND
ANSWERS. VERIFIED 2025/2026.




The criteria for testing an app is its functional spec - ANS True



Superclass and subclass can declare attributes with the same name but thats a bad idea -
ANS True



Architectural design patterns are the second level of abstraction - ANS False



In Java Exception hierarchy, the subclasses of "Throwable" class are "Exception" and "Error:
classes - ANS True



Pick all that we get from obeying "Open-Closed Principle"



A) More efficient application

B) Decreasing the cost of app's maintenance

C) Higher possibility to cope with change and complexity

D) Increasing the complexity of the code - ANS B, C



What do we learn from "Interface Segregation Principle (ISP)" ?


1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

, A) the role of segregation in inheritance

B) some inheritances are not polymorphic

C) the role of precondition in inheritance

D) interfaces should not be too big - ANS D



Class B inherits from class A, and both define their own preconditions.

If we want to use them in a polymorphic relationship, which of the following is correct?



A) Preconditions of class A must be either stronger than or equal to the preconditions of class B.

B) Preconditions of class A must be either weaker than or equal to the preconditions of class B.

C) Preconditions of class A must be equal to preconditions of class B.

D) Preconditions of class A must be weaker than preconditions of class B. - ANS A



Pick all true statements about "Singleton design pattern".



A) Only one instance of the class can exist.

B) It decreases dependency between classes.

C) None is correct.

D) This is a "creational" design pattern. - ANS A, D



What do we learn from "Liskov Substitution Principle (LSP)" ?



A) Interfaces should not be too big.

B) We should pick preconditions and postconditions carefully if we want to use an inheritance in
a polymorphic relationship.

2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Brainbarter Kaplan University
View profile
Follow You need to be logged in order to follow users or courses
Sold
325
Member since
2 year
Number of followers
153
Documents
22254
Last sold
5 days ago
A+ STUDY MATERIALS.

We offer a wide range of high-quality study materials, including study guides practice exams and flashcards. WELCOME.

3.5

54 reviews

5
21
4
8
3
12
2
4
1
9

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions