Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Questions about Inventory part 3

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Locking this as it is a duplicate of https://coderanch.com/t/628181/java/java/Java-Beginner-Inventory-Program
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic