Advertisement
akosiraff

Product JAVA

Nov 24th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/product-java-2/
  3. Create a class to encapsulate the data and behavior of a product in a store’s inventory. The class should have the following data for an inventory item:
  4. Product Number – String
  5. Description – String
  6. Quantity on hand – int
  7. Product Price – double
  8. Use appropriate access modifiers when defining the data
  9. Code accessor and mutator (get and set) methods for all class instance variables. Be sure to follow the class style and use _ as the name for the parameter corresponding to the class instance variable. (Note the “_” starting the parameter name.)
  10. If the product number or description is blank, or the values passed for the quantity or price are not valid, leave the associated instance variable unchanged.
  11. Create a class method to calculate and return the total amount for the product based on the quantity on hand and the product price.
  12. Use appropriate modifiers when creating the methods
  13.  
  14. Download: http://solutionzip.com/downloads/product-java-2/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement