Development of a Block-to-Text Code Translation Mechanism in a Visual Programming Environment for Object-Oriented Programming Learning
Abstract
Object-oriented programming (OOP) is a core competency for vocational students in software and game development programs, yet concepts such as inheritance and polymorphism are widely reported as difficult and abstract for novices. A needs analysis at a vocational school in Sumedang, Indonesia, found that most students struggled with syntax-related errors and expressed anxiety about transitioning from block-based to text-based programming. This study aimed to design, develop, and validate a block-to-text code translation mechanism embedded in a Visual Programming Environment (VPE) for learning OOP. The study followed the Analysis, Design, and Development stages of the ADDIE model. Data were collected through questionnaires, interviews, and expert validation instruments, and analyzed descriptively. The developed VPE organizes seven color-coded block categories representing OOP constructs and converts completed block programs into valid Java syntax through an Abstract-Syntax-Tree-based translation engine that performs semantic validation, recursive code generation, and automatic formatting. Expert validation using an adapted ISO/IEC 25010:2023 instrument and the Criteria for Evaluation of Visual Programming Languages rubric produced average scores of 89.17% and 83.75%, respectively, all in the “very good” category. These findings indicate that the developed VPE is technically sound and ready to be used to bridge students’ transition from block-based to text-based programming. Further studies are recommended to examine its classroom effectiveness.