Description - - The description field references a String object that holds a brief description of the item. Writhe a cl
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Description - - The description field references a String object that holds a brief description of the item. Writhe a cl
Description - - The description field references a String object that holds a brief description of the item. Writhe a class named Retailltem that holds data about an item in a retail store. The class should have the following fields: a) unitsOnHand - The unitsOnHand field is an int variable that holds the number of units currently in inventory. b) Price - The price field is a double that holds the item's retail price. Write a constructor that accepts arguments for each field, appropriate mutator methods that store values in these fields, and accessor methods that return the values in these fields. Once you have written the class, write a separate program that creates three Retailltem objects and stores the following data in them: Item #1 Item #2 Item #3 Description Jacket Designer Jeans Shirt Units on Hand Price 12 $59.95 40 $34.95 20 $24.95 Create only one .java file which is a test code that include your class and documentation with UML diagram for your class. Files to submit: 1. (50 points) Summarize the problem and specify the input data and show your provisional sample output. (fp1_sum.docx) 2. (150 points) Your error free test code that includes your class. (fp1.java) 3. (50 points) A UML diagram for your class (refer to the graph below) 4. (50 points) Creative output screenshot using your test data. Choose your own data to test and show if your program working properly. (fp1.png) 5. If you include a documentation you will get extra points.