الــسلام علــيكم .. هذا السؤال اللي عندي :
1- Ask the user for his nae and his worked hour during the months.
2. Some user might wotk 1 month during a year while others might work 12 months.
3. Store all the workd hours per month for all the employees in a department
4. The department can have a maximum of 25 employees. Therefore after entering the first emplyee, ask the user if he has more employees to enter. If the number of employees reaches 25 then stop and print a report.
5. The year has 12 months.
6. Your program will calculate the average for Each employees.
7. Your program to print all the names and their average worked hours per month fr each employee.
نحسب المجموع حق كل موظف لحاله .. بغض النظر اتشغل شهر أو سنة كاملة
وبعدين نعرضهم بعد ما نحسب كل مجموع مع الأسماء
بدأت بإنشاء Class
private string employeeName;
private int[] workHours = new int[12];
public string getEmployeeName()
{
return employeeName;
}
public void setEmployeeName(string value)
{
employeeName = value;
}
public int getWorkHours()
{
return workHours;
}
public void setWorkHours(int value)
{
workHours = value;
}مع العلم اني مو متأكدة من طريقة الــ Array ..
Employee[] employeeInfo = new Employee[25];
for (int i = 0; i < employeeInfo.Length; i++)
{
employeeInfo = new Employee();
}
for (int i = 0; i < employeeInfo.Length; i++)
{
Console.Write("Please Enter Your Name: ");
employeeInfo.setEmployeeName(Console.ReadLine());
}
Employee WorkHours = new Employee[12];
for (int n = 0; n < workHours.Length; n++)
{
Console.Write("Please Enter Your Worked Hours: ");
workHours[n] = Int32.Parse(Console.ReadLine());
}عندي أكثر من Error وأحتاج مساعدة في طريقة ربط البرنامج مع المجموع .. وشــكراً :)