CS 3723 Programming Languages
|
Answer: You don't have to write Java in the Linux/Unix environment. Instead you can use the JBuilder9 that you are used to. (And JBuilder9 runs under Linux, in particular Red Hat, and I have it running under SuSE.) I haven't been able to find out if JBuilder9 is in the Linux lab yet.
You can also run Java easily using the Java JDK directly: with commands
"% javac Filename.java" to compile "% java Filename" to run "% appletviewer Filename.html" to run an applet
Here "Filename.java" is a Java file defining the class "Filename". The "javac" creates an executable file "Filename.class", and "java" uses the Java Virtual Machine to execute this. ("%" above is the Unix prompt.) You can use your code from 1713/1723 and just leave off the "package" line at the top. "Filename.html" above is an HTML file that invokes "Filename.class" as an applet.
Answer: I think you understand. Part a, with its single while loop and its single switch statement is an artificial program that is essentially the same as the program with gotos. It provides no additional insight into the program (or algorithm). Part e is asking you to recover the _real_ program, by recovering the underlying loops and ifs, etc. This is then a program that you might be in a better position to understand.
Answer: The system saves each separate submission (unless you manage to submit them during the same second). We will grade the latest one submitted for full credit, and the latest one submitted for part credit. You cannot delete or overwrite an old submission.
14.47 /*simple form 62. EOF
Answer: This is also called an "unexpected end-of-file". All you need to handle is the given input. This unexpected EOF (and certain other problems) you don't need to worry about, although it would not be particularly hard to handle it.
Answer: At the bottom of the course web page I have a table of links to earlier web pages. At the bottom of these you'll find links to various exams.