CS 3723 Programming Languages
Questions and Answers

  1. Question: I am in your Prog Lang class, and I have never written a Java program in the Linux/Unix environment, I was hoping you could tell me how to run/compile the java program.

    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

    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.


  2. Question: (Mon Jan 19 12:29:09 2004) Hi, i have a question about lab 1. In part e we are to write a "java source program that recovers the hidden loops and structures of the C program in Section 4". So, are we supposed to write a different java program that does the same thing as the one without GoTos, but using ifs and loops instead of one while loop and one switch statement? In other words what's the main different between this (Part e) and part a of lab one?

    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.


  3. Question: (Mon Jan 19 12:32:13 2004) On your automatic submission, if we submit our file, then make changes and resubmit it, will it update our old one to be the most current one we submitted, or can we only submit once?

    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.


  4. Question: (Sun, 25 Jan 2004 16:29:13) In Recitation 2, is it nessary to consider an incomplete comment with a missing "*/", such as:
    
       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.


  5. Question: (Mon, 23 Feb 2004 09:14:09) Where are the old exams?

    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.