CPAS 211L - Assignment 1
CPAS 211L - Assignment 1
Introduction to Classes
BACKGROUND
A class is code that specifies the attributes and member functions that a particular type of object may have.
Think of a class as a “blueprint” that objects may be created from. It serves a similar purpose as the blueprint
for a house. The blueprint itself is not a house, but is a detailed description of a house. When we use the
blueprint to build an actual house, we could say we are building an instance of the house described by the
blueprint.
Employee Class: Write a class named Employee that has the following member variables:
Write appropriate mutator functions that store values in these member variables and accessor functions
that return the values in these member variables. Once you have written the class, write a separate
program that creates three Employee objects to hold the following data.
1
Name ID Number Department Position
Susan Meyers 47899 Accounting Vice President
Mark Jones 39119 IT Programmer
Joy Rogers 81774 Manufacturing Engineer
The program should store this data in the three objects and then display the data for each employee
on the screen.