I have a task to develop a windows application that collects employee information: Name and Number of items sold as input and outputs a summary of information in a way that groups the Salesperson based on the number of items sold (below 50 items, 50-99 items, 100-199 items and a level above 199 items) See below. Can you help me with this code. Here is the code am working with thus far:
using System;
namespace L0002B
{
public class Salesperson
{
string Name { get; set; }
int Quantity_Sold { get; set; }
static void Main(string[] args)
{
System.Collections.Generic.List<Salesperson> Salesperson = new System.Collections.Generic.List<Salesperson>()
{
new Salesperson {Name="Donald Duck ", Quantity_Sold=173},
new Salesperson {Name="Mickey Mouse ", Quantity_Sold=202},
new Salesperson {Name="Snoopy ", Quantity_Sold=203},
};
}
private static void Bonus(ref int Quantity_Sold)
{
if (Quantity_Sold >= 200)
{
Console.WriteLine("Above 199 items");
}
else if (Quantity_Sold >= 100)
{
Console.WriteLine("100-199 items");
}
else if (Quantity_Sold >= 50)
{
Console.WriteLine("50-99 items");
}
else
{
Console.WriteLine("Below 50 items");
}
Console.WriteLine("Bonus Report: " Bonus);
}
}
}
I want a output that provides a report that looks like this but I get a blank output instead. enter image description here
Aucun commentaire:
Enregistrer un commentaire