Question: Part 1 Create a class named Art. This class will represent a single work of art. The class should have three private instance variables: two


Part 1 Create a class named Art. This class will represent a single work of art. The class should have three private instance variables: two String instance variables that store the name of the work of art and the artist, and an ArrayList of Strings that stores keywords that describe the work of art. The Art class should have the following methods: A constructor that has two parameters: the name of the piece and the artist. The constructor should use the parameters to initialize the appropriate instance variables. It should also create an empty list for keywords. getName that returns the name of the work of art getArtist that returns the artist's name addKeyword that has one parameter, a keyword. This method should add the keyword to the list of keywords describing the piece. matches that has one parameter, a keyword. The method should return true if the keyword appears in the list of keywords and false if it does not. Create a driver class named Lab14Driver. Test your Art class by creating one or more Art objects and adding keywords to these objects. Be sure all of your methods work correctly before going on to part 2. (Hint: If you'd like, you may use Google to find artists and their works. The descriptions of each work of art can be used to find keywords
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
