static void Main(string[] args) { Console.WriteLine("Enter Batch code & location seperated by comma"); string[] batchInfo = Console.ReadLine().Split(','); Console.WriteLine("Enter Trainee name, marks1 & marks2 seperated by comma"); string[] traineInfo = Console.ReadLine().Split(','); Trainee _trainee = new Trainee(batchInfo[0], float.Parse(traineInfo[1]), float.Parse(traineInfo[2]), batchInfo[1], traineInfo[0]); Console.WriteLine("Display Trainee Information"); TraineeBO.Display(_trainee); Console.WriteLine("Marks: " + _trainee.Result(float.Parse(traineInfo[1]), float.Parse(traineInfo[2])).ToString("0.000")); Console.WriteLine("Enter the hours worked"); int dutyHours = _trainee.AttendanceTracker(int.Parse(Console.ReadLine())); if (dutyHours < 400) { Console.WriteLine("Top up required = " + (400 - dutyHours) + " hours"); } else { Console.WriteLine("Total hours completed = " + dutyHours); } Console.WriteLine("Enter Passport number (if not there enter NA)"); string passportNo = Console.ReadLine(); bool hadPassport = _trainee.hrPolicy(passportNo); if (hadPassport) { Console.WriteLine("Passport submitted"); } else { Console.WriteLine("Passport submission pending"); } }
public static void Display(Trainee _trainee) { Console.WriteLine(_trainee); }