Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 9th, 2005, 8:28 AM   #1
Esroh
Newbie
 
Join Date: May 2005
Posts: 8
Rep Power: 0 Esroh is on a distinguished road
Abstract problem!

Hi
I have an abstract class with abstract methods and non abstract methods. Among those non abstract methods one of them is setSensorID(mutator). Well I wanted to know how we use that method from it's descendant.
My setSensorID is like this:
public void setSensorID(int inSensorID)
{
     sensorID=inSensorID;
}
I have to set setSensorID to a value from it's descendant. I know that I have to use the keyword super(i think so, not sure) but I don't know how to do it.
So if someone could help me I would be very grateful.
Esroh is offline   Reply With Quote
Old Sep 14th, 2005, 6:56 AM   #2
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
calling it like normal doesn't work? "anObject.setSensorID( 7 )" doesn't do it for you? (i'm slightly rusty)
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Old Sep 14th, 2005, 7:16 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
There's got to be more to life than being really, really ridiculously good looking
Check with your rabbit; I think he has the answer.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC