Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jxam

 
satishind Reddy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question i got from jxam.
Employee is a person. For every employee, we keep a vector with the working hours, an integer for the salary and a variable that can be true or false whether or not the employee has a company car.

Indicate which of the following would be used to define the class members.
Given Options
a) Vector //ok
b) Employee
c) Object
d) boolean //ok
e) int //ok
but given answer is 'a' only can any one throw light on this...
Regards
satish
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi satishind,
The question is not worded very well. When I first read it, I interpreted as you did. There would be one var of Vector type to hold hour objects, a second var of int type for salary and a third var of boolean type to hold the car info.
Based on the answer given, think they meant to imply that the Vector would contain all three objects: working hours, salary and car flag.
Hope that helps.
------------------
Jane
 
Serge Plourde
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you're right, Jane.
 
satishind Reddy
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jane.
Hope we will not get this type of questions in real exam.
any how Thanks once again.
Regards
Satish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic