Non-OOP Classes due Wed 31 Jan 10:00

In this assignment you will:
\item Create a ...
...tinue working with {\tt git} from the command-line

Preparation for Lab Day

Do these steps:
  1. In your workspace, make sure you have the latest homework files from the base repository (git pull origin) and, if necessary, the latest files from your bitbucket repository (git pull mine).
  2. In the provided hw03 directory create a new class called Movie that will store movie information (title, genre, and year) for a single movie.
  3. Add JavaDoc comments to document your new class.
  4. In the same directory create a source file named that will contain main() and will be used for the purpose of testing your new movie class. Add JavaDoc comments to this new file as well.
  5. In (heretofore known as ``the driver'') create an instance of your Movie class, initialize it and print its contents to verify it is working.
  6. Commit your changes and then push the changes to bitbucket.

Lab Day

For this lab day you can work on the lab computers or on your own computer (if it is with you in the lab). In the instructions below, the term ``your workspace" refers to the files you are working on whether they are on your own computer or on the lab computer.

  1. In your workspace make sure you have the most recent code from the base repository and from your homework repository on bitbucket.

  2. Open the you created in the prelab assignment and show it to the lab instructor.

  3. Modify the Movie class to have a constructor with three parameters used to initialize the object. Modify the driver code to demonstrate your constructor.

  4. Modify the Movie class to have a toString() method. (See and Modify the driver code to demonstrate the new method.

  5. Show your work to the instructor. Then commit your changes.

  6. In your driver create an array of 10 Movie objects. Use a for-loop to initialize them (via your constructor) to have the following contents:
    Title      Genre     Year
    Movie 1    Action    2000
    Movie 2    Action    2001
       .         .         .
       .         .         .
       .         .         .
    Movie 10   Action    2009

  7. Have the driver display all 10 movies.

  8. Once you are satisfied with your program commit your changes. Then push your lab day work to your hosted repository.

  9. If you finish early begin work on the homework assignment.

Quick Links