I was learning my way on designing real world OOP problems and I was trying to solve this problem in the OOP way. The problem statement is as follows:The conference has multiple tracks each of which has a morning and afternoon session.Each session contains multiple talks.Morning sessions begin at 9am and must finish by 12 noon, for lunch.Afternoon sessions begin at 1pm and must finish in time for the networking event.The networking event can start no earlier than 4:00 and no later than 5:00.No talk title has numbers in it.All talk lengths are either in minutes (not hours) or lightning (5 minutes).Presenters will be very punctual; there needs to be no gap between sessions.Test inputWriting Fast Tests Against Enterprise Rails 60minOverdoing it in Python 45minLua for the Masses 30minRuby Errors from Mismatched Gem Versions 45minCommon Ruby Errors 45minRails for Python Developers lightningCommunicating Over Distance 60minAccounting-Driven Development 45minWoah 30minSit Down and Write 30minPair Programming vs Noise 45minRails Magic 60minRuby on Rails: Why We Should Move On 60minClojure Ate Scala (on my project) 45minProgramming in the Boondocks of Seattle 30minRuby vs. Clojure for Back-End Development 30minRuby on Rails Legacy App Maintenance 60minA World Without HackerNews 30minUser Interface CSS in Rails Apps 30minTest outputTrack 1:09:00AM Writing Fast Tests Against Enterprise Rails 60min10:00AM Communicating Over Distance 60min11:00AM Rails Magic 60min12:00PM Lunch01:00PM Ruby on Rails: Why We Should Move On 60min02:00PM Common Ruby Errors 45min02:45PM Accounting-Driven Development 45min03:30PM Pair Programming vs Noise 45min04:15PM User Interface CSS in Rails Apps 30min04:45PM Rails for Python Developers lightning04:50PM Networking EventTrack 2:09:00AM Ruby on Rails Legacy App Maintenance 60min10:00AM Overdoing it in Python 45min10:45AM Ruby Errors from Mismatched Gem Versions 45min11:30AM Lua for the Masses 30min12:00PM Lunch01:00PM Clojure Ate Scala (on my project) 45min01:45PM Woah 30min02:15PM Sit Down and Write 30min02:45PM Programming in the Boondocks of Seattle 30min03:15PM Ruby vs. Clojure for Back-End Development 30min03:45PM A World Without HackerNews 30min04:15PM Networking EventI successfully finished designing the problem and it works perfectly but I would love to see the experts opinion on my code and provide suggestions.timing.pyfrom datetime import timedelta, datetimeclass Timing:    def __init__(self):        self.morning_start = (datetime.min+ timedelta(hours=9)).strftime('%I:%M %p')        self.lunch = (datetime.min+ timedelta(hours=12)).strftime('%I:%M %p')        self.afternoon_start = (datetime.min+ timedelta(hours=13)).strftime('%I:%M %p')        self.day_end = (datetime.min+ timedelta(hours=17)).strftime('%I:%M %p')if __name__ == '__main__':    a = Timing()    print(a.afternoon_start)track.pyfrom datetime import timedelta, datetimefrom .timing import Timingclass Track(Timing):    id = 0    def __init__(self):        super(Track, self).__init__()        Track.id += 1        self.talks = {}        self.talk_list = Track.extract_input()    @staticmethod    def extract_input():        __talks = {}        lines = []        try:            lines = [line.strip() for line in open('test.txt')]        except FileNotFoundError as e:            print('File Not Found', e)        for line in lines:            title, minutes = line.rsplit(maxsplit=1)            try:                minutes = int(minutes[:-3])            # negative indexing raises error, so it means it's lightning            except ValueError:                minutes = 5            __talks[line] = minutes        return __talks    def get_talks(self, start_talk, end_talk):        start = timedelta(hours=start_talk)        for key, value in list(self.talk_list.items()):            prev = start + timedelta(minutes=int(value))            if prev <= timedelta(hours=end_talk):                self.talks[(datetime.min + start).strftime('%I:%M %p')] = key                self.talk_list.popitem()                start += timedelta(minutes=int(value))        return self.talks    def show_output(self):        while not len(self.talk_list) is 0:            print('Track %s' % Track.id)            self.__prepare_output(9, 12)            print('%s - %s' % (self.lunch, 'Lunch'))            self.__prepare_output(13, 17)            print('%s - %s' % (self.day_end, 'Networking Event'))            Track.id += 1    def __prepare_output(self, start, end):        for time, title in sorted(self.get_talks(start, end).items()):            print(time, '-', title)        # clear previous entries        self.talks.clear()if __name__ == '__main__':    a = Track()    a.show_output()
Conference track management
python;object oriented;datetime