Question: Write the class definition for a class named Employee. The class should include private data members for an Employee objects name and salary. The salary

Write the class definition for a class named Employee. The class should include private data members for an Employee object’s name and salary. The salary may contain a decimal place. The class should contain two constructors: the default constructor and a constructor that allows a program to assign initial values to the data members.

Step by Step Solution

3.34 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

declaration section class Employee public private Employ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related An Introduction Programming Questions!