Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online .Net Design Patterns Skill Assessment Test

Topics Covered

  • GOF Decorator Design Pattern
  • GOF Singleton Pattern
  • Composite Design Pattern
  • Transfer Object Pattern
  • Dependency Injection Pattern

Useful for hiring

  • C# .Net programmer-Design Patterns
  • .Net Developer-Design Patterns

Start hiring job-fit candidates using this assessment

GET A DEMO

"We are impressed with Interview Mocha's comprehensive IT skill test batteries and their ability to provide tailor-made assessments quickly. The results we got from Interview Mocha exceeded our expectations, employees found the tests quick, fun, and a benchmark of their knowledge."

Ajay Garg, Siemens,
Associate Manager
Question

Which of the following describes the Memento pattern correctly?

Answer
    • This pattern is used to get a way to access the elements of a collection object in a sequential manner without any need to know its underlying representation.

    • This pattern is used to reduce communication complexity between multiple objects or classes.

    • This pattern is used to restore state of an object to a previous state.

    • This pattern is used when there is a one-to-many relationship between objects such as if one object is modified, its dependent objects are to be notified automatically.

Question

Which of the following patterns should be used when more than one object can handle a request and the handler is unknown? 

Answer
    • Chain of Responsibility

    • Command

    • Strategy

    • Observer

Question

public class Job
{
    private ArrayList applicants;
    private JobStatus statusOfJob;
    public Job()
    {
        applicants = new ArrayList();
    }
    public void Add(Applicant candidate)
    {
        applicants.Add(candidate);
    }
    public void Remove(Applicant candidate)
    {
        applicants.Remove(candidate);
    }
    public void Notify()
    {
        foreach (Applicant candidate in applicants)
        {
            candidate.Update(this);
        }
    }
    public JobStatus Status
    {
        get
        {
            return statusOfJob;
        }
        set
        {
            statusOfJob = value;
            Notify();
        }
    }
}

public enum JobStatus{FILLED,SUSPENDED,REMOVED};
public class Applicant
{
    string fname;
    string lname;
    string emailID;
    string phoneNo;
    public Applicant()
    {
        //
        // TODO: Add constructor logic here
        //
    }
#region Properties for exposing the member variables
#endregion
    public void Update(Job appliedJob)
    {
        switch(appliedJob.Status)
        {
            case JobStatus.FILLED:...
            break;
            case JobStatus.REMOVED:...
            break;
            case JobStatus.SUSPENDED:...
            break;
        }
    //Your own functionality
    //End Of Functionality
    }
}

What pattern is this?

Answer
    • Interpreter

    • Mediator

    • Observer

    • None of the mentioned

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO