For most homework assignments you will update your shared, hosted git repository prior to the due date/time. You will not need to submit anything in Canvas unless instructed to do so in the assignment. When I grade your work I will leave feedback in Canvas and possibly also in your shared repository.
IMPORTANT: Each homework assignment assumes you have completed its corresponding lab day requirements prior to starting the assignment. You should take the time to complete the lab day exercises before you start the homework.
Edit the Java source code and add a new method called searchByYear that accepts the three arrays as parameters along with the number of elements in the arrays. It will not return any values. Leave the body of the method blank except for a single print statement that gives a message “Search by Year”. Do, however create a comment that conforms to JavaDoc requirements (see other comments as examples). As part of your homework assignment you will actually complete this method. For documentation purposes you need to know what this function will do: prompt the user to enter a year and display all movies that match the given year.
NOTE: A method that has a defined header but that does nothing is called a “stub” method.
If you look at the method called menuChoice you can see that the user is prompted to enter a value of 6 to select the “Search By Year” action. In main() (inside the while loop) add an if-statement that will call the mostly empty searchByYear method in the event the user entered a at the menu. Compile, test, and tweak as necessary to get the changes you made to work. When the user enters 6 at the menu they should see the output of the single print statement in the new searchByYear method.
It is time to commit your changes. Remember the sequence:
Go ahead and fully implement the searchByYear method so it works. When displaying matching entries you can copy the printf statements in the displayAll method. For testing purposes you may find it helpful to add some statements in main() that will put three or four movies into the parallel arrays so you don't have to enter movie information each time you run the program.
Once your method is fully tested and deemed to be working commit your changes to the local repository with a message that indicates you have finished the first homework assignment. Then push your changes to your hosted repository.
Your program should be completely working and should follow all of the programming conventions named in class and explained in http://josephus.hsutx.edu/classes/all/javaconventions/ (including the use of comments that conform to the JavaDoc guidelines).
The instructor will grade your work based on what you have pushed to the hosted homework repository you have shared. For all assignments the program is due before the beginning of class on the due date. Repositories that show a commit time after that time will be graded as late.