Unanswered: oracle objects and method overriding or overloading??
I am hoping that some oracle expert out there can look at this and provide a quick answer.
I am new to working with oracle objects and am trying to create an abstract object called attraction_objtyp with three object subtypes, coaster_objtyp,wetride_objtyp and childride_objtyp. The problem is that I am not sure how to code the method addAttraction() to add the child objects to a table that accepts all types of attraction.
NOT INSTANTIABLE MEMBER FUNCTION validate_nonduplicate(x NUMBER) return BOOLEAN,
NOT INSTANTIABLE MEMBER PROCEDURE add_attraction(attractid NUMBER, attrname VARCHAR2,c NUMBER,hr VARCHAR2,rc NUMBER,cat VARCHAR2))NOT INSTANTIABLE NOT FINAL;
--create coaster object as subtype of attraction
create type coaster_objtyp under attraction_objtyp(
overriding MEMBER FUNCTION validate_nonduplicate(x NUMBER) return BOOLEAN,
overriding member procedure add_attraction(attractid NUMBER, attrname VARCHAR2,c NUMBER,hr VARCHAR2,rc NUMBER,cat VARCHAR2,
l NUMBER,ms NUMBER,d VARCHAR2,tf NUMBER));
I havent' shown the other two children here but I am sure if you can help sort this I will be able to figure out the others.