exercisePreLab5 - CS116 EXERCISEPrelab5

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS116 EXERCISE – Pre lab 5  NOTE: This exercise will be used as part of your  next lab (lab 5) . In this exercise we are going to build an inheritance relationship with  polymorphism to be used in lab 5 (SAVE YOUR WORK SO THAT YOU USE IT  IN LAB 5). 1. Create a class called Employee. This class is  abstract . It has attributes: String name; int socialSecurity; static int id; int currentID; They all have  private  access modifiers. 2. Create a default constructor that initializes the attributes to : AnyName,  12345, advances  id  every time it is called , and assigns it to currentID. 3. Create a non default  (overloaded) constructor  that has as arguments the  attributes: name , socialSecurity. It also advances the id every time it is  called and assigns it to currentID.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/06/2010 for the course CS 116 taught by Professor Koutsogiannakis during the Spring '08 term at Illinois Tech.

Page1 / 3

exercisePreLab5 - CS116 EXERCISEPrelab5

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online