CMSC131 Spring 2005
Quiz #7: Take home exercise
Due May 6, 6:00pm
This is a CLOSED assignment.
This
quiz is a take-home exercise. The objective is to practice Unix
commands and to run Eclipse in a Unix environment. Keep in mind that Eclipse only runs on glue
machines running the Solaris operating system.
One lab with machines you can use is AVW 1442. You should complete this exercise using a Sun
machine available in these labs. Make
sure you start this exercise as soon as possible, as the labs get busy as the
deadline approaches. You must abide by
the guidelines defined in the closed homework policy: http://www.cs.umd.edu/class/spring2005/cmsc131/openClosedPolicy.shtml
For the questions below, you will be experimenting
with Unix. Open two windows on your computer. In one window you will create a file (using
the pico editor) named answers.txt. In this file you will cut and paste the
results of commands we will ask you to execute.
In the second window, you will execute commands. Make sure that you numbered your answers in
the answers.txt file.
1. A directory in
the glue system named /users/nelsonp/pub/quiz7Files has a file
called personalInfo.txt. Copy this file to
a directory named myWork in your glue home directory
and edit the file with your personal information. You may need to change the permissions of the
personalInfo.txt file before editing it.
2. Once you have
edited the personalInfo.txt execute the command
ls -al myWork
and cut and paste the results
to the answers.txt file. The answers.txt
file must be in your home directory and not in the myWork
directory.
3. Go to your
glue home directory and execute the command
ls –F
Write down in your answers.txt file the names of
directories present in your home directory.
4. Execute the
command
pwd
and write the result in your
answers.txt file.
5. Copy the
directory quiz7Files (and its contents) into the directory myWork. Write down the command you use to copy the directory
in your answers.txt file.
6. Rename the
quiz7Files directory to quiz7FilesOriginal and execute the command
ls -Ral myWork
Cut and
paste the results of the above command in your answers.txt file.
7. Using the pico editor, write a java program (in the directory myWork) that prints (using System.out.println)
your name and section. Compile your
program using javac and run your program using
java. Named your file myProgram.java . In the directory where your program resides,
execute the command
ls –al
and cut and paste the results in your answers.txt file.
8. Execute the
following two commands and cut and paste the results in your answers.txt file.
date
who
9. Go to the
directory myWork and cut and paste the results of executing
the following commands
cd . (cd
followed by a period)
ls
10. Go to the
directory myWork and cut and paste the results of
executing the following commands
cd .. (cd
followed by two periods)
ls
11. Using ssh log onto your wam account and create a file named myPersonalInfoWam.txt
which has a list of the courses you taking this semester.
12. Using scp transfer the file
myPersonalInfoWam.txt from your wam account to your myWork directory in your glue account.
13. Rename the
file myPersonalInfoWam.txt to myPersonalInfoSCP.txt
14. Transfer the
file myPersonalInfoWam.txt from your wam account a
second time but using ftp instead of scp. Leave the myPersonaInfoWam.txt file in the
directory myWork.
15. In your glue
account, launch eclipse following the instructions available in the Eclipse
tutorial section titled “To launch Eclipse on Solaris Machines”
16. Connect to
your cvs repository and checkout the project
quiz7. Edit PUPIL_COLOR constant in the JavaEyes.java file so the
color of the pupil is red (Color.red). Run the program to make sure your change is
correct.
17. Import your
answers.txt file into your quiz7 project.
18. Create a jar
file with the contents of your myWork directory. For example, the following command could be
used to create this jar file:
jar cvf
toSubmit.jar myWork
19. Import the
previous jar file (toSubmit.jar) into your quiz7
project.
20. Submit your
quiz7 project using the Submit project option.
The submit server considers quiz7 as Project#9, so don’t be surprised if
you see this number in several messages used by the submit server. Make sure that you download your
submission from the submit server and then verify the submission has all the
expected files. We have not set any
submit server tests for the quiz therefore it is your responsibility to make
sure all the expected files are submitted.