More than 1 class

I understand how to create one class and use the methods described in it to make the 2nd class (test program). But for an assignment I am supposed to create 1 class, create another (2nd class) which uses the 1st, and then a 3rd class (test program) which uses both the first and the second class. Is there just a tutorial online I can read about this, couldnt find anything in my book to help me.
not exactly sure what to search for
Thanks.

There isn't a tutorial for using two classes for the same reason there isn't a tutorial for using 17 classes.
You use different objects (instances of classes) from different classes. This is the way Java and OO works.
And you apparently already know how to do this so I am really mystified as to what your specific problem is.

Similar Messages

  • Can we use more than one Help Provider class in a same project in ADF11g

    Hi All,
    There are two help providers i want to use .They are "ResourceBundleHelpProvider","OHW Help Provider"
    In adf-settings.xml file
    <help-provider>
    <help-provider-class>oracle.adf.view.rich.help.ResourceBundleHelpProvider</help-provider-class>
    <property>
    <property-name>baseName</property-name>
    <value>com.symmetry.dashboard.panels.Help</value>
    </property>
    </help-provider>
    if try to register both help providers confliction occurs. Is it possible to register and use more than one help provider.?
    Thanks in advance.:)

    Thanks Frank,
    In adf-settings.xml file
    <help-provider>
    <help-provider-class>oracle.adf.view.rich.help.ResourceBundleHelpProvider</help-provider-class>
    <property>
    <property-name>baseName</property-name>
    <value>com.symmetry.dashboard.panels.Help</value>
    </property>
    </help-provider>
    <help-provider prefix="RB_">
    <help-provider-class>oracle.help.web.rich.helpProvider.OHWHelpProvider</help-provider-class>
    <property>
    <property-name>ohwConfigFileURL</property-name>
    <value>/myHelpset/config.xml</value>
    </property>
    <property>
    <property-name>baseURI</property-name>
    <value>http://127.0.0.1:7101/Dashboard_workflow/myHelpset/%3c/value>
    </property>
    </help-provider>
    I differentiated the help providers with the "prefix" attribute in the <help-provider> tag. So now confliction is not occuring between those.
    I used this prefix in the "helpTopicId" property of the adf components like "input text box" . I got the result. :)

  • More than one class in single java source file?

    Is there a way to define more than one class in single java source file?
    I get a duplicate class definition error for each extra class, but I am sure there is a way to handle this in JDeveloper.
    Anyone knows how ?

    Please post the question in jdeveloper forum at
    JDeveloper and ADF
    for quick response.
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • Can we query more than one class in a call to .tmib

    Hi,
    i am creating a utility to monitor the applications at run time using mib.any
    body have an idea if we can query more than one class in one call to .tmib.
    thanks
    roopesh

    That would be an interesting enhancement, perhaps using Embedded FML to
    pack multiple MIB requests into one buffer.
    Product Management makes all decisions about major enhancements, and it
    is based on customer need, so that's where the requests should go.
         Scott Orshan
    roopesh wrote:
    >
    yes.
    i am trying to devlop a utility which can monitor
    applications at runtime.i wanted to make as less the
    no of calls to tmib as possible but one class does
    not give all the information so i need to query
    more than one.
    anyways thanks for the reply.
    "MS" <[email protected]> wrote:
    Hi,
    Are you trying to write a Tuxedo app health-check monitor utility.
    A tuxedo client can make different calls to .TMIB service for different
    classes.
    I don't think we can query more than one class in a single call.
    Are you looking for something else??/
    HTH
    regards
    MS

  • Can't open a class with enrollments more than 140 learners

    Hi Gurus,
    Could anyone please help me find the correct patch for this error?
    Class can't open and comes up with error when enrollments reach more than 140 learners. I examined the code being called and it shows that a function called ota_utility.get_learners_email_addresses is concatenating email address of all the learners enrolled in that class but the variable holding this value is declared as VARCHAR2(4000) which is not enough.
    The error message i'm getting is:
    java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "APPS.OTA_UTILITY", line 3570
    Any help would be greatly appreciated.
    Thanks,
    Joel

    HI Joel,
    We have the same case on our end and we applied patch 9724972 and it resolves the issue. This is the query that you can run to verify the issue.
    SELECT * FROM (Select evttl.title ,
    evt.event_id,
    evt.course_start_date,
    evt.course_end_date,
    evt.event_type,
    off.name Offering_Name,
    HR_GENERAL.DECODE_LOOKUP('SCHEDULED_EVENT_STATUS' , evt.event_Status) Event_Status_Meaning ,
    evt.event_status,
    evt.parent_offering_id,
    ota_utility.get_session_count(evt.event_id) Number_Session,
    ota_general.get_org_name(evt.TRAINING_CENTER_ID) Training_Center,
    ota_general.get_location_Code(evt.LOCATION_ID) Location_Code,
    ota_utility.get_learners_email_addresses(evt.event_id) email_addresses,
    ota_utility.get_class_available_seats(evt.event_id) event_available_seats,
    ota_utility.is_class_enrollable('B',evt.event_id) is_class_bulk_enrollable,
    ota_utility.is_class_enrollable('S',evt.event_id) is_class_single_enrollable
    FROM ota_events evt,
    ota_events_tl evttl,
    ota_offerings_tl off
    WHERE evt.event_id = evttl.event_id
    AND evttl.language = userenv('LANG')
    AND off.language = userenv('LANG')
    AND evt.book_independent_flag = 'N'
    AND evt.parent_offering_id = off.offering_id
    AND evt.event_type IN ('SELFPACED','SCHEDULED')) QRSLT WHERE (Parent_Offering_Id = :1) ORDER BY TITLE ASC
    Marie

  • Cisco ACE loadbalancing matching more than one header in L7 class map

    Dear All,
    This is regarding Cisco ACE loadbalancing matching more than one header in L7 class map. I have a small setup with ACE 30 module in Cisco6500. I have got three webservers. Presently I have following configuration where I am mathing one url header.
    class-map type http loadbalance match-all L7_WEB_HEADER_MATCH
    description MATCH THE HOST HEADER OF HTTP REQUEST
    2 match http header Host header-value ".*abhisar.com*"
    So for above configuration, when traffic is coming for abhisar.com, it is working fine.
    Now, I have following headers and DNS entry is pointing to same virtual IP for all http url header same as abhisar.com
    abhisarindia.com
    indiaabhi.com
    So new configuration will be
    class-map type http loadbalance match-any L7_WEB_HEADER_MATCH
    description MATCH THE HOST HEADER OF HTTP REQUEST
    2 match http header Host header-value ".*abhisar.com*"
    4 match http header Host header-value ".*abhisarindia.com*"
    6 match http header Host header-value ".*indiaabhi.com*"
    So just want to confirm if this is fine.
    Thank You,
    Abhisar.

    Dear Rajesh,
    Thank you for reply. I will let you know once I carry out this activity.
    Thank You,
    Abhisar.

  • Can we have more than one contructor for one class?

    I need to provide more than one constructor for one class because I need to have one parameter passed to one constructor and many to another. Is that possible and how it will affects in the instantiation of the object?
    Thanks again
    Jorg3

    One more note about constructors...
    if you define a constructor to take argument(s)
    and don't define the default constructor it is not available.
    Example
    public class myClass
       public static void main(String args[])
          // Ok
          myClass c = new myClass("Hello World");
         // Not Ok
         myClass c2 = new myClass();
       } // main
       public myClass(String name)
          named = name;
       } // myClass
      String named = null;
    } // myClassIf you want to be able to construct the object with the default and parameter constructors, you must declare them all...
    public class myClass
       public static void main(String args[])
          // Ok
          myClass c = new myClass("Hello World");
         // Ok
         myClass c2 = new myClass();
       } // main
       public myClass()
          named = "No Name";
       } // myClass
       public myClass(String name)
          named = name;
       } // myClass
      String named = null;
    } // myClass

  • How the heck to you run a class more than once?

    Hello,
    I'm new to Java and have spent many frustrating hours on this program, (yeah I know, pathetic), but I can't get this program to run. I think that the problem lies in calling more than one object. The compiler says that the object has already been defined, by when I change it gives me the same message. Here is the message-
    java:35: data is already defined in main(java.lang.String[])
              C24001_PersonalInformation data = new C24001_PersonalInformation();
    java:41: cannot resolve symbol
    symbol : variable setAddress
    location: class C24001_PersonalInformation
    data.setAddress = ("149 East Bay Street");
    java:42: cannot resolve symbol
    symbol : variable setPhone
    location: class C24001_PersonalInformation
    data.setPhone = ("(555)555-5678");
    Here is the Demo followed by the class
    public class C24001_PersonalInformationDriver
    public static void main(String [] args)
              String name;
              int age;
              String address;
              String phone;
    C24001_PersonalInformation data = new C24001_PersonalInformation();
              //Set information and calls from method, Me
    data.setName("Joe Mahoney");
    data.setAge(27);
    data.setAddress("724 22nd Street");
    data.setPhone("(555)555-1234");
    System.out.println("\nMy information: ");
    System.out.println("Name: "+data.getName() );
    System.out.println("Age: "+data.getAge() );
    System.out.println("Address: "+data.getAddress() );
    System.out.println("Phone: "+data.getPhone() );
              C24001_PersonalInformation data = new C24001_PersonalInformation();
              //Set information and calls from method, Friend 1
    data.setName("Geri Rose");
    data.setAge(24);
    data.setAddress = ("149 East Bay Street");
    data.setPhone = ("(555)555-5678");
    System.out.println("\nFriend #1 Information: ");
              System.out.println("Name: "+data.getName() );
              System.out.println("Age: "+data.getAge() );
              System.out.println("Address: "+data.getAddress() );
    System.out.println("Phone: "+data.getPhone() );
              //C24001_PersonalInformation data2 = new C24001_PersonalInformation();
    //Set information and calls from method, Friend 2
    //data2.setName = ("John Carbonni");
    //data2.setAge =(28);
    //data2.setAddress = ("22 King Street");
    //data2.setPhone = ("(555)555-0123");
    //System.out.println("\nFriend #2 Information: ");
    //System.out.println("Name: "+data2.getName() );
              //System.out.println("Age: "+data2.getAge() );
              //System.out.println("Address: "+data2.getAddress() );
    //System.out.println("Phone: "+data2.getPhone() );
    public class C24001_PersonalInformation
    private String name;
    private int age;
    private String address;
    private String phone;
         // The constructor is a default               *
         public C24001_PersonalInformation()
              //System.out.println("Default Constructor Personal Info Class.");
    // The setName method accepts an argument *
    // which is stored in the name field. *
    public void setName(String n)
    name = n;
         // The setAge method accepts an argument *
         // which is stored in the age field. *
    public void setAge(int a)
    age = a;
         // The setAddress method accepts an argument *
         // which is stored in the adress field. *
    public void setAddress(String d)
    address = d;
         // The setPhone method accepts an argument *
         // which is stored in the phone field. *
         public void setPhone(String p)
         phone = p;
    public void set(String n, int a, String d, String p)
         name = n;
         age= a;
         address = d;
         phone = p;
    // The getName method returns the name field. *
    public String getName()
    return name;
         // The getAge method returns the age field. *
    public int getAge()
    return age;
         // The getAddress method returns the address field. *
    public String getAddress()
    return address;
    // The getPhone method returns the phone field.*
    public String getPhone()
    return phone;
    If anyone could help with this I would really appreciate it! Thank you!

    The other two error are because of syntax errors on your part. You're defining methods, but not invoking them correctly. For example:
    data.setPhone = ("(555)555-5678");What you're doing, syntactically speaking, is setting a value to the "setPhone" field, which of course doesn't exist. What you meant to do is invoke the setPhone method. So change the above to this:
    data.setPhone("(555)555-5678");(remove that equals sign).
    BTW, a couple of forum-consideration points:
    When you post code, please wrap it in &#91;code]&#91;/code] tags. It makes it easier to read, and people are more likely to help you.
    This really isn't a question about compiling, even though it showed up during compilation. Probably a better forum would have been the New to Java forum.

  • Freetext with more than 300 char show with function or class

    Hi all
    I search a function or a Class how could show freetext with more than 300 char like a popup.
    Now somebody one ?
    Thanks in advance

    Hi
    Try to use HELP_DOCULINES_SHOW
    Max

  • Material Master in more than one plant /purchasing group/Valuation Class

    Hi All,
    How to maintain a Material Master in more than one plant /purchasing group/Valuation Class......
    Points shall be awarded accordingly,
    Regards,
    Rounak

    in mm01 u can extent the material for new plant
    first creat all the views say purchasing accounting basic view etc for one plant
    the go to MM01 put same materal code and select the views purchasing and accounting
    now put the other plant number
    enter
    and put the purchasing and valuation class etc asd save
    thuis u can extend the material to other plant
    reward if usefull
    Message was edited by:
            Umakant Bhangale

  • Can a class implements more than one interface?

    Hello
    Can a class implements more than one interface?
    Thanks

    Of course, this doesn't mean that it won't be a problem though. If the two interfaces have methods with the same signature, but different return types, you won't be able to implement them together. I.E.
    interface InterfaceA {
      public int doSomething(String myString);
    interface InterfaceB {
      public String doSomething(String myString);
    // Now the classes
    // Gives error "Duplicate method doSomething(String) in type ClassA"
    public class ClassA implements InterfaceA, InterfaceB {
      public int doSomething(String myString) {
        System.out.println("A");
        return 0;
      public String doSomething(String myString) {
        System.out.println("B");
        return 0;
    // Gives error "The return type is incompatible with InterfaceB.doSomething(String)"
    public class ClassB implements InterfaceA, InterfaceB {
      public int doSomething(String myString) {
        System.out.println("A");
        return 0;
    // Gives error "The return type is incompatible with InterfaceA.doSomething(String)"
    public class ClassC implements InterfaceA, InterfaceB {
      public String doSomething(String myString) {
        System.out.println("B");
        return 0;
    }

  • Packages with more than 1 class?

    Does anybody know of a good tutorial on how to  deal with packages, external classes?
    I almost have it, ( I think)  but whenever I try to use a package with more than one class in it -- even the standard ones supplied in the ActionScript references, they don't work.  And, if I have anything in the flash file other than an empty single frame, it breaks.  So this precludes the use of library objects, which, if you CAN use them, saves a lot of coding time....
    Any ideas would be appreciated.
    :<)

    Here is a package from the help files that I tried to implement in Flash 10. / AS3
    It has more than 1 class. I couldn't get it to run.  If you can show me how to get it to appear, I'll be a happy camper.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/accessi bility/AccessibilityProperties.html
    :<)

  • More than one class in applet

    i want to ask that if my applet have more than one class, are all classes loaded to client machine autometically or i have to do it by another way (if yes how) ?

    Put all the stuff into a single zip or preferably a single jar.

  • More than one symbol linked to class

    hey,
    how do i get more than one symbol linked to my class in my SoundClass.as file?
    thanks

    after playing around i ended up getting it after all but thanks for effort in answering ill mark as correct answer

  • Sending more than one class

    Hi guys,
    In my application each table has a corresponding Serializable class javabeans style, fine-grained. If a table has a foreign key then it is refered to as a seperate class. For example:
    CREATE TABLE location (location_id int, location_name varchar(50))
    CREATE TABLE employee
    (employee_id int, location_id int)
    public class Location implements java.io.Serializable {
      int locationId;
      String locationName;
    public class Employee implements java.io.Serializable {
      int employeeId;
      Location location;
    }My DAOs retrieve data and populate the above class with it and then return it. The DAOs also resolved other classes references. So a DAO metohd getEmployeeById( int employeeId ) will return an Employee class object whose location is also being populated.
    In a typical case, a JSP page request a Stateless Session Bean EJB which uses DAOs to retrieve data, put it in the corresponding class and then send it to JSP which process it and show it to user.
    So basically these classes (are they called domain classes?) are being used to trasfer data so I can call them DTOs or VOs.
    But some times I need to send a combination of classes data to JSP i.e., data comprised of more than one such class. What is the best way to manage this problem?
    Thanks

    Employee-Location was an example just to show how I am programming.
    To show the problem I am having, here is a scenario:
    I have 2 tables "task" and "job" for which I have created classes "Task" and "Job" respectively. Eash of these tables has foreign keys which are of no concern here (My DAOs when retrieve data do populate them properly).
    public class Task implements java.io.Serializable {
      int taskId;
      String taskName;
    public class Job implements java.io.Serializable {
      int jobId;
      String jobName;
    }Now there is many-to-many relationship between these 2 tables and it is "taskjob" table (a foreign key to task table; another foreign key to job table). So I created a TaskJob class:
    public class TaskJob implements java.io.Serializable {
      int taskJobId;
      Task task;
      Job job;
    }In one JSP, user selects a Task and click OK. Then on the next page I need to list all Jobs defined in the System as checkboxes. The jobs which are linked to the Task selected will be shown as checked while other jobs will be shown as unchecked.
    In this scenario the JSP needs data from both Job and TaskJob class. MY question is how to manage it cleanly?

  • USB MIDI class-device oddities with more than 16 ports

    Hi,
    just playing around with programming an USB device stack for the AT91SAM7 MCUs. Because i do a lot in music electronics, i tried to implement a MIDI device (Audio/MIDISTREAMING) according to the specs:
    http://www.usb.org/developers/devclass_docs/midi10.pdf
    And, just for fun, i wanted to try if it works if i use 2 output endpoints to get (theoretically) 32 physical MIDI OUT connectors. According to the specs, this should be possible (page 9):
    "The USB-MIDI Converter typically contains one or more MIDI IN and/or MIDI OUT endpoints."
    "Each MIDI Endpoint in a USB-MIDI converter can be connected to up to 16 Embedded MIDI Jacks."
    So. I can use "more" IN and/or OUT endpoints. I did so. I have 1 IN endpoint, 2 OUT endpoints. And on each endpoint, i have 16 embedded jacks connected to the external jacks (which in fact are currently just simulated
    Now what is the reason why i write this?
    On reception of data, everything works fine so far, but i didn't check with more than 1 endpoint so far. On transmission, i can address the first 16 jacks on the first endpoint without any problems, but the other 16 jacks (which are on the second endpoint) are routed to the first endpoint by OSX.
    I can see this in the display i have on the MCU, and i also can see that everything goes to the other endpoint if i just exchange the endpoint numbers in the configuration descriptors. So i think my code on the MCU does the right things, but OSX doesn't seem to be able to handle more than one output endpoint.
    This also might apply to the input endpoints, i don't know.
    Did anyone observe similar problems? I don't talk about such things like those Emagic interfaces, they are not implemented according to the standard class device specs, they have some more features and need a proprietary implementation.
    Not that this would be too important, but i think it might be a bug worth fixing.
    ...Michael

    Either i'm asking in the wrong forum or you are posting on the wrong threads
    I will virtualize the situation for you, the rest please stay with the initial post, as meanwhile, all the important details are lost.
    Yes, this is a box with 32 MIDI-Out connectors and 16 MIDI-In connectors besides the USB connector. I can see this interface with exactly this configuration in Audio-MIDI-Setup (now this is real, not virtual , and if i configure any software to output on Port 1-16 (not channel!), the signal appears on Port 1-16, but when i configure Port 25, it appears on Port 9. So Instead of Ports 17-32, OSX sends the data to Ports 1-16 again.

Maybe you are looking for

  • My script says Obj Vers Number is blank - but it can't be!

    hello. And help. I have below a script that includes several APIs to insert and update employees' details in ORACLE Financials. It has been working fine until I've recently added the ' Hr_Person_Api.update_gb_person API' After this, it throws up a ''

  • Java swing dynamic forms (in a loop)

    Hi All, Is it possible to dynamically create forms using java swing? What I mean to ask is that if I have the necessary information in a table, like the label and a corresponding text field, I can loop through and create the required number of fields

  • Open the same raw file in PS5 with two different White Balance settings

    I'm trying to open the same Raw File in PS5 with two different White Balance settings.  One setting "as shot" the other in "daylight", then blend them.  The tutorial I'm watching says to "stack" the images.  The tutorial shows one White Balance setti

  • Just installed Lion. Am I correct in presuming I'll have to buy new versions of my Adobe and microsoft office?

    Opened a doc in Word 2008 and 90% of fonts changed to symbols, and respond to limited fonts includin incorrected leading and spacing. Any workaround? I proofread for dozens of students using a variety of versions. Is there any news on which versions

  • Rules of Vidalia for Iptables

    Hello all, I have some problems with Tor/Vidalia and Iptables, I want to use Vidalia as a proxy for Firefox with foxyProxy, but if i don't disable Iptables, that's don't work and i get a infinite loop message "Failed to find node for hop 0 of our pat