After students choose a panel in a Top-down panel, and insert a value in a user input textbox, they can confirm the result of the program for the cho-sen value... However, it is difficul
Trang 1Most lecturers have felt that there were difficulties in teaching concepts of com-puter programming For example, it is difficult for students to comprehend the over-flow and underover-flow concepts Thus, we hope that Flash animations will help students understand concepts The Flash animation in Fig 3 shows when an overflow occurs Learners can easily grasp the concept of overflow for an integer type variable
Fig 2 An HTML page for lecture notes
Fig 3 Flash animation for explanation of the overflow concept
Trang 2Fig 4 Applet for the printf function
Fig 5 List box for format selection
Fig 6 is an applet for an iterative statement ( while, do-while , for, nested for , break, continue ) After students choose a panel in a Top-down panel, and insert a value in a user input textbox, they can confirm the result of the program for the cho-sen value
Trang 3Fig 6 Interactive statement applet
A pointer is a variable that contains the address of another variable Since a pointer contains the address of an object, it is possible to access the object indirectly through the pointer Pointers are so commonly used as references in general, partly because they are sometimes the only way to express a computation, and partly because they usually lead to more compact and efficient code than can be obtained by other means However, it is difficult for students to understand the concept of a pointer Therefore
we implemented a pointer applet Fig 7 is an applet for comprehension of the con-cept of a pointer address After students choose an item from a selection box and guess the result, they can in fact confirm the result
Fig 7 Numeric calculation
An animation or visualization for comprehension of the algorithm concept is the most efficient means to learn different types of algorithms Sorting is one of the most peda-gogical exercises to introduce algorithms Sorting refers to algorithms that take the items from the array and put them in order The goal of the sort applet is to present students with a visual way to understand the means by which the most common algorithms work,
Trang 4Fig 8 Applet for understanding a sorting algorithm 2.2 Implementation of a Web-Based C Compiler
Intranet Compilers Architecture; during software development it is important to jus-tify which components of the software should run on the client machine and which components should run on the server Client side programs – Java Applets - are trans ferred through the network when requested and execution is performed entirely on the
Fig 9 Sorting method selection
Trang 5client machine that made the request This enables sharing of the computational cost between the server and client This approach can be used when programs to be trans-ferred to users are moderate in size, or are to be cached on the client machine, or the data is to be transferred between server and client, in case the application is run on the server, when it is very large In the case of platform independent solutions, such as Java, lower computational performance may be prohibitive Using CG,I much less information has to be passed to the server The server executes instructions based on the given information and sends the results back to the local machine that made the request This is used in the opposite cases, when the software package is large or must not be released to the user, or when the amount of data to be transferred is small However, large number of clients that access the server simultaneously would make the CGI-based approach undesirable Therefore, in order to solve this problem, we implemented a web-based C compiler Our system for C programming uses none of the commercial software packages This makes the system independent of the process
of commercial software development, in which a particular version of the software might become obsolete very quickly Our system uses a server side compiler in the LINUX environment, through the Internet, instead of using a desktop commercial compiler Therefore not all students need purchase and install a commercial compiler
on their PC in order to study the C Programming Language They just connect to our system using a Java Applet and send their C language source code to the server side, then, the result of program execution will be be returned to them The web-based C compiler shown in Fig 10 is implemented by Java I/O Applet and GCC at the server-side This system is providing a web-based compiler to make learning content to change program code directly and confirm it exactly Utilization of the web-based compiler will be economically helpful to students who do not have a separate C com-piler In Fig 11, a Java I/O Applet receives program source code from the clients., In Fig 12, it makes them a file and passes them for compilation via GCC In Figs 13-14, GCC's execution result or error messages will be returned to the clients by the Java I/O Applet
Fig 10 Functional diagram of a web-based compiler