There are three problems in this PSA. Don't worry -- 2 of them you are just making small changes to some given code.
Note 1: Besides writing the code there is an interview process required for this PSA. Your interview is worth 10% of the PSA grade and is done individually.
Note 2: You will be required to submit your result from in the class wiki. This will count for 5% of your PSA grade.
This homework requires skills from all Chapters up to Chapter 6 and Chapter 8.
You must put a comment at the top of your code that specifies, for both you and your partner, your: real names, login names, and PIDs, And a two to four sentence description of the program (one description for each program).
Use a multi-line comment (/* */).
Comments are important. Code must be properly commented to receive full credit.
You must observe an 80 column limit. No line of your program may be longer than the 80th column on the screen.
Shrink
shrink that takes in one paramter int factor that is
the factor that the user wants to shrink the image by. This method should return the shrunken picture.Enlarge
enlarge that takes in one parameter int factor,
which is the factor that the user wants to enlarge the image by. This method should return the enlarged picture.Testing your method (in an application):
PSA8A.java where you will write an application to test your methods.
Start by copying in this
code.boolean done = false then loop while(!done),
finally, once the user enters "done", this method should done = true; so that it can break out of the loop.
Testing your method (in an application):
This range is out of bounds.
Please choose a range that is within (0,0) and (width,height), where width and height are the
actual width and height of the picture chosen to alter.
concatenation
Testing your method (in an application):
PSA8C.java where you will write an application
to test your methods. Before turning in your files, rename all of the sounds you wish to use in this assignment Sound1.wav, Sound2.wav, etc for all sounds you are submitting. If you name them anything else, they will not be collected or turned in.
When you submit, the bundle script will be expecting 10 sounds, if you only have 3 this is OK. You will get a warning saying you are missing files, but as long as you are sure you included all of the sounds you wanted to include, and as long as it says you aren't missing any java files, it it ok and you will not be marked down.
When you are ready to turn in your homework, first open a terminal window by right clicking on the empty area of your computer's desktop (have to use
lab computers or remotely connect from your home computer using SSH or Putty)
and select "Open a New Terminal". Then, run bundlePSA8 from your PSA8/bookClasses directory.
Files are required to be submitted for PSA8:
-bash-2.05b$ cd ~/PSA8/bookClasses
-bash-2.05b$ bundlePSA8
Good; all required files are present:
Picture.java
PSA8A.java
PSA8B.java
PSA8C.java
Sound.java
Any wavs you used (should be named Sound1.wav, etc)
Do you want to go ahead and turnin these files? [y/n] y
OK. Proceeding.
Performing turnin of approx. XXXX bytes
Copying to /home/linux/ieng6/cs8f/turnin.dest/cs8wxx.PSA8
.
Done.
Total bytes written: XXXX
Please check to be sure that's reasonable.
Turnin successful.
Make sure the Turnin is successful, otherwise we won't receive your submission! . If you want to make changes after you've turned in your homework, make the changes and run bundlePSA8 again. The program will warn you that a "previously turned-in file exists" and ask if "you wish to over-write this existing file". Respond in the affirmative by typing y and pressing the Enter key.
10% of your grade on this assignment will come from an interview you will have with one of the tutors during Open Lab Hours. You have 48 weekday hours after the electronic turnin deadline to get your interview done. The deadline for the interview for PSA8 is Thurs Feb 26th (theoretically at midnight, but actually by the end of the last tutor hour scheduled). Remember, the tutors may be busy after 4pm helping CSE8B students
You get an interview by going into B260 during a scheduled tutor hour. Find the tutor, ask them if you can interview for the 8A PSA. If they have others who are waiting for interviews, your name will go on the end of the list of people waiting. Interviews take about 5 minutes each. It is your responsibility to go in early enough that you can get your interview completed. If everyone waits until the last hour on Thurs, this will not work.
For the interview you will need to have a copy of your team's assignment in your account. If you are using your partner's account to submit the files, make sure you email them to yourself and save them under your account so that you have them available for the interview. The tutor will ask you to log in, change to the directory where your work is and then to follow their directions. They will ask you to run your program to show that it works, open files in Dr. Java (or your favorite editor), and ask you questions about HOW your code works. Additionally, they may question you as to how you would (theoretically) make small changes to the program to have it do something slightly different. You will not actually be required to change your code.
Learning to be able to explain your problem solving process and discuss code with another human being is a very important professional skill. We hope that this process will help you develop this skill.