The Artima Developer Community
Sponsored Link

Java Answers Forum
extended hierarchy!!

2 replies on 1 page. Most recent reply: Sep 23, 2003 12:35 AM by sandesh

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
sandesh

Posts: 10
Nickname: sandesh
Registered: Sep, 2003

extended hierarchy!! Posted: Sep 22, 2003 11:40 PM
Reply to this message Reply
Advertisement
i have the follwing classes ..
Person-->Employee-->ClassifiedEmployee

Employee class is extending Person class
ClassifiedEmployee is extending Employee

now employee has an unique ID and classified emp has someother unique property..like say hourly pay.,
the proble is when i try to get the details from ClassifiedEmployee class using (super.toString +Hourlypay) i am unable to print the employeeID even though ClassifiedEmployee is inherited from Employee which inturn was inherited from Person class. i get all the details of the person class but not the employee ID..
This is my output which has to b formatted.,

//Classified Employee info
//Classified Staff Report

first namemarc
Last name:dennis
Age:24
ssn:127276
Employee ID 0
ClassifiedStaff pay $24/hour


Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: extended hierarchy!! Posted: Sep 22, 2003 11:57 PM
Reply to this message Reply
WHy dont you post the source code of the Employee class toString() method source code?

sandesh

Posts: 10
Nickname: sandesh
Registered: Sep, 2003

Re: extended hierarchy!! Posted: Sep 23, 2003 12:35 AM
Reply to this message Reply
i have sent it to u'r mailid..

Flat View: This topic has 2 replies on 1 page
Topic: URL Rewriting? Previous Topic   Next Topic Topic: Stacks

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use