For this tutorial, you will add to the project that you created in Tutorial 3. If you did not do Tutorial 3, then review the steps for creating the project and adding files to it.
Download these files to the ProgrammingActivitiesFiles directory that you created in Tutorial 3.
Before you modify the files, I want you to move them to a directory inside
the Source Packages
folder. Reivew these steps in Tutorial 3
for screen shots.
Source Packages
and select New -> Java
Package
.
username.ch6.one
(replace
username with your webmail user name). Click Finish
.
Cut
.
Paste ->
Refactor Move
. It is very important that you select Refactor
Move
and not just Move
. When you refactor, it changes
all the files that are affected by the move.
Refactor
.
Only edit the Cashier.java
file.
getNext
method to retrieve the next item on the conveyor
belt.
Item
.
getPrice
method.
animate
method with the total.
Run the program several times.
Download these files to the ProgrammingActivitiesFiles directory that you created in Tutorial 3.
Before you modify the files, I want you to move them to a directory inside
the Source Packages
folder. Reivew these steps in Tutorial 3
for screen shots.
Source Packages
and select New -> Java
Package
.
username.ch6.two
(replace
username with your webmail user name). Click Finish
.
Cut
.
Paste ->
Refactor Move
. It is very important that you select Refactor
Move
and not just Move
. When you refactor, it changes
all the files that are affected by the move.
Refactor
.
Only edit the Cashier.java
file.
checkout
method to control how many
times the loop iterates.
getNext
method to retrieve the next item on the conveyor
belt.
Item
.
getPrice
method.
animate
method with the total.
Run the program several times.
To submit the tutorial, perform a Clean and Build on for the project. Be sure that you have followed the instructions for adding .java files to the JAR file before you do this step. If you are not sure, then review the steps in the Creating a NetBeans Project from Existing Sources page; it is in the section on Submitting Assignments.
You can verify that the JAR files are correct by clicking on the Files tab in NetBeans; open the project folder; open the dist folder; expand the JAR file. You should see the .class and .java files in the JAR. If you only see the .class files, then you need to review the instructions for adding the .java files. This is the same for NetBeans 5.5 and 6.
Using the operating system, not NetBeans, navigate to the dist directory for the project and upload the JAR file to me: Submit Assignment.