A4 ◦ Packages

Go back into your assignments/a3 directory and make the Item class a member of the assignments.a3 package.

Compile the Item class using the following command:

$javac Item.java

Create a directory named in a4 in your assignments directory.

In the a4 directory, create a driver named Test.  In the driver, create an instance of Item and using the instances’s getters, print the name of the item and the cost.

Compile the Test file using the following command:

$javac -cp ../.. Test.java

Run the Test program using the following command:

$java -cp ../..:. Test

Push your code to GitHub.

About the author