Ejemplo n.º 1
0
        static internal Student GetStudentDetails()
        {
            Student student = new Student();

            student.FirstName   = CommandPromtUtilities.AskDetails("First name");
            student.LastName    = CommandPromtUtilities.AskDetails("Last name");
            student.DateOfBirth = DateTime.Parse(CommandPromtUtilities.AskDetails("Date of birth"));
            student.TuitionFees = double.Parse(CommandPromtUtilities.AskDetails("Tuition fees"));
            return(student);
        }
Ejemplo n.º 2
0
        static internal Assignment GetAssignmentDetails()
        {
            Assignment assignment = new Assignment();

            assignment.Title       = CommandPromtUtilities.AskDetails("Assignment title");
            assignment.Description = CommandPromtUtilities.AskDetails("Assignment description");
            assignment.SubDateTime = DateTime.Parse(CommandPromtUtilities.AskDetails("Assignment submision date"));
            assignment.OralMark    = float.Parse(CommandPromtUtilities.AskDetails("Assignment oral mark"));
            assignment.TotalMark   = float.Parse(CommandPromtUtilities.AskDetails("Assignment total mark"));
            return(assignment);
        }
Ejemplo n.º 3
0
        static internal Trainer GetTrainerDetails()
        {
            List <string> subjects = new List <string> {
                "C#", "Java", "Python", "Javascript"
            };
            Trainer trainer = new Trainer();

            trainer.FirstName = CommandPromtUtilities.AskDetails("First name");
            trainer.LastName  = CommandPromtUtilities.AskDetails("Last name");
            trainer.Subject   = CommandPromtUtilities.AskDetails("Choose a subject from the following list", subjects);
            return(trainer);
        }
Ejemplo n.º 4
0
        static internal Course GetCourseDetails()
        {
            List <string> streams = new List <string> {
                "C#", "Java", "Javascript", "Python"
            };
            List <string> types = new List <string> {
                "Full Time", "Part Time"
            };
            Course course = new Course();
            string title  = CommandPromtUtilities.AskDetails("Course title");

            course.Stream    = CommandPromtUtilities.AskDetails("Choose the course's stream from the following list", streams);
            course.Type      = CommandPromtUtilities.AskDetails("Choose the course's type from the following list", types);
            course.Title     = title + " " + course.Type + " " + course.Stream;
            course.StartDate = DateTime.Parse(CommandPromtUtilities.AskDetails("Course start date"));
            course.EndDate   = DateTime.Parse(CommandPromtUtilities.AskDetails("Course end date"));
            return(course);
        }