This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Errata K&B OCP 7 p. 557  RSS feed

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Two-thirds of the way down page 557 in the third line of class Student, shouldn't new BookDao() be new InMemoryBookDao()?

BookDao dao = new BookDao(); // current
should be:
BookDao dao = new InMemoryBookDao(); // proposed

As per the next page, 558, BookDao is an interface, which can't be instantiated,  and as per the class at the top of 557 the class is InMemoryBookDao.

Just wondering.

m.
 
Marshal
Posts: 60194
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are right; I cannot unfortunately find the errata on the publisher's website so I don't know whether that has been reported before.
 
Mark Kevin
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I can't find the publisher's website errata page either, but it hasn't been listed on coderanch's errata page. Also, it would make much more sense and be clearer if the interface snippet BookDao on p. 558 directly preceded class Student on page 557. It really threw me off.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!