Flipped classroom is a pedagogical model in which the typical lecture and homework elements of a course are reversed. Teachers provide online materials to students for preparation of the lecture and students dedicate to practice in the course. We have put into practice the flipped classroom in our computer programming courses teaching C and Java languages since 2013 as a way of utilizing our e-learning system and contents. As a problem in computer programming education, although teachers explain grammar, students cannot create software well by themselves and. Some students give up the learning. Our goal is to promote each student's learning motivation and understanding for computer programming by the training that the flipped classroom and collaborative learning are applied to. Main feature of this approach is to spend most of the time of a programming class with collaboration among students in order to make practical software. We assign the students homework using Flash animations and video data explaining the lecture as learning-materials to learn vocabularies and grammar of the programming languages every week. Web-based tests consisting of easy questions to confirm the results of doing homework every week are done at the beginning of the actual classes, and it is useful to clarify difficult parts of understanding that the students don't notice. Additionally, we confirmed the effectiveness of this approach by comparing examination scores between 2012 and 2014. Compared with the score of 2012, the average scores of the Web-based test and the written test on mid-exam became high, and the minimum scores of both of the tests also became high. The standard deviation of both of the tests became low. Moreover, the each student was able to make the code of a console game through this collaborative learning.