Bookmark Topic Watch Topic
  • New Topic

Questions about Inventory part 3  RSS feed

 
Os Stewart
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello, I am starting on my Inventory part 3 Java and I am running into some problems here. Here is the assignment:

Modify the Inventory Program by creating a subclass of the product
class that uses one additional unique feature of the product you chose
(for the DVDs subclass, you could use movie title, for example). In the
subclass, create a method to calculate the value of the inventory of a
product with the same name as the method previously created for the
product class. The subclass method should also add a 5% restocking
fee to the value of the inventory of that product.
Modify the output to display this additional feature you have chosen and
the restocking fee.


I am having some difficulty. I modified one of the Inventory 2 programs I had this week into this, and I have a few questions.

1.) does this code represent what I am trying to do in my assignment, as stated above?
2.) Line 138 is an error "bad operand for (+)"
3.) Line 142 and 148 are warnings to "Add @override"


My code will not compile.
Also, I do not have very good Java lingo skills. I am not that good at Java and I'm trying to learn, but I just can't get it. I'm two weeks from graduating and I just want to get past this class. This is the only class I have had difficulty with.

 
Tony Docherty
Bartender
Posts: 3271
82
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Locking this as it is a duplicate of http://www.coderanch.com/t/628181/java/java/Java-Beginner-Inventory-Program
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!