This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package does not exist

 
Dustin Schreader
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • 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();"


 
Campbell Ritchie
Sheriff
Pie
Posts: 50270
80
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Which line did I miss the ()?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Ok thank you!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic