Hi, just list down which one is classes,data,members function,and object no coding required. I just want to confirm my answer.
Observe the following program determine the output and answer the question below.
a.List down classes created
b.List all the data and members function of the class
c.List down object created
a. classes = Employee
b. data = name, salary[40]
members function= void getData(), void dispData(), q.getData(), q.dispData(), r. dispData()
c. object = Employee q, Employee r
It is a badly formed (C++) program; it won't compile. main() should have the return type int
To use the facilities of the standard library, the appropriate header must be included (#include <iostream>)
Use of unqualified names cout, cin and endl requires a using directive or using declarations.
Once these errors are fixed:
class: Employee
member variables of Employee: name (array of 40 char), salary (float)
member functions of Employee: getData ( void() ), dispData( void() )
named objects in main : q (Employee), r (Employee)
Note: We ignore all unnamed objects created by the program (for example the string literals used in the member functions). We also ignore the named objects which are brought in to the program by #include <iostream>