There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
John Locke wrote:Hmm. Okay. So I just need to create a print statement in DVD2 for each dvd's genre?
John Locke wrote:I added genre to DVD but I cannot completely get rid of DVD2 because having that class is a requirement for my assignment. Can I just use it for something like calculating the restocking fee?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
John Locke wrote:My instructor just informed me that I am not supposed to make any changes to my DVD or Inventory classes. I need to create a method for adding a 5% restocking fee, add an additional feature (I chose to add the genre for each dvd), and then modify the output to display those things. So all of this needs to be done from my DVD2 class.
John Locke wrote:If I do what Fred had suggested wouldn't I be editing my 'inventory' class?
John Locke wrote:So I start by adding my dvds
in my DVD2 class, correct?
John Locke wrote: Does it look okay or no?
John Locke wrote:I tried running that but got this error:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The constructor DVD2(int, String, int, double) is undefined
The constructor DVD2(int, String, int, double) is undefined
The constructor DVD2(int, String, int, double) is undefined
The constructor DVD2(int, String, int, double) is undefined
The constructor DVD2(int, String, int, double) is undefined
at inventory.main(inventory.java:13)
Don't get me started about those stupid light bulbs. |