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

Gespeichert in:
Bibliographische Detailangaben
Titel: An Automatic Code Generation Tool Using Generative Artificial Intelligence for Element Fill-in-the-Blank Problems in a Java Programming Learning Assistant System
Autoren: Zihao Zhu, Nobuo Funabiki, Mustika Mentari, Soe Thandar Aung, Wen-Chung Kao, Yi-Fang Lee
Quelle: Electronics ; Volume 14 ; Issue 11 ; Pages: 2261
Verlagsinformationen: Multidisciplinary Digital Publishing Institute
Publikationsjahr: 2025
Bestand: MDPI Open Access Publishing
Schlagwörter: JPLAS, Java programming learning, learning requirements, generative AI, prompt engineering, quality control, prompt optimization
Beschreibung: 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.
Publikationsart: text
Dateibeschreibung: application/pdf
Sprache: English
Relation: Computer Science & Engineering; https://dx.doi.org/10.3390/electronics14112261
DOI: 10.3390/electronics14112261
Verfügbarkeit: https://doi.org/10.3390/electronics14112261
Rights: https://creativecommons.org/licenses/by/4.0/
Dokumentencode: edsbas.EE04CB03
Datenbank: BASE
Beschreibung
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