hw.docx

Based on the class diagram, you are exposed to produce/program the following codes:

1. Add setter/getter methods for 1. One attribute in Category class and 2. One attribute in Product class. The setter should change the attribute value and the getter should read the attribute value.

2. Modify the signature of the calcPrice method to take two inputs, productName as a string and unitCost as float.

3. Modify the signature for the method displayProduct in Product to include one input (productID) and return a boolean.

4. Modify return types for attribute imageFileName to be from a library class (File) rather than a string

5. Create a client class to include the Main method and then instance 3 objects in the main method [ one object from each class: Category, OrderDetail, and Product).

** 6. Rewrite the code for the first exam to include 3 different types of try catch-exceptions. Do not use: The general exception (Exception), a user-defined exception or throw exception. Make sure you use 3 different types that are relevant based on your code.

Due by April 10th. 11:30pm New York.