A developer is writing an HR system using Object Oriented Programming (OOP). The HR system will hold details of all employees, their pay, schedules, and other data. During the design, she decides that she needs an "Employee" Class. Which of these options would best describe the "Employee" Class?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
In a classic OOP system your classes should define the data to be held, the defaults used when the class is used, and the behaviour that class exposes (by defining methods). All of these components together are the full definition of a class (although in some cases your class might not have any sensible defaults).
In case you were wondering - Answer 2 : "The data relating to a single employee" is properly called an instance of the Employee class, and Answers 1,3 & 5 are parts of the class definition - but not the whole definition.