Cal State L.A. logo and University Seal - Link back to main page

CIS 283 - Programing assignment00b

Email: jperezc at calstatela.edu

 

For this assignment you are going to write another simple Java program called:

- MySecondClass

Here are the steps you have to follow in order to complete this assignment:

    1. create a file called MySecondClass.java using a text editor (notepad, for example, if you are using Windows).
    2. save file MySecondClass.java in a folder called Assignment00b
    3. the file MySecondClass.java must contain the following:
    4. class MySecondClass {

      }

    5. download file Test.class from:
    6. http://www.calstatela.edu/faculty/jperezc/courses/CIS283/programming_assignments/ProgrammingAssigment00b/Test.class.zip

      (you can download the file by right-clicking on the link above)

      in case you have an older version of the compiler try this: Test6.class.zip and use java Test6 instead of java Test

    7. save Test.class in folder Assignment00b
    8. open the DOS prompt window
    9. change directories to directory Assignment00b
    10. in order to compile your program type:

      javac MySecondClass.java

      if your file compiles without problems you now should have a file called MySecondClass.class in your Assignment00b directory

    1. after the file compiles without errors, type:

      java Test

      tests will be run on your code and appropriate messages will be printed out showing which tests passed and which failed. At the end the program will tell you which option to enter as the correct answer in the corresponding quizz in moodle.

    1. enter the correct answer in moodle, and submit. You can submit only once and only during class time or else it will not count as lab work.