In this paper, a university timetabling problem is addressed, and proposed a two-phase approach to solve the problem. In the first phase, a binary linear programming model is constructed to determine the feasibility of the number of optional courses to offer at different time slots. Using the genetic algorithm, the constructed model is solved and a feasible number of optional courses to be offered at different time slots is obtained. Phase I is devoted to finding the optimal feasibility of offering a great many optional courses to different time slots while optimizing the preferable constraints. Once we get the number of optional courses to offer at different time slots, the second phase is devoted to constructing the timetabling treating the preferable constraints as objectives. The timetabling problem is a combinatorial, NP-complete optimization problem. Due to its practicability and complexity, the timetabling problem is prominent among researchers and has sound literature equipped with various methodologies and solution techniques. Among the timetabling problems, addressed in the literature, university course timetabling is more complex due to the sophisticated course structures, a large number of student groups, and many other requirements imposed by the institution. University timetabling problems can be hardly generalized due to the different inherent characteristics of the timetabling problem from institution to institution. Hence, many studies are focused on case studies while extending and generalizing to a certain extent. In this study, the timetabling for semester I of the Faculty of Science, University of Ruhuna, Sri Lanka is selected as a case study.