• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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().
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic