• 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

Jxam question

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ques-
You get this description of a class:
Employee is a person. For every employee we keep a vector for the working hours, an integer for the salary and a variable which can be true or false, whether or not an employee has a company car.
Indicate which of the following would be used to define the class members?
1)Vector
2)Employee
3)Object
4)boolean
5)int
Ans is 1)Vector
Why boolean & int are not the answers ?
- Is it that vector will be a static variable having working hours of all the employees & boolen/int will be just instance variables and so then don't come into class members?
Pls clarify !!!
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not think so.
"For every employee we keep a vector"
This should imply an instance member.
IMHO either the question is ambigous, or the answer is wrong.
 
reply
    Bookmark Topic Watch Topic
  • New Topic