Full Text

Turn on search term navigation

© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.

Abstract

Presently, Java is a fundamental object-oriented programming language that can be mastered by any student in information technology or computer science. To assist both teachers and students, we developed the Java Programming Learning Assistant System (JPLAS). It offers several types of practice problems with different levels and learning goals for step-by-step self-study, where any answer is automatically marked in the system. One challenge for teachers that is addressed with JPLAS is the generation of proper exercise problems that meet learning requirements. We implemented programs for generating new problems from given source codes, as collecting and evaluating suitable codes remains time-consuming. In this paper, we present an automatic code generation tool using generative AI to solve this challenge. Prompt engineering is used to help generate an appropriate source code, and the quality is controlled by optimizing the prompt based on the outputs. For applications in JPLAS, we implement a web application system to automatically generate an element fill-in-the-blank problem (EFP) in JPLAS. For evaluation, we select the element fill-in-the-blank problem (EFP) as the target type in JPLAS and generate several instances using this tool. The results confirm the validity and effectiveness of the proposed method.

Details

Title
An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System
Author
Zhu Zihao 1 ; Funabiki Nobuo 1 ; Mustika, Mentari 1 ; Aung Soe Thandar 1 ; Wen-Chung, Kao 2 ; Yi-Fang, Lee 3 

 Department of Information and Communication Systems, Okayama University, Okayama 700-8530, Japan; [email protected] (M.M.); [email protected] (S.T.A.) 
 Department of Electrical Engineering, National Taiwan Normal University, Taipei 10610, Taiwan; [email protected] 
 Department of Industrial Education, National Taiwan Normal University, Taipei 10610, Taiwan; [email protected] 
First page
2261
Publication year
2025
Publication date
2025
Publisher
MDPI AG
e-ISSN
20799292
Source type
Scholarly Journal
Language of publication
English
ProQuest document ID
3217726031
Copyright
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.