Sonepar Senior Software Engineer Interview Experience
Senior Software Engineer
Summary
AI Powered
The Sonepar interview process comprised one round focused on object-oriented programming concepts. Candidates were tasked with creating and comparing 'Person' objects while utilizing the .Equals method in C#. The questions required a comprehensive understanding of class structures, method overriding, and testing scenarios. Overall, the interview posed a moderate challenge, assessing both technical skills and problem-solving abilities.
1
#1Creating and Comparing Person Objects
Medium
object-oriented-programming
c
equals-method
testing
Create a class named 'Person' with properties 'name' and 'age'. After creating two instances of 'Person', compare these objects using the .Equals method. Will it return true or false? Discuss how the .Equals method works, considering it inherits from the Object interface. Additionally, override the .Equals method and provide code for this override. Finally, write all possible test case scenarios to validate the override method functionality. Also, explain the behavior of null==null in C#.
#1
Creating and Comparing Person Objects
Create a class named 'Person' with properties 'name' and 'age'. After creating two instances of 'Person', compare these objects using the .Equals method. Will it return true or false? Discuss how the .Equals method works, considering it inherits from the Object interface. Additionally, override the .Equals method and provide code for this override. Finally, write all possible test case scenarios to validate the override method functionality. Also, explain the behavior of null==null in C#.
object-oriented-programming
c
equals-method
testing
Medium
a
aseer hamim
Verified User