Tie classes together

I want to include the shapes (my inventory logo) on the next button frame, which should display the next item on the array list (I havent gotten to the array yet). Both of these classes run when apart, but do not work together. Help?Advice?(Please dont tell me to drop the class)
Only one more week to go in this class (and Im pretty sure I will pass) whew...i know yall will be happy when I go away lol
     import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class InventoryGUI1 extends JFrame
                          implements ActionListener {
    JTextField input;
      JTextField output;
      JButton next;
      Container c;
public InventoryGUI1 (){
    super ("My Inventory GUI");
      input = new JTextField (15);
      output = new JTextField (15);
      output.setEditable(false);
      next = new JButton ("next->");
      next.addActionListener (this);
      c = getContentPane ();
      c.setLayout (new FlowLayout());
      c.add (input);
      c.add (next);
      c.add (output);
      setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
      setSize (400,300);
public void actionPerformed (ActionEvent ev) {
    String userInput = input.getText ();
      output.setText (userInput);
      input.selectAll();
public static void main (String args []) {
InventoryGUI1 app = new InventoryGUI1 ();
app.setVisible (true);
SwingDrawInner app = new SwingDrawInner ();
app.setVisible (true);
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class SwingDrawInner extends JFrame {
Container fc;
DrawingSurface ds;
JLabel lbl;
public SwingDrawInner() {
super("A Swing Drawing Application");
ds = new DrawingSurface();
lbl = new JLabel("Stephanie's Music Inventory");
fc = getContentPane();
fc.setLayout(new FlowLayout());
fc.add(ds);
fc.add(lbl);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300,200); }
class DrawingSurface extends JPanel {
Dimension preferredSize = new Dimension(300,100);
public DrawingSurface() {
super();
public Dimension getPreferredSize() {
return preferredSize;
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawOval(20, 20, 80, 60 );
g.drawRect(110, 20, 80, 60);
g.drawOval(200, 20, 80, 60);
public static void main(String args[]) {
SwingDrawInner app = new SwingDrawInner();
app.setVisible(true);
public static void main (String args []) {
InventoryGUI1 app = new InventoryGUI1 ();
app.setVisible (true);
SwingDrawInner app = new SwingDrawInner ();
app.setVisible (true);
                          

Additionally
-- Learn to format your code according to the conventions. It's difficult to read code that's all jammed up together.
[http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html]
-- For anything more complicated than the most basic GUIs, you need to show the GUI on the EDT. For that, your main method in the code I posted above would look like:    public static void main (String args []) {
        SwingUtilities.invokeLater (new Runnable () {
            public void run () {
                InventoryGUI1 app = new InventoryGUI1 ();
                app.setVisible (true);
                SwingDrawInner app1 = new SwingDrawInner ();
                app1.setVisible (true);
    }db

Similar Messages

  • Override and replacing Tie class, logic never firing

    I'm on Windows2000 Pro, running Oracle 9i and 9ifs (1.1.9).
    I am trying to get an example from the Developer's Guide to work. It is the Chapter 17 (Customizing Content Type Behavior), Replacing a Server-side Tie Class, Complete Example (Example 17-31).
    I have correctly compiled the java class into the custom_classes directory structure (with subfolders for the package), and I have changed the CLASSPATH to reference the class before repos.jar . I also bounced 9iFS. However, iFS just isn't calling that code (I guess it's still looking in repos.jar for some reason...?), based on my own tests and the java command-line program included in the Developer's Guide.
    I have also tried various other things to get the code called and/or to determine whether or not the code is really being called. One thing I tried is to rename and repackage the example code, then update the classobject with the newly named/packaged server bean. Alas, this did not help.
    Any suggestions or thoughts?
    Thanks in Advance,
    David Frankel

    I'm on Windows2000 Pro, running Oracle 9i and 9ifs (1.1.9).
    I am trying to get an example from the Developer's Guide to work. It is the Chapter 17 (Customizing Content Type Behavior), Replacing a Server-side Tie Class, Complete Example (Example 17-31).
    I have correctly compiled the java class into the custom_classes directory structure (with subfolders for the package), and I have changed the CLASSPATH to reference the class before repos.jar . I also bounced 9iFS. However, iFS just isn't calling that code (I guess it's still looking in repos.jar for some reason...?), based on my own tests and the java command-line program included in the Developer's Guide.
    I have also tried various other things to get the code called and/or to determine whether or not the code is really being called. One thing I tried is to rename and repackage the example code, then update the classobject with the newly named/packaged server bean. Alas, this did not help.
    Any suggestions or thoughts?
    Thanks in Advance,
    David Frankel

  • Web service ClassCastException in the generated Tie class

    I got the above exception when making a request from a client to an EJB webservice. The exception is in the generated tie class on the server side.
    I narrowed down the problem to this:
    In my function call in the tie class: (now call MyFunction):
    a function in the tie class is generated:
    private void invoke_MyFunction(StreamingHandlerState streaminghandlerstate) throws Exception{
    In this function, there's line:
    ((MyEJBInterfaceClass)getTarget()).MyFunction(...)
    Where MyEJBInterfaceClass is the name of the remote interface, which has MyFunction declaration in it.
    the getTarget() function is from TieBase class that the MyEJBInterfaceClass_Tie extended.
    The error is generated because getTarget() did not return an instance of MyEJBInterfaceClass.
    So, there must be some error in the generated code when I use the deploy tool to deploy my webservice.
    Could someone please shed some light?
    Sun, please fix your bugs. There are so many bugs that I found when using your server (App Server 8).
    From not releasing the context resource properly to not lookup properly using the context, to randomly generate bad client.jar file to this error.
    Very disappointed.

    Hello again
    I tried to reproduce your problem and could not so there must be something different than the following steps :
    1. Create the interface MyIntf.java
    package ejb;
    public interface MyIntf extends java.rmi.Remote {
    public String sayHello(String toWho)
    throws java.rmi.RemoteException;
    2. Create the EJB impl
    package ejb;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.rmi.RemoteException;
    public class MyEjb implements MyIntf, SessionBean {
    SessionContext sc = null;
    public MyEjb() { }
    public void ejbCreate() throws RemoteException {
    System.out.println("In MyEjb::ejbCreate !!");
    public void setSessionContext(SessionContext sc) {
    this.sc = sc;
    public void ejbRemove() throws RemoteException {}
    public void ejbActivate() {}
    public void ejbPassivate() {}
    public String sayHello(String toWho) {
    return "hello " + toWho;
    3. Create the config.xml (slightly modified from yours)
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service
    name="MyEjbIntfService"
    targetNamespace="http://java.sun.com"
    typeNamespace="http://java.sun.com"
    packageName="ejb">
    <interface name="ejb.MyIntf"/>
    </service>
    </configuration>
    4. Invoke wscompile
    javac -d build ejb/MyEjb.java
    wscompile -define -mapping build/mapping.xml -d build -nd build -classpath build config.xml
    5. look at wsdl, there is nothing line MyIntfSoapPort like you had
    in particular
    <portType name="MyIntf">
    complete wsdl is :
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="MyEjbIntfService" targetNamespace="http://java.sun.com" xmlns:tns="http://java.sun.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="MyIntf_sayHello">
    <part name="String_1" type="xsd:string"/></message>
    <message name="MyIntf_sayHelloResponse">
    <part name="result" type="xsd:string"/></message>
    <portType name="MyIntf">
    <operation name="sayHello" parameterOrder="String_1">
    <input message="tns:MyIntf_sayHello"/>
    <output message="tns:MyIntf_sayHelloResponse"/></operation></portType>
    <binding name="MyIntfBinding" type="tns:MyIntf">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="sayHello">
    <soap:operation soapAction=""/>
    <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://java.sun.com"/></input>
    <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://java.sun.com"/></output></operation></binding>
    <service name="MyEjbIntfService">
    <port name="MyIntfPort" binding="tns:MyIntfBinding">
    <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
    6. Package in deploytool.
    this is the webservices I got from the assembly tool.
    <webservices xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd">
    <webservice-description>
    <display-name>MyEjbIntfService</display-name>
    <webservice-description-name>MyEjbIntfService</webservice-description-name>
    <wsdl-file>META-INF/wsdl/MyEjbIntfService.wsdl</wsdl-file>
    <jaxrpc-mapping-file>mapping.xml</jaxrpc-mapping-file>
    <port-component>
    <display-name>MyIntf</display-name>
    <port-component-name>MyIntf</port-component-name>
    <wsdl-port xmlns:wsdl-port_ns__="http://java.sun.com">wsdl-port_ns__:MyIntfPort</wsdl-port>
    <service-endpoint-interface>ejb.MyIntf</service-endpoint-interface>
    <service-impl-bean>
    <ejb-link>MyEjb</ejb-link>
    </service-impl-bean>
    </port-component>
    </webservice-description>
    </webservices>
    So It works fine AFAIK, from your descriptrion, it seems that the wsdl file is incorrect so the problem starts far before the actual Tie generation. You wrote in a previous message that :
    "In the wsdl file this is one of the places it shows: <portType name="MyEjbIntfSoap">"
    This is where the problem is. Do you have any clue how you got that ? If you run again wscompile, do you have the same values ?
    Jerome

  • Using CSS class together with CSS Rule

    Hi,
    I design my web site in Dreamweaver and then use Web
    Developer 2005 Express for the dynamic stuff. I amalgamate all the
    work I have done in Dreamweaver into 2005 Express. However with the
    new server side controls I do not know how to add a CSS class
    together with a CSS rule.
    In the normal client side control in Dreamweaver I have -
    <input name="txtPassword" type="password" class="Input"
    id="SpacerBottom" />
    In the server side controls the ID keyword is used now -
    <asp:TextBox ID="txtPassword" runat="server"
    Style="z-index: 107" CssClass="Input" ></asp:TextBox>
    I have tried to use the name="txtPassword", but it ignores
    this.
    I would really like to know how I can use a class and an id
    selector with the new server side controls and would really
    appreciate some help on this.
    Many thanks,
    Polly Anna

    the explicit " match-any" will do just that.So, a nested ACL can be configured for multiple criteria.
    The alternate is a "match-all" where all nested options in your acl MUST be met. Hope this helps.
    T

  • Linking classes together

    hi, do u guys know of any tutorials about linking two or more classes together?
    i need to learn anything and everything about it.
    thx,
    gildan2020

    class A
        public static void main(String[] args)
            // uses static PrintStream object in System class and
            // calls the println() method on that PrintStream object.
            System.out.println("Hello World");
    }http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/learning/new2java/index.html
    http://javaalmanac.com
    http://www.jguru.com
    http://www.javaranch.com
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • Running 2 classes together

    I have 2 classes that i want to run together. They both have
    GUI components to run there separate methods. The code is long
    so i've shown the stripped down basic idea below.
    public class Class2 extends JFrame
         public Class2(String name)
                super(name);
              //Code for GUI
         public Class2()
              //Default constructor to access the class
         public void createPopupFrame()
              //code to show the Internal Frame
              frame.show();
         public static void main(String[] args)
              //Runs the GUI
              new Class2("Class2");
    } i want to call the method for the internal Frame ( createPopupFrame() ) from Class1
    while Class2 is running and therefore popUp that frame in class2.
    class Class1 extends JFrame
         //Various GUI components
           public Class1(String name)
                 super(name);
                //Code for GUI
                //Button to call the method callPopUP()
           public Class1()
                //Default constructor to access the class
         public void callPopUP()
              Class2 dis = new Class2();
              dis.createPopupFrame();
         public static void main(String[] args)
              //Runs the GUI
              new Class1("Class1");
         }//end main
    }I'm having trouble implementing this in java. I searched around the api
    and the forums and found some stuff about Runnable interface but i'm not really
    any the wiser. I've tested the createPopupFrame() method and i works fine from within
    class2.
    When i call it from class1 while class2 is running i get a NullPointerException. Although
    i expected this because i knew, that would just be too easy.
    Any help appreciated.

    Line 171 in class2I assumed line 171 referenced an object created
    somewhere in line 170.I believe this to be an incorrect assumption.
    and line 7 in class1I fail to see the null reference here by virtue of
    line 6.Typically , a stack trace shows a call sequence. Since line 7 calls the method containing line 171, if frame is null, the NPE stack sequence would show:
    NPE in line 171
    called from line 7
    OP. Try the following:
    public void createPopupFrame()
        //code to show the Internal Frame
        if ( frame != null )
            frame.show();
        else
            System.out.println( "The frame object has not been instantiated." );
    }Good luck.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Using two versions of the one class together?? (I think)

    Hi, see the following small program, where the user can enter an int, and the program draws that amount of lines, joined together at a centre point. The user can then move these lines around the centre by dragging the red dot at the end of the lines.
    Anyway, what I want to be able to do, is have two different versions of this program running side by side, independently of each other. (ie one might have 4 lines, the other have 3). Each one, would also be able to read data from each other.
    Is this possible?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Lines4 extends JFrame implements MouseListener, MouseMotionListener {
    private int startx = 200;
    private int starty = 200;
    private JLabel statusBar;
    private Road roads[];
    private static final int roadLength = 100;
    private static final int circleRadius = 4;
    private Road movingRoad;
    public Lines4() {
    super("Lines4");
    String ret = JOptionPane.showInputDialog("How many roads are there?");
    int numPoints = Integer.parseInt( ret );
    double factor = 2.0 * Math.PI / ( numPoints ) ;
    roads = new Road[numPoints];
    for (int i=0; i<numPoints; i++){
    int x = (int)( roadLength * Math.cos( factor * i ) );
    int y = (int)( roadLength * Math.sin( factor * i ) );
    roads[i] = new Road( i, startx, starty, circleRadius, startx+x, starty+y );
    addMouseListener(this);
    addMouseMotionListener(this);
    statusBar = new JLabel();
    getContentPane().add(statusBar, BorderLayout.SOUTH);
    public void paint( Graphics g ) {
    g.clearRect( 0, 0, getWidth(), getHeight() );
    for (int i=0; i<roads.length; i++) {
    roads.draw( g );
    // MouseListener Event Handlers
    public void mouseClicked( MouseEvent e ){
    statusBar.setText( "Clicked at [" + e.getX() +
    ", " + e.getY() + "]" );
    public void mousePressed( MouseEvent e ){
    statusBar.setText( "Pressed at [" + e.getX() +
    ", " + e.getY() + "]" );
    for (int i=0; i<roads.length; i++) {
    if ( roads[i].onCircle( e.getX(), e.getY() ) ) {
    movingRoad = roads[i];
    public void mouseReleased( MouseEvent e ){
    statusBar.setText( "Released at [" + e.getX() + ", " + e.getY() + "]" );
    movingRoad = null;
    public void mouseEntered( MouseEvent e ){
    statusBar.setText( "Mouse in window" );
    public void mouseExited( MouseEvent e ){
    statusBar.setText( "Mouse outside window" );
    // MouseMotionListener event handlers
    public void mouseDragged( MouseEvent e ){
    statusBar.setText( "Dragged at [" + e.getX() +
    ", " + e.getY() + "]" );
    if ( movingRoad != null ) {
    movingRoad.x = e.getX();
    movingRoad.y = e.getY();
    repaint();
    public void mouseMoved( MouseEvent e ) {
    statusBar.setText( "Moved at [" + e.getX() +
    ", " + e.getY() + "]" );
    public static void main( String args[] ) {
    Lines4 app = new Lines4();
    app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    app.setSize( 400, 400 );
    app.setVisible( true );

    You need to be very careful which project you open in which version.
    For 2014 make sure its on 2014.1 build 81.

  • Bringing Classes Together

    Hi I've been working on a calculator that now writes to file, and can activated from a main menu. I got the two to work together by extending the main menu to the calculator and simply running the method where it was needed.
    Then I wanted to veiw the file. So I put together a program that would read and display the text when run, But I mentioned earlier that I extended the Calculator to the MainMenu to get them to work together, now how am supposed to extend the FileReader as well?
    I have three classes:
    A main Menu class. - asks user to input 1 for calculator, or 2 to veiw file. So if(input==1); run the method, which is inside the calculator class.
    if(input==2); I want to view the file.
    I have a lonely FileReader class, I've tried extending the MainMenu to it, but that hasn't worked. So I need help with using the method that's inside the FileReader class, in my MainMenu class.
    This might be an easy one... too easy? Any help would really be appriecated. I can post the code for any or all of the classes if it helps.

    This is the code for the main menu. Before I introduced the second option (view file), the classes worked together without problems.
    it was originally:
    class Menu_RunThis extends CalcSalesTax {I extended the CalcSalesTax class so that I could use the method in CalcSalesTax "salesTax()"
    But now that I have another class with a method in it which I would like to use, how do I use it?
    (See method getContents)
    This is the broken code... of the MainMenu*:*
    import java.io.*;
    import java.util.*;
    class Menu_RunThis    {
    public static ReadLog getContents = new getContents;
    public static CalcSakesTax salesTax = new salesTax;
    public static void main(String[] args)throws java.io.IOException {
    System.out.println("Instructions:");
    System.out.println("**************");
    System.out.println("Press '1' to calculate sales tax, specify the number of items you intend to\r\ncalculate, and their prices. This calculator assumes that sales tax is equal to 6.5 %.\r\nThe information you provide/recieve is stored in a text-file for your convience.");
    System.out.println("");
    System.out.println("Please Select:");
    System.out.println("1: to Calculate Tax");
    System.out.println("2: view Log File");
    System.out.println("or");
    System.out.println("0: to Exit");
    int val = 3;
    while (val != 0)
    Scanner input = new Scanner(System.in);
    val = input.nextInt();
    if (val == 0) return;
    else if (val == 1) salesTax(); //SalesTax method is called
    else if (val == 2) subMenu();
    else {System.out.println("Please Select:");
    System.out.println("1: to Calculate Tax");
    System.out.println("or");
    System.out.println("0: to Exit");}}
    public static void subMenu(){
    System.out.println("Please Select:");
    System.out.println("1: To view the Log file");
    System.out.println("or");
    System.out.println("0: to Exit");
    int val = 3;
    while (val != 0)
    Scanner input = new Scanner(System.in);
    val = input.nextInt();
    if (val == 0) return;
    else if (val == 1) getContents(); //getContents method is called
    else {
    System.out.println("Please Select:");
    System.out.println("1: To view the Log file");
    System.out.println("or");
    System.out.println("0: to Exit");
    }}Edited by: tark_theshark on Nov 26, 2007 10:58 PM

  • Using tie-classed to change name of file uploaded through FTP protocol srvr

    Hi,
    I'm trying to use the extendedPreAddItem (or Post) method in an S_TieFolder class to automatically change the name of a file (an S_PublicObject) when it enters a Folder (via an FTP put upload).
    I'm fiddling around with code like this:
    AttributeValue val = AttributeValue.newAttributeValue(newDocName);
    val.setName(Document.NAME_ATTRIBUTE);
    rightpo.setAttribute(val);
    But it does not work: in the FTP client the filename is indeed changed, but somewhere at lower levels the original filename is still being used...
    Any helpfull ideas would be appreciated.
    TOon

    I'm aware of this... My ftp-client (FTP-Voyager) will prompt me if I "put" a file that already exists in the remote folder, and ask me to go ahead and replace the file, or cancel the put-operation.
    However in this case the ftp-client sees file X' remotely and I'm putting file X, so it does not prompt me at all...
    Stopping and restarting the FTP-client (in case it caches remote folder-contents...) does not change the behaviour.
    Timewise this is what happens:
    1) I put file X.
    2) My S_TieFolder class (extendedPreAddItem) changes it's name into X'.
    3) The ftp-put successfully completes
    4) I refresh the remote folder contents and see the X' name instead of the original X name.
    5) I re-put X (and would now like to have it changed into file X'').
    6) Before my S_TieFolder code executes, something (I'm still suspecting the cm-sdk) deletes the X' file first... ==> the logfile does not show any communication with the ftp-client here now.
    7) Then my S_TieFolder code executes and changes the name into X''.
    8) I refresh the remote folder contents: File X' disappears, file X (just re-put) changes into X''.
    More testing has shown that I'm also not able to delete these files (whose names have been changed by S_TieFolder): 'file does not exist' error.
    I need to know:
    a) If changing the files name on-the-fly using S_Tie class is supported at all.
    and
    b) if so, what am I doing wrong?
    Thanks
    Toon

  • Linking 2 classes together

    This is always what i find hardest to do in java for some reason. Basically i have some code which is part of the class database, and this class adds records to my database as seen below;
    class Database
         public Database(){
         int answer = JOptionPane.YES_OPTION;
         int count = 0;
         final int ARRAY_SIZE = 12;
         CD[] data = new CD[ARRAY_SIZE];
         while (answer == JOptionPane.YES_OPTION)
         String a;
         String c;
         int n;
         a = JOptionPane.showInputDialog("Please, enter artist name");
         c = JOptionPane.showInputDialog("Please, enter CD name");
         n = Integer.parseInt(JOptionPane.showInputDialog("Please enter total number of tracks"));
         data[count] = new CD(a, c, n);
         answer = JOptionPane.showConfirmDialog(null, "Enter another record?",
                         "???", JOptionPane.YES_NO_OPTION);
         count++;
         System.exit(0);
    }Next i have a new class called search which is supposed to search for a CD typed in by the user. This is the code i have;
    class Search
    int result;
    String searchKey = JOptionPane.showInputDialog("Give me the name of a CD");
    result = linearSearch(data, searchKey, ARRAY_SIZE);
         if(result== -1)
         JOptionPane.showMessageDialog(null,"KEY " + searchKey + " NOT FOUND");
         else
         JOptionPane.showMessageDialog(null,"KEY " + searchKey + " FOUND in position " + result);
         System.exit(0);
    public static int linearSearch(String[] data, String key, int sizeOfArray)
    for (int counter = 0; counter < sizeOfArray; counter++)
    if (data[counter].equalsIgnoreCase (key))
    return counter;
    return -1;
    }How do i get the information from the database into my search class, because at the moment my search class wont compile due to identifiers being expected, most problably for the variables data and ARRAY_SIZE. Also, i am not sure if this makes a difference but the information i need from the database class is only the CD name and not the whole array object. If i am unclear, just let me know.
    Cheers

    above these 2 classes, i have a constructor and method which states my array object;
    class CD
         String artistName, CDname;
         int noOfTracks;
         public String records;     
         public CD (String ar, String cd, int no){
         //data that is passed is stored in variables below
         artistName=ar;
         CDname= cd;
         noOfTracks=no;
         String printData(){
         //processed data stored in variable record      
         records =artistName  + "    "+ CDname + "     " + noOfTracks ;
         //value of record returned
         return records;
    }Can i use this constructor and class to create a new method which will search the array, or do i have to create constructors for my other classes, and if so is it the database class or the search class i need these methods and constructors?

  • New Class!

    I am about to start teaching a begginer java class in Houson in a few weeks. I know a few of the members of this froum have participated in these type of courses before. Is there anything that was left out in your classes that you think should have been covered. Do ya'll have any Ideas on what I can do to be the best Java teacher ever. I wan't my students to learn and exel beyond that which I tought to myself.
    Thanks for any input,
    Ian Mechura

    Ian,
    Thanks for asking. My biggest complaint about the first Java class that I took is that the instructor basically showed the slides that he had prepared with bullet points, etc., but did not explain them well. At the end of that class I knew the basic syntax of the language, but had no idea what the difference was between static and non-static variables, methods, and classes. I also had no clue how to tie classes together to make good quality, reusable, object oriented code.
    I know that it's important to learn the syntax first, so that you can write something that compiles. But my advice would be to spend a few classes on syntax, etc., and then spend a substantial amount of time discussing concepts: start with the "how," but then spend time on the "why." For example, I'm sure that my instructor said at one point, "you can't use a non-static variable in a static method," but never explained why not. Personally, I find the "why" very, very valuable in helping me write qood quality code.
    Best of luck, and let us know how it goes!
    Rich

  • Question on "tying" two queries together

    I get an error when I run the following code (shown below).
    Why can't I "tie" these 2 queries together like this?
    Both run fine by themselves and give me good data, I just need to tie them together.
    This is for a beginning sql class, so I all I really want is an explanation as to why this is not allowed.
    I'm not finding the answer in the book I have.
    Any insight for a newb appreciated!
    SQL> SELECT order#, isbn, title, SUM(quantity) AS SubTotal
    2        FROM orderitems RIGHT OUTER JOIN books USING (isbn)
    3        GROUP BY order#, isbn, title
    4        ORDER BY order#
    5 WHERE (isbn, title) IN
    6                     (SELECT isbn, title
    7                       FROM books
    8                       WHERE retail - cost >
    9                                        (SELECT AVG(SUM(retail - cost))
    10                                         FROM books
    11                                        GROUP BY isbn));
    WHERE (isbn, title) IN
    ERROR at line 5:
    ORA-00933: SQL command not properly ended

    Hi,
    When the following clauses are used, they always have to be in this order:
    WHERE
    GROUP BY
    ORDER BY
    You can skip any (or all) of these, but when you use them, they have to come in that order.
    Move the WHERE-clause (the whole thing, up to, but not including, the semicolon) before the GROUP BY clause.

  • Two factor auth tied together?

    Hi all,
    I have an irritating problem dealing with the physical security staff in my datacenter. We have a requirement for certain areas to have "two factor authentication", and they've provided badge readers and fingerprint scanners, and consider this requirement solved.
    Unfortunately, the systems don't work together and you can use one person's badge, and someone else's fingerprint.
    My experience (and common sense) says that two factor means YOUR badge needs to only work with YOUR fingerprint, but our physical security team doesn't see it that way.
    They've asked for some sort of evidence that this is how it works... A government directive or other "proof" that they need to tie together.
    I thought that it would be a quick Google search away, but it turns out to be more difficult than I thought! All the definitions seem to leave the "tie in" to the imagination! They all say "password and token" or "badge and bio" but never explicitly say that those devices need to tie to the person who is authenticating.
    This seems like such a simple thing! Does anyone know of a document that clearly defines two factor as both factors required to be tied to the same person?

    I agree that tying them together would be better security but you may lose this one.
    In the bank card scenario, the unique item is the card, but the card and PIN can be used by anyone.
    Your situation is different in that the unique item is the fingerprint (since any card will do, thank you) AND it is physically tied to a single person (lopped off fingers aside).
    It's not as tight as it could be but it does qualify as two factor since you need both to enter.
    Since John's finger is scanned, John entered.
    JMTC
    Tom

  • Tying a Master Page to a Paragraph Style

    As a relative newbie to InDesign (and indeed book layout) I'm really chuffed that my first attempt looks pretty good now I have the first proof in my hands. Have had a few small tweaks to sort out and one thing that I have found cumbersome is that I have 3 master pages - the A-master for almost all the book with running headers and page numbers, the B-master for the first page in each chapter which has no running header and has some page decoration and the C-master for the special pages in the front matter that don't have page numbers and running headers. As we've gone through and made some adjustments the pages have shifted slightly and of course I've found that the B-masters get out of sync because the content shuffles but the master page allocation doesn't get tied to the page with teh Chapter Heading style on it. Is there an easy (or even not so easy) way to tie these together to avoid having to resync, double and triple check them?
    M

    mark_hayhurst wrote:
    As a relative newbie to InDesign (and indeed book layout) I'm really chuffed that my first attempt looks pretty good now I have the first proof in my hands. Have had a few small tweaks to sort out and one thing that I have found cumbersome is that I have 3 master pages - the A-master for almost all the book with running headers and page numbers, the B-master for the first page in each chapter which has no running header and has some page decoration and the C-master for the special pages in the front matter that don't have page numbers and running headers. As we've gone through and made some adjustments the pages have shifted slightly and of course I've found that the B-masters get out of sync because the content shuffles but the master page allocation doesn't get tied to the page with teh Chapter Heading style on it. Is there an easy (or even not so easy) way to tie these together to avoid having to resync, double and triple check them?
    M
    I don't know if there's an existing script for this; others on the forum may know.
    However, Autoflow Pro, a commercial InDesign plug-in from in-tools.com can do this. There's a free trial.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to make a Abap Unit Test Suit with many test classes

    Hi,
    Problem space
    we have different packages(embedded) in our project and each package corresponds to a differnt functional layer in the design.
    We want to create abab unit test classes for these different layers.
    say embedded package 1 has 10 unit test classses
          embedded package 1 has 20 unit test classses
    How to grup these classes together so that we can start them frm a test suite.
    Code examples and blogs links will be appreciated.
    regards
    anubhav

    This sounds a bit like Project Administration 101 to me.
    I'm not exactly sure what you are actually trying to do here --but generally if you want to functionally test something you need to start with a business process -
    You need to create scripts which tell the user the data to be entered, the transaction to be used and the outcome.
    With SAP you might need to show screen shots of each stage as well.
    You follow this for each complete business process until you've covered the whole business cycle.
    You complete this say individually for Logistics, Purchasing and Finance and then compare what SAP gives you with what you expected to get.
    For some type of testing CATTS can help but without the business processes any testing is essentially meaningless.
    It is totally pointless trying to design a "generic" test plan until you've got the functional consultants to describe the business processes involved.
    Cheers
    jimbo

Maybe you are looking for