Next Article in Journal
PWFS: Probability-Weighted Feature Selection
Previous Article in Journal
Anchor-Free SNR-Aware Signal Detector for Wideband Signal Detection Framework
Previous Article in Special Issue
Embedded System for Monitoring Fuel Cell Power Supply System in Mobile Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System

1
Department of Information and Communication Systems, Okayama University, Okayama 700-8530, Japan
2
Department of Electrical Engineering, National Taiwan Normal University, Taipei 10610, Taiwan
3
Department of Industrial Education, National Taiwan Normal University, Taipei 10610, Taiwan
*
Authors to whom correspondence should be addressed.
Electronics 2025, 14(11), 2261; https://doi.org/10.3390/electronics14112261
Submission received: 22 March 2025 / Revised: 8 May 2025 / Accepted: 12 May 2025 / Published: 31 May 2025
(This article belongs to the Special Issue New Advances in Embedded Software and Applications)

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.
Keywords: JPLAS; Java programming learning; learning requirements; generative AI; prompt engineering; quality control; prompt optimization JPLAS; Java programming learning; learning requirements; generative AI; prompt engineering; quality control; prompt optimization

Share and Cite

MDPI and ACS Style

Zhu, Z.; Funabiki, N.; Mentari, M.; Aung, S.T.; Kao, W.-C.; Lee, Y.-F. An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System. Electronics 2025, 14, 2261. https://doi.org/10.3390/electronics14112261

AMA Style

Zhu Z, Funabiki N, Mentari M, Aung ST, Kao W-C, Lee Y-F. An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System. Electronics. 2025; 14(11):2261. https://doi.org/10.3390/electronics14112261

Chicago/Turabian Style

Zhu, Zihao, Nobuo Funabiki, Mustika Mentari, Soe Thandar Aung, Wen-Chung Kao, and Yi-Fang Lee. 2025. "An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System" Electronics 14, no. 11: 2261. https://doi.org/10.3390/electronics14112261

APA Style

Zhu, Z., Funabiki, N., Mentari, M., Aung, S. T., Kao, W.-C., & Lee, Y.-F. (2025). An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System. Electronics, 14(11), 2261. https://doi.org/10.3390/electronics14112261

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop