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
Joined: Aug 30, 2000
Posts: 3141
posted
0
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