In this assignment, you are given a Java program that reads a data file containing the results of all Academy Awards up until 2010 (I couldn't find a more recent data set!) and then allows the user to query for: the winner of the Best Picture award for a given year; the nominees for the Best Picture awards in a given year; and, the results (win or nominee) for a given person in the acting categories.
The code works as expected and is reasonably readable, understandable, etc., but suffers from some problems related to its design in terms of modularity, functional independence, abstraction, and information hiding. Your job is to identify the design problems with this implementation and explain why they are problems. Note that you do not need to fix or modify the code!
This assignment is worth a total of 50 points. You must work alone on this assignment.
BUT CHECK THIS OUT! If you come to class on Thursday, February 28, and participate in the discussion that day, you will get full credit on this assignment, and you don't even need to turn anything in! All you need to do is show up and participate! We will split the class up into smaller groups (you will receive your room assignment via email) in order to make the disussions more manageable.
However, if you don't come to class that day, you must submit your solutions via Blackboard by the due date. Boo.
1. The program should show a prompt asking the user to choose one of the following options: see the Best Picture award winner for a given year (user story #2); see the Best Picture award nominees for a given year (user story #3); see all awards and nominations for a given actor/actress (user story #4); quit the program (user story #5). If the selection is not valid, the prompt is shown again.
2. If the user chooses to see the Best Picture award winner for a given year, she is asked to enter the year. If there is a winner for that year, the name of the film is displayed and then the prompt is shown again (user story #1).
3. If the user chooses to see the Best Picture award nominees for a given year, she is asked to enter the year. If there are nominees for that year, the names of the films are displayed and then the prompt is shown again (user story #1).
4. If the user chooses to see the awards for a given actor/actress, she is asked to enter all or part of the person's name. If there is any actor/actress whose name includes the inputted text and who has won or been nominated for an award, the person's name is displayed along with the category and whether or not the person won. Then the prompt is shown again (user story #1).
5. If the user enters the single letter 'q' or 'Q' at the prompt, the program should terminate.
6. For user stories #2 and #3, before reading the text file, the program should check an in-memory cache to see if the data has already been retrieved. On a cache miss, i.e. if the data is not already in the cache, it should be placed into the cache after being read from the text file.
7. The program should log all user inputs to a text file, along with the timestamp and the name of the Java class that is writing to the file. Additionally, it should also log cache lookups, cache hits and misses, and search criteria.
Your task is to review the existing code and identify its design flaws, considering the following:
If you are unsure about the meaning of any of these terms, refer to the lecture notes.
Note that during this part of the assignment, you should not be focusing so much on coding conventions, performance, style, etc., but rather on the design issues related to the criteria listed above; the implementation is only provided so that you can see how the classes relate to each other. If you are unsure about the things you should be analyzing, please ask a member of the instruction staff.
Also: you may find bugs in the code. These are inadvertent, and you do not have to worry about fixing or addressing them. Just focus on the design issues from the listing above.
However, if you don't go to class that day, please fill out a spreadsheet like this one in which you indicate:
To submit your assignment, follow the submission instructions for turning in your analysis spreadsheet via Blackboard.
Updated: Thu, Feb 21 2013, 11:01am