OOP and Design Patterns Online Test
For Jobseekers
Practice your skills and earn a certificate of achievement when you score in the top 25%.
Take a Practice TestFor Companies
Test candidates with real-world problems and interview the best ones.
Sign Up to Offer this TestAbout the test
The object oriented programming and design patterns online test assesses candidates' knowledge of OOP concepts such as polymorphism, inheritance, abstraction, encapsulation, and design patterns.
It's an ideal test for pre-employment screening. A good software engineer who uses a modern OOP language needs to understand core concepts of the OOP language and how to use design patterns to write reusable solutions that other developers can understand.
This online test requires candidates to answer questions about object oriented programming concepts and design patterns.
Sample public questions
In a language that supports the OOP paradigm, we have the following code that serializes the content of a shopping cart to JSON format:
class ShoppingCart
private content : Dictionary<Int, String>
public function serialize() : String
return new JsonSerializer().serialize(content.clone())
end function
end class
class JsonSerializer
public function serialize(value : Dictionary<Int, String>) : String
// Code that serializes dictionary to JSON format and returns it as string
end function
end class
A client wants to allow loosely coupled plugins to be able to serialize the shopping cart content to their own formats (e.g., XML). Select lines of code that, together, would extend the code above to allow this.
A word processor uses the following code for defining font format:
class FontFormat inherits Object
private fontName : String
private fontSize : Int
public constructor(name : String, size : Int)
fontName = name
fontSize = size
end constructor
public function getFontName() : String
return fontName
end function
public function getFontSize() : Int
return fontSize
end function
override public function equals(obj : Object) : Bool
if (!(obj instanceof FontFormat))
return false
end if
FontFormat f = (FontFormat)obj
return f.getFontName() == fontName && f.getFontSize() == fontSize
end function
override public function getHashCode() : Int
return fontName.getHashCode() ^ fontSize.getHashCode()
end function
end class
Analysis shows that even the largest documents use fewer than a hundred different combinations of font name and size. The same analysis shows that the application sometimes uses thousands of FontFormat objects, most of which share the same font name and size.
(Fill in the blank with the software design pattern that solves the issue.)
The ____________ software design pattern can be used to minimize the memory footprint by sharing FontFormat objects.
For jobseekers: get certified
Earn a free certificate by achieving top 25% on the OOP and Design Patterns test with public questions.
Take a Certification TestSample silver certificate
Sunshine Caprio
Java and SQL TestDomeCertificate
For companies: premium questions
Buy TestDome to access premium questions that can't be practiced.
Get money back if you find any premium question answered online.
6 more premium OOP and Design Patterns questions
Panel System, Engine, UML Diagrams, Welcome Screen, Advertising Platform, Mock Configuration.
Skills and topics tested
- OOP & Design Patterns
- Behavioral Patterns
- Creational Patterns
- Design Patterns
- Inheritance
- Method Overriding
- UML
- Inversion of Control
For job roles
- Back-End Developer
- Full-Stack Developer
- Mobile Developer
- Software Developer
- Web Developer
Sample candidate report
What others say
Simple, straight-forward technical testing
TestDome is simple, provides a reasonable (though not extensive) battery of tests to choose from, and doesn't take the candidate an inordinate amount of time. It also simulates working pressure with the time limits.
Jan Opperman, Grindrod Bank
Product reviews
Used by
Solve all your skill testing needs
150+ Pre-made tests
From web development and database administration to project management and customer support. See all pre-made tests.
90+ skills
From JavaScript and SQL to English and customer support. See all questions to filter by skill.
Multi-skills Test
Mix questions for different skills or even custom questions in one test. See an example.
How TestDome works
Choose a pre-made test
or create a custom test
Invite candidates via
email, URL, or your ATS
Candidates take
a test remotely
Sort candidates and
get individual reports