Page 1 of 1
Final Project RetailItem Class Description - The description field references a String object that holds a brief descrip
Posted: Fri Jul 08, 2022 6:16 am
by answerhappygod

- Final Project Retailitem Class Description The Description Field References A String Object That Holds A Brief Descrip 1 (81.47 KiB) Viewed 39 times

- Final Project Retailitem Class Description The Description Field References A String Object That Holds A Brief Descrip 2 (28.45 KiB) Viewed 39 times
Final Project RetailItem Class 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.
Test code (.java) structure: public class Your TestFile{ } public static void main(String[] args) { // block of code to test your class } } class YourClass{ // block of code // documentation with UML for your class This is your test code This is your class and put it after your test code without "public" Add your documentation and UML here. Don't use a box just dotted line (-------) will do good for your UML.