Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Query about Video.java in Servlets Assignment 4a

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
1. Why does the Video.java constructor not include any reference to the boolean VHS and/or DVD that are in the global variables of Video.java?
2. Any ideas where I should look on the internet for suggestions as to how I should create/connect the boolean references to a Video Object (does it have to be done before the Object is created or after? for example)
All the best,
Kate!!
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't it have get and set methods?
 
Kate Head
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there Marilyn,
Well, it has "setxxx (boolean)" methods, but no "getxxx (return boolean)" methods, only "inxxx (return boolean)" methods, which I haven't come across before - is that how boolean variables are usually "handled"?
I've got the boolean variables to work (a bit like adding chopped fruit to a jelly before it has set?) - probably not up to nitpicking standard!
Many thanks for pointing me in the right direction (hopefully!).
All the best,
Kate!!
[ March 11, 2004: Message edited by: Kate Head ]
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Typically, getters for boolean values are called isXXXX(). Sometimes the grammar gets pretty convoluted to get it to start with "is", so I've seen hasXXX() and areXXX().
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic