• Post Reply 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

package does not exist

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create a clone of linkedListNode videoList (video titles, info, count of video copies) and call it cVList (cVList means customer video list) then resetCopiesInStock the number of video copies to zero for each video and assign an empty cVList to each customer so whenever a customer videoCheckOut a video from the videoList, it will decrement number of copies in videoList and videoCheckOut will increment the number of that exact same video in cVList. I want to know if this is possible and if I'm on the right track. Because I get the errors "mainProgVideoStore.java:196: package cVList does not exist cVList.clone.videoList();" and "mainProgVideoStore.java:197: cannot find symbol symbol : variable cVList location: class mainProgVideoStore cVList.resetCopiesInStock();"

Here is my clone method in the Video class


Here is Main method it's a lot of code to look at but since I'm trying to assign each customer their own cVList
I have all the code in the createCustomerList method near the bottom and near the top
I instantiated it "CustomerList cVList = new CustomerList();"


 
Marshal
Posts: 80244
426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You appear to have missed out a pair of () in that line.
 
Dustin Schreader
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which line did I miss the ()?
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a static method- createCustomerList and you are trying to access instance variables from a static context. (lines 195, 196)
 
Dustin Schreader
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok thank you!
 
BWA HA HA HA HA HA HA! Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic