Challenge: Make a Simple Interface

This lesson brings you a challenge to solve.

We'll cover the following

Problem statement

Define an interface Simpler with methods Get(), which returns an integer, and Set() which has an integer as a parameter. Make a struct type Simple, which implements this interface.

Then, define a function that takes a parameter of the type Simpler and calls both methods upon it. Call this function from main to see if it all works correctly.

Try to implement the challenge below. Good Luck!

Get hands-on with 1200+ tech skills courses.