The most basic way to do this would be to create a N * 3 (n being the amount of levels) array. So with booleans. So it would like this
int[,] objectives = new bool[N, 3]
{true , false, true},
{false, false, false}
Then on increment just do a check whether they have already obtained the star or not
You could use a more dynamic structure or an object in each level which has these bools that you could query against.So in level you would have
CompletedObjectives objectives{get; set;}
and completed objectives would look like
Public class CompletedObjectives
{
bool ObjectiveOne {get ;set;}
bool ObjectiveTwo {get ;set;}
bool ObjectiveThree {get ;set;}
}
and same again query these before incrementing
I hope this helps
EDIT: EXTRA INFO
so c# is in a object oriented language so each level should be an object it would contain information about the level you will need to decide what makes information each level has such as level number and difficulty and stars. You will also want a virtual method called something like play level a virtual method is one that you can override in another class. If the method isnt implemented in the class the code below will throw an exception.
public class level
{
public int level number {get; set;}
public string difficulty {get ; set;}
public CompletedObjectives objectives {get;set;}
public virtual void PlayLevel()
{
System.NotImplementedException();
}
}
so your next step it to make your levels
so example for level 1
public class Level1 : level
{
this.levelnumber = 1;
this.difficulty = "easy";
public override void Playlevel()
{
//level logic goes here
}
}
then your main would add all these levels to a List
List<Level> levels = new List<Level>{new Level1(), new Level2()}
so first time you call level1 from the list all the objectives are false, when they are completed you change their value to true and increment the total stars second time if they are true you dont increment.
If you need anymore help feel free to ask the above code is a rough outline to explain the basic way this can be done. Their are more advanced ways that provide more benefits but you have to start somewhere.
https://www.coursera.org/learn/game-programming
https://mva.microsoft.com/
youtube is also a great resource for learning basic programming. Their are a lot of books out their especially about object-oriented in general which will help you design your classes/interfaces etc better.