Interfaces 

Open up the Interfaces folder and have a look at the IBatter.cs and IBowler.cs files. The IBatter interface looks as follows:

namespace cricketScoreTrack.Interfaces 
{ 
    interface IBatter 
    { 
        int BatsmanRuns { get; set; }         
        int BatsmanBallsFaced { get; set; }         
        int BatsmanMatch4s { get; set; }         
        int BatsmanMatch6s { get; set; }         
        double BatsmanBattingStrikeRate { get; }             
    } 
} 

Looking at the IBowler interface, you will see the following:

namespace cricketScoreTrack.Interfaces 
{ 
    interface IBowler 
    { 
        double BowlerSpeed { get; set; } 
        string BowlerType { get; set; }  
        int BowlerBallsBowled { get; set; } 
        int BowlerMaidens { get; set; }         
        int BowlerWickets { get; set; }         
        double BowlerStrikeRate { get; }         
        double BowlerEconomy { get; }  
        int BowlerRunsConceded { get; set; } 
        int BowlerOversBowled { get; set; } 
    } 
} 

An interface will only contain the signatures of methods, properties, events, or indexers. If we had to add a method to the interface to calculate the spin of the ball, it would look something like this:

void CalculateBallSpin(); 

On the implementation, we would see the code implemented as follows:

void CalculateBallSpin()
{
}

The next logical question would probably be what the difference is between an abstract class and an interface. Let's turn to the excellent Microsoft documentation at—https://docs.microsoft.com/en-us/.

After opening Microsoft Docs, try the dark theme. The theme toggle is to the right of the page, just below the Comments, Edit, and Share links. It's really great for us night owls.

Microsoft sums up an interface very nicely with the following statement:

An interface is like an abstract base class. Any class or struct that implements the interface must implement all its members.

Think of interfaces as verbs; that is to say, interfaces describe some sort of action. Something that a cricket player does. In this case, the actions are batting and bowling. The interfaces in Cricket Score Tracker are therefore IBatter and IBowler. Note that convention dictates that interfaces begin with the letter I.

Abstract classes on the other hand, act as a noun that tells you what something is. We have Batsmen and All-Rounders. We can say that both these cricketers are players. That is the common noun that describes the cricketers in a cricket match. Therefore, the Player abstract class makes sense here.