An informative test code approach in code writing problem for three object-oriented programming concepts in java programming learning assistant system

Khin Khin Zaw, Win Zaw, Nobuo Funabiki, Wen Chung Kao

Research output: Contribution to journalArticle


To enhance Java programming educations, we have developed a Java Programming Learning Assistant System (JPLAS) that offers various types of exercise problems to cover studies at different levels. Among them, the code writing problem asks a student to write a source code that passes the given test code in the assignment. In Java programming, encapsulation, inheritance, polymorphism are the fundamental object-oriented programming (OOP) concepts that every student should master and freely use, which is very hard for novice students. In this paper, we propose the informative test code approach in the code writing problem for studying the three OOP concepts. This test code describes the necessary information to implement the source code using the concepts, such as the names, access modifiers, data types of the member variables and methods. Then, a student is expected to learn how to use them by writing a source code to pass the test code. To evaluate the effectiveness of the proposal, we generated informative test codes for 10 assignments using three concepts, and asked eight students who are currently studying Java programming in Myanmar and Japan to solve them. Then, all of them could complete source codes that pass the test codes, where the quality metrics measured by Metrics plugin for Eclispe were generally acceptable. Unfortunately, due to the insufficiency of test codes, the coverage metric by code coverage tool for Eclipse was not 100% at some source codes. The informative test code generation by a teacher should be assisted to avoid this problem.

Original languageEnglish
Pages (from-to)1-9
Number of pages9
JournalIAENG International Journal of Computer Science
Issue number3
Publication statusPublished - 2019 Jan 1
Externally publishedYes



  • Code writing
  • Encapsulation
  • Informative test code
  • Inheritance
  • Java programming education
  • Metric
  • Polymorphism

ASJC Scopus subject areas

  • Computer Science(all)

Cite this