The Java Programming Learning Assistant System (JPLAS) has been studied to enhance Java programming educations by offering advanced self-learning environments. As one problem type in JPLAS, the code writing problem asks a student to write a source code to satisfy the specifications described in a test code that verifies the correctness of the code on JUnit. Previously, we proposed an informative test code approach to help a novice student to complete a complex source code using concepts in the object-oriented programming. It describes the necessary information to implement the code, such as names, access modifiers, and data types of classes, methods, and variables, in addition to behaviors. Unfortunately, it has drawbacks in handling input/output files for an assignment. In this paper, we propose an improved informative test code approach by adopting the standard input/output to solve them. For evaluations, we generated improved informative test codes for five graph algorithms and requested three students in our group to write the source codes, where all of them completed the source codes with high software metrics.