Lab must be completed and
reviewed by Peer Instructor on Thurs, Sept 4 during lab class, and no later
than Thurs, Sept 11, during the first 10 minutes of lab. (Tuesday, Sept 9 is
a lab quiz. No labs will be checked on that day).
Description
This lab is made up of 2
completely different parts. First, you will electronically submit a file the
same way you will submit your lab quiz on Tuesday. Next, you'll add some code
to your lab3.java file.
PART 1 - Submit a file
electronically - Do this in the first 30 minutes of the lab!!!
In order to turn in lab
quizzes and programming assignments, you'll put the necessary files in a folder
on neelix. Turn in the text file you wrote for lab1 (lab1.txt) so we can make
sure the submission process works for you before you have to turn in your lab
quiz (Tues, Sept 9).
- First, look at neelix.
Do this by clicking on Start, Run and type \\neelix in
the box. (Those are backslashes.)
- A window should appear.
Double click the dropbox folder, then ITEC folder, then ITEC120,
then the folder with the username of your instructor, then Submissions,
then the folder that belongs to the section of the class you are in (8am:
01, 10am: 02, 11am: 03, 12noon: 04, 1pm: 05, 3pm: 06), then, a folder with
your username on it, where you should see a folder called RU01.
- Simply copy or drag the
file lab1.txt from your H: drive into the RU01 folder in your folder
on Neelix. You have submitted your file.
- At 30 minutes past the
hour, a collection script will run and move your lab1.txt file from your RU01
folder to a collections folder which only your instructor can see. The collection
script will leave a text file in your folder to let you know it was collected.
Go back to your folder on Neelix and confirm that your lab1.txt file was collected.
PART 2 - Modify the program
you wrote for lab3
You must complete lab3 and
have it checked before you start on lab 4. You don't want to modify lab3 before
it's checked by the Peer Instructor.
The following should be
added to the bottom of your program (it's not a bad idea to save a new copy
of your program: name it lab4. Remember to rename both class and filename.)
Read these steps carefully and do them in this order (so your results will be
correct.)
- create an assignment
statement which will add 1 to the value of larry and store the result back
in larry.
- create an assignment
statement which will make the new value of moe be the values of larry and
curly added together.
- declare a new int variable
called sum.
- create an assignment
statement that adds larry, moe and curly together and stores the result in
sum.
- print out the value of
sum. (Use a println statement with a descriptive string.)
- declare a new int variable
called product, and in it, store the product of larry, moe, and curly.
- print out the value of
product.
- declare a double variable
called quotient.
- take the sum of larry
and moe and divide it by the sum of abbott and costello and store the result
in quotient.
- print out the value of
quotient.
- declare one more double
variable called compute
- take sum and subtract
costello. multiply the result by larry. take that result and add moe. divide
product by the result. and store the result of all that in the variable called
compute.
- print out the value of
compute
Completion Requirements
Once you've completed the
lab, you should show the Peer Instructor:
- Run the lab4 program,
- the PI will compare the
specified output to your output.
- then use PFE to show
your code.
- Your Instructor will
also check to see your lab1.txt file got collected from Neelix.