It is strongly suggested that the following approach is to be taken to design and implement the program.
You should first design, implement and test the input functions of Schedule. You need to create four input functions (refer to Figure 1). For example, the input function is applied to enter the date with the hint “Please enter the date of your new appointment, e.g. 25/9/2025”. You are welcome to design your four input functions and Interactive Editing Environment (IDE), as long as they can input the date, start time, end time and subject of the new appointments similar to the sample IDE shown in Fig. 1. The four inputs for each appointment record will be stored as a string (record) in the appointment_list. All the functions except built-in functions should be presented with proper Docstrings.
You should design, implement and test a function which adds an appointment record to the Schedule. An appointment record will be added to the Schedule each time when the 4 inputs of the appointment record are all valid. If any input is invalid, display an error message and ask user for another input. The function handles the following tasks: collect all data (date, start time, end time and subject) for the appointment record (assigned them to a string as "23/9/2025;CSC1401 class;9;10", other formats for the string are not acceptable for this assignment); validate if the input for "Date" is correct regarding the specification in the Date section by using the function is_valid_date() described below; validate if the input for "Time" is correct regarding the specification in the Time section by using the is_valid_time() described below; a non-empty string within 30 characters (including space between words) for the subject; call is_concurrent_appointment() first then add the valid appointment record into the appointment_list list if all data are valid; the program will repeatedly ask users to input the record until "END" is input for the date. Call show_records() to present the table of all the records.
You should design, implement and test a function to print all existing records in a “table” as the Figure 2 after the task of Input Functions is completed. The function should access the appointment_list and print all existing appointment records (no requirement about the order) in the table. A “table” should include headers, “--” which separate the header from the content of each record. The number of “-” is equal to the maximum number of text or the length of the header for each column. Indentation is appropriate as shown in Figure 2. You could create some dummy appointment records manually and store them in the appointment_list to test this function, while other functions still remain incomplete.
You should design, implement and test a function to validate the data input for the Date attribute of an appointment record. The function should alert an error message and return false if the input is invalid, otherwise, return true. Refer to the Date section for what the function needs to check for validation. To evaluate students’ string handling capabilities, only the “25/9/2025” date format is a valid input format for 25th September 2025. Use of built-in functions or some libraries to input valid date is not acceptable for this assignment.
You should design, implement and test a function to validate the time input for the start time and end time attributes of an appointment record. The function should alert an error message and return false if the input is invalid, otherwise, return true. Refer to the Time section for what the function needs to check for validation.
You should design, implement and test a function to validate if the input data for the Date, Start Time and End Time of an appointment is concurrent to any existing appointments in the appointment_list. The time of two appointments is considered concurrent if the time span for the two appointments overlap each other in full or in part. Note that an appointment can start at a time when another finishes, or vice versa. An appointment starts and finishes on the same day. The function should alert an error message and return true if the input appointment is concurrent with any existing appointments in appointment_list, otherwise, return false.
You should design, implement and test a function to allow the user to sort all appointment records in appointment_list based on Time. The program will repeatedly ask users to input the keyword (e.g., the hints “Do you want to sort the appointments by time? Yes or End”. Only “Yes” and “End” are valid inputs, case insensitive) until "Yes" or "End" is entered to stop the iteration. If input is “Yes”, the program will display the sorted appointment records of Schedule. If input is “End”, just end the program without sorting appointment records. The function should alert an error message if the input is invalid. You should use the following suggestions as the guideline: Time from earlier date to later date. For same day records, earlier start time is in front (Challenge task). You should use string handling techniques to extract the corresponding attribute values from the appointment records and sort the appointment records based on these values. The outcome should be similar to Figure 3.
The CSC1401 Foundation Programming assessment required the design, implementation, and testing of a Schedule management program. Key requirements included:
Input Functions: Create four input functions to capture the date, start time, end time, and subject of an appointment. Inputs were to be stored as strings in a list called appointment_list.
add_record() Function: Add validated appointment records to the schedule, ensuring correct formats for date, time, and subject, while checking for concurrent appointments.
show_records() Function: Display all existing records in a tabular format with appropriate headers and alignment.
is_valid_date() Function (Challenge Task): Validate date input in the format “DD/MM/YYYY” without using built-in libraries.
is_valid_time() Function: Validate start and end times for appointments.
is_concurrent_appointment() Function (Challenge Task): Check whether a new appointment overlaps with any existing ones.
sort_records() Function: Sort appointments by date and start time, allowing the user to view sorted records on request.
The assessment tested skills in string handling, conditional logic, loops, function design, validation, and data organization, aligning with the learning objectives of modular programming, input validation, and error handling.
The Academic Mentor guided the student through a step-by-step approach to achieve the assessment objectives:
Step 1 – Input Functions
The student was instructed to design four separate input functions for date, start time, end time, and subject.
Each function was tested individually to ensure correct data collection and proper storage appointment_list in .
Emphasis was placed on using docstrings for each function to explain purpose and usage.
Step 2 – add_record() Function
The student combined all input functions to create the add_record() function.
Validation checks were added to ensure:
Date followed the “DD/MM/YYYY” format.
Start and end times were valid integers within a reasonable range.
Subject length did not exceed 30 characters.
Concurrent appointment checks were integrated by calling is_concurrent_appointment() before adding records.
The function looped until the user input “END” for the date, ensuring multiple entries could be added.
Step 3 – show_records() Function
The mentor demonstrated how to iterate over appointment_list and display records in a formatted table.
Column widths were dynamically adjusted based on header and content length, with “--” separating headers from data.
Dummy records were initially added to test formatting and alignment.
Step 4 – Validation Functions
is_valid_date() was implemented as a challenge task to verify dates strictly in the correct format.
is_valid_time() ensured start and end times were logical and numeric.
is_concurrent_appointment() checked for overlapping appointments, alerting the user if a conflict existed.
Step 5 – sort_records() Function
The student implemented a sorting mechanism using string parsing to extract date and time.
Sorting was performed first by date, then by start time for appointments on the same day.
Users were prompted to sort appointments using “Yes” or “End”, with error handling for invalid input.
The program successfully captured, validated, stored, and displayed appointment records.
Duplicate or conflicting appointments were detected and prevented.
Appointments could be sorted dynamically based on user input.
The assessment reinforced the following learning objectives:
Modular program design using functions
Input validation and error handling
String manipulation and data formatting
Iterative logic and conditional checks
Handling challenge tasks with concurrent appointment detection and date validation
The final solution achieved a fully functional schedule program meeting all specified requirements, with clear outputs, robust validation, and step-by-step guidance from the Academic Mentor ensuring the student understood both implementation and logic behind each function.
Looking for guidance on your assignment? You can download this sample solution to see how a high-quality answer is structured and understand the approach. Important: This sample is for reference only submitting it as your own work is considered plagiarism and can have serious academic consequences.
If you want a stress-free, plagiarism-free solution tailored to your requirements, our team of professional academic writers can create a fresh, custom-written assignment for you. Ordering a custom solution ensures:
100% original and plagiarism-free content
Fully referenced and formatted according to your requirements
Clear, step-by-step guidance on complex topics
Time-saving, so you can focus on learning and improving
Choose the option that works best for you:
Download Sample Solution Order Fresh Assignment
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.