In this study, we assess the efficacy of employing the ChatGPT language model to generate solutions for coding exercises within an undergraduate Java programming course. ChatGPT, a large-scale, deep learning-driven natural language processing model, is capable of producing programming code based on textual input. Our evaluation involves analyzing ChatGPT-generated solutions for 80 diverse programming exercises and comparing them to the correct solutions. Our findings indicate that ChatGPT accurately generates Java programming solutions, which are characterized by high readability and well-structured organization. Additionally, the model can produce alternative, memory-efficient solutions. However, as a natural language processing model, ChatGPT struggles with coding exercises containing non-textual descriptions or class files, leading to invalid solutions. In conclusion, ChatGPT holds potential as a valuable tool for students seeking to overcome programming challenges and explore alternative approaches to solving coding problems. By understanding its limitations, educators can design coding exercises that minimize the potential for misuse as a cheating aid while maintaining their validity as assessment tools.
翻译:本研究评估了使用ChatGPT语言模型为本科Java编程课程中的编程练习生成解决方案的有效性。ChatGPT是一种基于深度学习的大规模自然语言处理模型,能够根据文本输入生成编程代码。我们通过分析ChatGPT为80个多样化编程练习生成的解决方案,并将其与正确解决方案进行比较,进行了评估。研究结果表明,ChatGPT能准确生成Java编程解决方案,这些方案具有高可读性和良好的结构组织。此外,该模型还能生成替代性的、内存高效的解决方案。然而,作为自然语言处理模型,ChatGPT在处理包含非文本描述或类文件的编程练习时存在困难,导致生成的解决方案无效。总之,ChatGPT有潜力成为学生克服编程挑战和探索解决编程问题替代方法的有价值工具。通过理解其局限性,教育工作者可以设计出既能减少其被滥用作作弊工具的可能性,又能保持其作为评估工具有效性的编程练习。