Lab5_113 - Id integer Employee Employee(in Id int in n String setters/getters display toString String Teacher Qualification String Teacher

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
KSU / CCIS / CS DEPARTMENT CSC-113, SPRING 2010 LAB 5 – INHERITANCE Implement the following classes in Java. Write a main class to test your program. Note: The toString() method is actually defined in the Object class, and every class in Java inherits from Object class whether extends keyword is specified or not. The toString() method ( capable of converting Employee object into String) should be overridden in the different classes. Employee # Name: String
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # Id: integer + Employee( ) +Employee(in Id: int, in n: String) + setters/getters + display ( ) + toString( ) : String Teacher - Qualification: String + Teacher() + Teacher(in Id: int, in n: String, in q: String) + setQual(String q) + getQual(): String + Display( ) + toString( ) : String Manager - YearOfService: int + Manager() + Manager (in Id: int, in n: String, in ys: int) + setYearOf( int ys) + getYearOf(): int + Display( ) + toString( ) : String...
View Full Document

This note was uploaded on 11/28/2011 for the course COMPUTER S 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Ask a homework question - tutors are online