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

Saved in:
Bibliographic 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
Authors: Zihao Zhu, Nobuo Funabiki, Mustika Mentari, Soe Thandar Aung, Wen-Chung Kao, Yi-Fang Lee
Source: Electronics ; Volume 14 ; Issue 11 ; Pages: 2261
Publisher Information: Multidisciplinary Digital Publishing Institute
Publication Year: 2025
Collection: MDPI Open Access Publishing
Subject Terms: JPLAS, Java programming learning, learning requirements, generative AI, prompt engineering, quality control, prompt optimization
Description: 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.
Document Type: text
File Description: application/pdf
Language: English
Relation: Computer Science & Engineering; https://dx.doi.org/10.3390/electronics14112261
DOI: 10.3390/electronics14112261
Availability: https://doi.org/10.3390/electronics14112261
Rights: https://creativecommons.org/licenses/by/4.0/
Accession Number: edsbas.EE04CB03
Database: BASE
Description
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.
DOI:10.3390/electronics14112261