Help Needed on this ASAP!

need urgent solution to this ASAP...thanks kind hearted fellows
build an online quiz/questionaire wherein the user tests his knowledge base by
solving a number of questions.the question will be of multiple choice type such that
there is only one timer to monitor the time taken by the user, which will also
automatically redirect the user to the next question if the time limit for each
question is exceeded.the questions for the quiz along with the answers for the quiz
would be typically stored in a database and would be accessed one at a time by the
application.At the end of the quiz ,the score is to be calculated based on the
performance of the user and is to be displayed.
*The core software to be used for the development will be based on the Java 2
platform and its APIs.
*The approach towards solving the problem must be object oriented.
*Data for the quiz must exist in an external data source and must be retreived using
DBMS suc as SQL server.(i.e JDBC API)
*Multithreading features can be used to implement the timer.

It looks like someone put off doing his project, then when he looked at it had no friggin idea where to even start. I mean, this looks like an interesting project. I wonder what level course it's for.
ps I'll do it for only $125 an hour, plus expenses.
SE*

Similar Messages

  • Help needed with this form in DW

    Hi, i have created this form in dreamweaver but ive got this problem.
    In the fields above the text field, the client needs to fill in some info such as name, email telephone number etc.
    But the problem is when ill get the messages. Only the text from the large text field is there.
    What did i do wrong??
    http://www.hureninparamaribo.nl/contact.html
    Thank you
    Anybody??

    Thank you for your response. So what do i have to do to fix this?
    Date: Sun, 20 Jan 2013 07:57:56 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help needed with this form in DW
        Re: Help needed with this form in DW
        created by Ken Binney in Dreamweaver General - View the full discussion
    You have several duplicate "name" attributes in these rows which also appears in the first row
    Telefoon:
    Huurperiode:
    Aantal personen:
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5008247#5008247
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5008247#5008247
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5008247#5008247. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver General by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Help needed in this code

    Hi guys, I need help in debugging this code I made, which is a GUI minesweeper. Its extremely buggy...I particularly need help fixing the actionListener part of the code as everytime I press a button on the GUI, an exception occurs.
    help please!
    package minesweeperGUI;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MinesweeperGUI implements ActionListener
         //Declaration of attributes
         static int length = 0;
         JMenuItem menuItemNew = new JMenuItem();
         JRadioButtonMenuItem rbEasy = new JRadioButtonMenuItem();
         JRadioButtonMenuItem rbHard = new JRadioButtonMenuItem();
         JMenuItem menuItemExit = new JMenuItem();
         JButton buttonReset = new JButton();
         JButton buttonGrid[][] = null;
         JFrame frame = new JFrame();
         int getBombsTotal = 0;
         JLabel setBombsLabel = new JLabel();
         int a = 0;
         int b = 0;     
         //No constructor created. Uses default constructor
         //Create the menu bar
         public JMenuBar newMenuBar()
              //Sets up the menubar
              JMenuBar menuBar = new JMenuBar();
              //Sets up the Game menu with choice of new, grid size, and exit
              JMenu menu = new JMenu ("Game");
              menuBar.add (menu);
              menuItemNew = new JMenuItem ("New");
              menuItemNew.addActionListener (this);
              menu.add (menuItemNew);
              menu.addSeparator();
              //Sets up sub-menu for grid size with choice of easy and hard radio buttons
              JMenu subMenu = new JMenu ("Grid Size");
              rbEasy = new JRadioButtonMenuItem ("Easy: 5x5 grid");
              rbEasy.addActionListener (this);
              subMenu.add (rbEasy);
              rbHard = new JRadioButtonMenuItem ("Hard: 10x10 grid");
              rbHard.addActionListener (this);
              subMenu.add (rbHard);
              menu.add (subMenu);
              menu.addSeparator();
              menuItemExit = new JMenuItem ("Exit");
              menuItemExit.addActionListener (this);
              menu.add (menuItemExit);
              return menuBar;
         //Setting up of Bomb Grid
         public int [][] setGrid (int length)
              int grid[][] = null;
              grid = new int[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        grid[i][j] = ((int)Math.round(Math.random() * 10))% 2;
              return grid;     
         //Setting up of the of the graphical bomb grid
         public JButton[][] setButtonGrid (int length)
              JButton buttonGrid[][] = null;
              buttonGrid = new JButton[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = new JButton();
              return buttonGrid;
         //Setting up of a way to count the total number of bombs in the bomb grid
         public int getBombsTotal (int length, int setGrid[][])
              int bombsTotal = 0;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (setGrid[i][j] == 1)
                             bombsTotal += 1;
              return bombsTotal;
         //Create a label for number of bombs left
         public JLabel setBombsLabel (int getBombsTotal)
              JLabel bombsLabel = new JLabel(String.valueOf (getBombsTotal) + " Bombs Left");
              return bombsLabel;
         //Setting up a way to count the number of bombs around a button
         public String setBombs (int length, int setGrid[][], int x, int y)
              int bombs[][] = new int[length][length];
              String bombsString = null;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (i == 0 && j == 0)
                             bombs[i][j] = setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i ==0 && j == (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else if (i == (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1];
                        else if (i == (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1];
                        else if (i == 0 && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i][j+1] +
                                  setGrid[i+1][j-1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i == (length - 1) && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1];
                        else if (i != 0 && i != (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i != 0 && i != (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j] + setGrid[i+1][j+1];
              bombsString = String.valueOf (bombs[x][y]);
              return bombsString;
         //create the panel for the bombs label and reset button
         public JPanel newTopPanel(int length)
              int setGridNew [][] = null;
              setGridNew = new int[length][length];
              int getBombsTotalNew = 0;
              JLabel setBombsLabelNew = new JLabel();
              setGridNew = setGrid (length);
              getBombsTotalNew = getBombsTotal (length, setGridNew);
              setBombsLabelNew = setBombsLabel (getBombsTotalNew);
              JPanel topPanel = new JPanel ();
              topPanel.setLayout (new BorderLayout (50,50));
              JLabel bombsLabel = new JLabel ();
              bombsLabel = setBombsLabelNew;     
              topPanel.add (bombsLabel, BorderLayout.WEST);
              buttonReset = new JButton("Reset");
              buttonReset.addActionListener (this);
              topPanel.add (buttonReset, BorderLayout.CENTER);
              return topPanel;
         //create the panel for the play grids
         public JPanel newBottomPanel(int length)
              JButton setButtonGridNew[][] = null;
              setButtonGridNew = new JButton [length][length];
              setButtonGridNew = setButtonGrid (length);
              JPanel bottomPanel = new JPanel ();
              bottomPanel.setLayout (new GridLayout (length, length));
              buttonGrid = new JButton[length][length];          
              for (a = 0; a < length; a++)
                   for (b = 0; b < length; b++)
                        buttonGrid[a] = setButtonGridNew[a][b];
                        buttonGrid[a][b].addActionListener (this);
                        bottomPanel.add (buttonGrid[a][b]);
              return bottomPanel;
         //Overiding of abstract method actionPerformed
         public void actionPerformed(ActionEvent e)
              if (e.getSource() == menuItemNew)
                   launchFrame(length);
              else if (e.getSource() == menuItemExit)
                   frame.setVisible (false);
                   System.exit(0);
              else if (e.getSource() == rbEasy)
                   length = 5;
                   launchFrame(length);
              else if (e.getSource() == rbHard)
                   length = 10;
                   launchFrame(length);     
              else if (e.getSource() == buttonReset)
                   launchFrame(length);
              else if (e.getSource() == buttonGrid[a][b])
                   int setGridNew [][] = null;
                   setGridNew = new int[length][length];               
                   JButton bombButton [][] = null;
                   bombButton = new JButton [length][length];
                   String bombString [][] = null;
                   bombString = new String[length][length];
                   setGridNew = setGrid (length);               
                   bombString[a][b] = setBombs (length, setGridNew, a, b);
                   bombButton[a][b] = new JButton (bombString[a][b]);
                   if (setGridNew[a][b] == 0)
                        buttonGrid[a][b] = bombButton[a][b];
                        getBombsTotal--;
                        JLabel setBombsLabelNew = new JLabel();
                        setBombsLabelNew = setBombsLabel (getBombsTotal);
                   else if (setGridNew[a][b] == 1 )
                        buttonGrid[a][b] = new JButton("x");
                        JOptionPane.showMessageDialog (null, "Game Over. You hit a Bomb!");
                        System.exit(0);     
         //create the content pane
         public Container newContentPane(int length)
              JPanel topPanel = new JPanel();
              JPanel bottomPanel = new JPanel();          
              topPanel = newTopPanel(length);
              bottomPanel = newBottomPanel (length);
              JPanel contentPane = new JPanel();
              contentPane.setOpaque (true);
              contentPane.setLayout (new BorderLayout(50,50));
              contentPane.add (topPanel, BorderLayout.NORTH);
              contentPane.add (bottomPanel, BorderLayout.CENTER);
              return contentPane;
         public void launchFrame (int length)
              //Makes sure we have nice window decorations
              JFrame.setDefaultLookAndFeelDecorated(true);          
              //Sets up the top-level window     
              frame = new JFrame ("Minesweeper");
              //Exits program when the closed button is clicked
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              JMenuBar menuBar = new JMenuBar();
              Container contentPane = new Container();
              menuBar = newMenuBar();
              contentPane = newContentPane (length);
              //Sets up the menu bar and content pane
              frame.setJMenuBar (menuBar);
              frame.setContentPane (contentPane);
              //Displays the window
              frame.pack();
              frame.setVisible (true);
         public static void main (String args[])
              //Default length is 5
              length = 5;
              MinesweeperGUI minesweeper = new MinesweeperGUI();
              minesweeper.launchFrame(length);

    hi, thanks. that removed the exception; although now the buttons action listener won't work :(
    here is the revised code:
    To anyone out there, can you guys run this code and help me debug it?
    I'm really desperate as this is a school project of mine and the deadline is 7 hours away. I have already been working on it for 3 days, but the program is still very buggy.
    thanks!
    /* Oliver Ian C. Wee 04-80112
    * CS12 MHRU
    * Machine Problem 2
    package minesweeperGUI;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MinesweeperGUI implements ActionListener
         //Declaration of attributes
         static int length = 0;
         JMenuItem menuItemNew = new JMenuItem();
         JRadioButtonMenuItem rbEasy = new JRadioButtonMenuItem();
         JRadioButtonMenuItem rbHard = new JRadioButtonMenuItem();
         JMenuItem menuItemExit = new JMenuItem();
         JButton buttonReset = new JButton();
         JButton buttonGrid[][] = null;
         JFrame frame = new JFrame();
         int getBombsTotal = 0;
         JLabel setBombsLabel = new JLabel();
         int a = 0;
         int b = 0;
         //No constructor created. Uses default constructor
         //Create the menu bar
         public JMenuBar newMenuBar()
              //Sets up the menubar
              JMenuBar menuBar = new JMenuBar();
              //Sets up the Game menu with choice of new, grid size, and exit
              JMenu menu = new JMenu ("Game");
              menuBar.add (menu);
              menuItemNew = new JMenuItem ("New");
              menuItemNew.addActionListener (this);
              menu.add (menuItemNew);
              menu.addSeparator();
              //Sets up sub-menu for grid size with choice of easy and hard radio buttons
              JMenu subMenu = new JMenu ("Grid Size");
              ButtonGroup bg = new ButtonGroup();
              rbEasy = new JRadioButtonMenuItem ("Easy: 5x5 grid");
              bg.add (rbEasy);
              rbEasy.addActionListener (this);
              subMenu.add (rbEasy);
              rbHard = new JRadioButtonMenuItem ("Hard: 10x10 grid");
              bg.add (rbHard);
              rbHard.addActionListener (this);
              subMenu.add (rbHard);
              menu.add (subMenu);
              menu.addSeparator();
              menuItemExit = new JMenuItem ("Exit");
              menuItemExit.addActionListener (this);
              menu.add (menuItemExit);
              return menuBar;
         //Setting up of Bomb Grid
         public int [][] setGrid (int length)
              int grid[][] = null;
              grid = new int[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        grid[i][j] = ((int)Math.round(Math.random() * 10))% 2;
              return grid;     
         //Setting up of the of the graphical bomb grid
         public JButton[][] setButtonGrid (int length)
              JButton buttonGrid[][] = null;
              buttonGrid = new JButton[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = new JButton();
              return buttonGrid;
         //Setting up of a way to count the total number of bombs in the bomb grid
         public int getBombsTotal (int length, int setGrid[][])
              int bombsTotal = 0;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (setGrid[i][j] == 1)
                             bombsTotal += 1;
              return bombsTotal;
         //Create a label for number of bombs left
         public JLabel setBombsLabel (int getBombsTotal)
              JLabel bombsLabel = new JLabel("  " +String.valueOf (getBombsTotal) + " Bombs Left");
              return bombsLabel;
         //Setting up a way to count the number of bombs around a button
         public String setBombs (int length, int setGrid[][], int x, int y)
              int bombs[][] = new int[length][length];
              String bombsString = null;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (i == 0 && j == 0)
                             bombs[i][j] = setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i ==0 && j == (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else if (i == (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1];
                        else if (i == (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1];
                        else if (i == 0 && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i][j+1] +
                                  setGrid[i+1][j-1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i == (length - 1) && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1];
                        else if (i != 0 && i != (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i != 0 && i != (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j] + setGrid[i+1][j+1];
              bombsString = String.valueOf (bombs[x][y]);
              return bombsString;
         //create the panel for the bombs label and reset button
         public JPanel newTopPanel(int length)
              int setGridNew [][] = null;
              setGridNew = new int[length][length];
              int getBombsTotalNew = 0;
              JLabel setBombsLabelNew = new JLabel();
              setGridNew = setGrid (length);
              getBombsTotalNew = getBombsTotal (length, setGridNew);
              setBombsLabelNew = setBombsLabel (getBombsTotalNew);
              JPanel topPanel = new JPanel ();
              topPanel.setLayout (new BorderLayout (20,20));
              JLabel bombsLabel = new JLabel ();
              bombsLabel = setBombsLabelNew;     
              topPanel.add (bombsLabel, BorderLayout.WEST);
              buttonReset = new JButton("Reset");
              buttonReset.addActionListener (this);
              topPanel.add (buttonReset, BorderLayout.CENTER);
              return topPanel;
         //create the panel for the play grids
         public JPanel newBottomPanel(int length)
              JButton setButtonGridNew[][] = null;
              setButtonGridNew = new JButton [length][length];
              setButtonGridNew = setButtonGrid (length);
              JPanel bottomPanel = new JPanel ();
              bottomPanel.setLayout (new GridLayout (length, length));
              buttonGrid = new JButton[length][length];          
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = setButtonGridNew[i][j];
                        buttonGrid[i][j].addActionListener (this);
                        bottomPanel.add (buttonGrid[i][j]);
              return bottomPanel;
         //Overiding of abstract method actionPerformed
         public void actionPerformed(ActionEvent e)
              if (e.getSource() == menuItemNew)
                   closeFrame();
                   launchFrame(length);
              else if (e.getSource() == menuItemExit)
                   frame.setVisible (false);
                   System.exit(0);
              else if (e.getSource() == rbEasy)
                   closeFrame();
                   length = 5;
                   launchFrame(length);
              else if (e.getSource() == rbHard)
                   closeFrame();
                   length = 10;
                   launchFrame(length);     
              else if (e.getSource() == buttonReset)
                   closeFrame();
                   launchFrame(length);
              else if (e.getSource() == buttonGrid[a])
                   int setGridNew [][] = null;
                   setGridNew = new int[length][length];               
                   JButton bombButton [][] = null;
                   bombButton = new JButton [length][length];
                   String bombString [][] = null;
                   bombString = new String[length][length];
                   setGridNew = setGrid (length);               
                   for (int i = 0; i < length; i++)
                        for (int j = 0; j < length; j++)
                             bombString[i][j] = setBombs (length, setGridNew, i, j);
                             bombButton[i][j] = new JButton (bombString[i][j]);
                   if (setGridNew[a][b] == 0)
                        buttonGrid[a][b] = bombButton[a][b];
                        getBombsTotal--;
                        JLabel setBombsLabelNew = new JLabel();
                        setBombsLabelNew = setBombsLabel (" " String.valueOf (getBombsTotal) " Bombs Left");
                   else if (setGridNew[a][b] == 1 )
                        buttonGrid[a][b] = new JButton("x");
                        JOptionPane.showMessageDialog (null, "Game Over. You hit a Bomb!");
                        System.exit(0);     
         //create the content pane
         public Container newContentPane(int length)
              JPanel topPanel = new JPanel();
              JPanel bottomPanel = new JPanel();          
              topPanel = newTopPanel(length);
              bottomPanel = newBottomPanel (length);
              JPanel contentPane = new JPanel();
              contentPane.setOpaque (true);
              contentPane.setLayout (new BorderLayout(5,5));
              contentPane.add (topPanel, BorderLayout.NORTH);
              contentPane.add (bottomPanel, BorderLayout.CENTER);
              return contentPane;
         public void closeFrame ()
              frame = new JFrame ("Minesweeper");
              frame.dispose();
         public void launchFrame (int length)
              //Makes sure we have nice window decorations
              JFrame.setDefaultLookAndFeelDecorated(true);          
              //Sets up the top-level window     
              frame = new JFrame ("Minesweeper");
              //Exits program when the closed button is clicked
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              JMenuBar menuBar = new JMenuBar();
              Container contentPane = new Container();
              menuBar = newMenuBar();
              contentPane = newContentPane (length);
              //Sets up the menu bar and content pane
              frame.setJMenuBar (menuBar);
              frame.setContentPane (contentPane);
              //Displays the window
              frame.pack();
              frame.setVisible (true);
         public static void main (String args[])
              //Default length is 5
              length = 5;
              MinesweeperGUI minesweeper = new MinesweeperGUI();
              minesweeper.launchFrame(length);

  • Urgent Help Needed in this Report

    hi frd. help me in this report.
    parameter : plant,material no,company code,storage location.
    display: material no, material desc, UOM, ROL, warehouse, open po, open po qty, open pr no, open pr qty.
    Kindly Give me tips for doing this report.
    thank u
    Pari Vendhan.R

    Hi Pari,
    Go to se38 --Abap editior..
    chose the includes u like to be as
    Include  <>_top.
    Include  <>_subr.
    then follow the events....
    Initialization.
    ( as per requirement).
    At selection-screen.
    Perform fetch _data.
    Perform fefilloutput.
    any other logic to be followed for u r report.
    end-of-selection.
    Perform output.
    In include top.
    Put the declarartion part and the selection-screen block.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : pa_werks LIKE table name-werks
                            pa_material no like tablename-field.     
    SELECTION-SCREEN END OF BLOCK b1.
    like wise u need to put the logic for the requirement
    Thanks
    Mohinder Singh Chauhan

  • Help Needed in this.

    HI ALL,
    I have created a queue table and queue as below. i call enqueue procedure in after update of a trigger. With a package variable 'FISCFILE' . When I execute the update Of it it tells invalid queue name . can anyone help me with this
    SQL> ed select
    SQL> ed select
    SQL> SELECT Name FROM User_Queues WHERE Name LIKE '%FISC%';
    NAME
    AQ$_QT_FISCFILE_E
    Q_FISCFILE
    SQL>
    SQL> SELECT Queue_Table FROM User_Queue_Tables WHERE Queue_Table LIKE '%FISC%';
    QUEUE_TABLE
    QT_FISCFILE
    SQL> Spool Off
    Value Of PACKAGE variable:-
    Package VARIABLE :='FISCFILE';
    UPDATE TL_PYMT_DETAILS
    SET PYMT_TYPE ='RTGS',
    STATUS_CODE =91,
              FISC_STATUS ='N',
              PROC_DATE = TRUNC(SYSDATE)
    WHERE PYMT_REF ='R0421141' ;
    Queue Name :-  STS_AQ_ADM.Q_FISCFILE
    UPDATE TL_PYMT_DETAILS
    ERROR AT line 1:
    ORA-20001: QUEUE NAME INVALID PLEASE RERUN WITH CORRECT QUEUE NAME
    ORA-06512: AT "STS_TW_DBA.TRG_FISC_GEN", line 16
    ORA-04088: error during execution OF TRIGGER 'STS_TW_DBA.TRG_FISC_GEN'

    Dear All,
    Sorry For the delayed reply. The Payload name was given wrong.

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • Help needed with this program

    Hello,
    I would like to enquire on whether this VI  has any error. I need to configure the digital input as a positive limit switch which is a sensor which when blocked, will produce a change in the voltage pulse.
    Attachments:
    sensor.vi ‏34 KB

    Hello,
    I could not open. Can you save it for LabView 8.2 or 8.5?
    Andy
    Best Regards,
    Andy
    PCI-7356@UMI7764; PCIe-6320@SCB-68; LV2011; Motion Assistant 2.7; NI Motion 8.3; DAQmx 9.4; Win7

  • Help needed with this tutorial please

    Hello in this InsertUpdateDelete tutorial at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    or
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    and in this paragraph:
    Changing the Column Components
    and this statement
    In the Visual Designer, select the top Drop Down List component in the Table.
    "It's pretty confusing because there isn't a Drop Down List component in the Table as far as i can tell. There is a Drop Down List on the canvas up above this data table, but that has already been bound in a previous process, here is that previous proces:"
    Configuring the Drop Down List
    Select the Drop Down List in the Visual Designer and, in the Properties window, change its General > id property to personDD.
    Right-click the personDD Drop Down List in the Visual Designer and choose Bind to Data from the pop-up menu. The Bind to Data dialog box appears.........
    Can anyone tell me where i can get help with this tutorial or where i can download the finished program so i can sync up with what is actually being referenced in the questional statement that i mentioned above please?
    Thanks very much!
    BobK

    In Step 5 of "Changing the Column Components" you change the Trip Type column to a drop-down list.
    5. Select TRIP.TRIPTYPEID from the Selected list and make the following changes:
    * Change the Header text field from TRIPTYPEID to Trip Type.
    * Using the drop-down list, change the Component Type from Static Text to Drop Down List.
    6. Click OK to enforce your changes and dismiss the window. If the table columns are too wide after performing the above steps, you can resize them by selecting the first component in each column and dragging its selection handles.
    7. In the Visual Designer, select the top Drop Down List component in the Table. Right-click and choose Bind to Data from the pop-up menu. The Bind to Data dialog box opens.

  • Help needed on this QUERY

    Hello everyone,
    We have a table with around 2-3 million records. There are two columns, ID (Primary Key) and NEXT_ID like this:
    select ID, NEXT_ID from table_id;
    ID NEXT_ID
    100 200
    150 220
    160
    180
    200 300
    220
    300 20000
    20000
    We expect to get a output like following:
    ID SAME_ID
    100 100
    200 100
    300 100
    20000 100
    150 150
    220 150
    160 160
    180 180
    Could anybody please help us. Thanks in advance!!!

    Hi,
    Here's one way:
    SELECT     id
    ,     CONNECT_BY_ROOT     id     AS same_id
    FROM     table_x
    START WITH     id NOT IN (
                                  SELECT  next_id
                     FROM       table_x
                     WHERE       next_id     IS NOT NULL
    CONNECT BY     id = PRIOR next_id;

  • Help needed understanding this connection

    I am trying to follow some previous written code to understand JDBC better. When i have previously connected to a database, i have created a connection and then called it up when needed. In this code i have found though, they seem to use somthing called a datasource?
    public static Connection getXADBConnection() { Connection conn = null; DataSource ds = null; try { Object obj = lookup(MovieConstants.MOVIE_XA_DATASOURCE_NAME); ds = (DataSource) narrow(obj, DataSource.class); conn = ds.getConnection(); } catch (SQLException ex) { throw new DAORuntimeException(ex); } return conn; }
    So is datasource a connection already provided?? If so, is it better to use a datasource or to register through a driver manager? Also, if its not too much to ask, i am struggling to understand the first two lines in the try loop, what exactly is this doing?
    cheers

    nick2price wrote:
    ...try loop...Unless that was a typo, I think you should put off learning JDBC for a while and start with the basics.
    Start here:
    [http://java.sun.com/docs/books/tutorial/]

  • Help need in this query

    Hi All,
    I create following query which return my required results. but when i insert a new entry in the table it returns a new group of the same month and not add it in the above group where i doing mistake any idea ????
    My required results
    SQL> SELECT DISTINCT TO_CHAR(T.POS_DATE, 'Month') Month,count(*) Date_rec,sum(t.amount) amount,
      2   t.Asset, avg(t.amount) avg_ora_col,Sum(t.amount)/ count(*) "Normal Average"
      3  from pos t
      4  group by t.pos_date,t.asset;
    MONTH      DATE_REC    AMOUNT ASSET      AVG_ORA_COL Normal Average
    November          3       750 Loans              250            250
    December          2       900 Loans              450            450
    SQL> select * from pos;
    POS_DATE  ASSET         AMOUNT
    01-NOV-07 Loans            100
    01-NOV-07 Loans            250
    01-NOV-07 Loans            400
    02-NOV-07 Loans            100
    02-NOV-07 Loans            250
    02-NOV-07 Loans            400
    03-NOV-07 Loans            100
    03-NOV-07 Loans            250
    03-NOV-07 Loans            400
    09-DEC-07 Loans            500
    09-DEC-07 Loans            400
    11 rows selected.
    After insertion records in table it looks like following:
    SQL> SELECT DISTINCT TO_CHAR(T.POS_DATE, 'Month') Month,count(*) Date_rec,sum(t.amount) amount,
      2   t.Asset, avg(t.amount) avg_ora_col,Sum(t.amount)/ count(*) "Normal Average"
      3  from pos t
      4  group by t.pos_date,t.asset;
    MONTH      DATE_REC    AMOUNT ASSET      AVG_ORA_COL Normal Average
    November          3       750 Loans              250            250
    December          2       900 Loans              450            450
    November          1       300 Loans              300            300
    December          1       300 Loans              300            300
    SQL> select * from pos;
    POS_DATE  ASSET         AMOUNT
    01-NOV-07 Loans            100
    01-NOV-07 Loans            250
    01-NOV-07 Loans            400
    02-NOV-07 Loans            100
    02-NOV-07 Loans            250
    02-NOV-07 Loans            400
    03-NOV-07 Loans            100
    03-NOV-07 Loans            250
    03-NOV-07 Loans            400
    09-DEC-07 Loans            500
    09-DEC-07 Loans            400
    10-DEC-07 Loans            300
    27-NOV-07 Loans            300
    13 rows selected.
    My requirment is following
    SQL> SELECT DISTINCT TO_CHAR(T.POS_DATE, 'Month') Month,count(*) Date_rec,sum(t.amount) amount,
      2   t.Asset, avg(t.amount) avg_ora_col,Sum(t.amount)/ count(*) "Normal Average"
      3  from pos t
      4  group by t.pos_date,t.asset;
    MONTH      DATE_REC    AMOUNT ASSET     
    November          4       637 Loans             
    December          2      600 Loans              I want to divide no. of occurance of dates.
    which is 4 in Nov and 2 in dec.
    Message was edited by:
    53637

    hi,
    try this query
    Instead of grouping by t.pos_date group by TO_CHAR(T.POS_DATE, 'Month')
    SELECT DISTINCT TO_CHAR(T.POS_DATE, 'Month') Month,count(*) Date_rec,sum(t.amount) amount,
    t.Asset, avg(t.amount) avg_ora_col,Sum(t.amount)/ count(*) "Normal Average"
    from pos t
    group by TO_CHAR(T.POS_DATE, 'Month'),t.asset
    hope this will work
    Regards,
    Sridhar

  • Help needed with this scenario

    Hi,
    This is a scenario to be implemented using workflows.
    Can you tell me how to go about with this.
    there is a form on the portal. User enters some details there. Then there is a submit button. when the user presses the submit button, a workflow is triggered on the R/3 side. A work item is sent to the manager which has a form ( the form's layout and data are the same as that of the portal screen ). Basically whatever the user enters in the portal screen is sent as a form to his manager, who can then approve it or reject it.
    Can anyone tell me how this can be done.....the general steps...connectivity between portal and R/3 workflow

    Hi Vijay,
       If you are on R3 Enterprise or above, you can crate a BSP application to get user data and create an iview for this BSP Application. Within BSP application you can use "SWJ_WAPI_START_WORKFLOW" to trigger the workflow.
    Cheers,
    Sanjeev

  • Help need with this expression

    I am trying to calculate the ratio... so basically doing the adding two textboxes different textboxes and then diving them with the the sum of two different textboxes... but i am getting an #error..
    =(iif(reportItems!Textbox76.Value = nothing,"0.00",reportItems!Textbox76.Value) + iif(reportitems!Textbox94.Value = nothing,"0.00",reportitems!Textbox94.Value)) / iif(((IIF(reportitems!Textbox69.Value = nothing,"0.00",reportitems!Textbox69.Value) + iif(reportitems!Textbox85.Value = nothing,"0.00",reportitems!Textbox85.Value))) = "0.00",1,((IIF(reportitems!Textbox69.Value = nothing,"0.00",reportitems!Textbox69.Value) + iif(reportitems!Textbox85.Value = nothing,"0.00",reportitems!Textbox85.Value))))
    Thanks
    Karen

    Hi Karen,
    I have tested the expression below, it turn out that if one of textboxes's value contain the character except number, then the result of this expression is #Error.
    In your scenario, please ensure that there is no any #Error for the below expression:
    =Cint(ReportItems!TextBox76.Value)
    =Cint(ReportItems!TextBox94.Value)
    =Cint(ReportItems!TextBox69.Value)
    =Cint(ReportItems!TextBox85.Value)
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Help needed in this program!

    Hi, i have written a program for solving a power flow question,using Gaussian elimination method to solve for matrices.The program is pretty long,and i have tried breaking the program into smaller modules,but there were errors in the numeric results at the end.
    I need some suggests as to how to break the program into smaller modules???
    /* Example 10.6 Pg 347 from Bergen.
       Demonstration of Newton-Raphson Iteration.
    import java.util.*;
    import java.io.*;
    import java.lang.Math;
    import java.lang.ArrayIndexOutOfBoundsException;
    public class NewtonRaphsonIt
         public static void main( String args[])throws ArrayIndexOutOfBoundsException
              int Deg = 360;
              int Loop = 3;
              double pi = 3.141592653589793238;
              double limit = Math.abs(5E-6);
              int i,j,k,u;
              double V1,V2,V3,P2,P3,Q3,deltaP2,deltaP3,deltaQ3;
              double Theta1,Theta2,Theta3;
              double P1,Q1,Q2;
              double P_Loss,Q_Loss,PF;
              double maxi,temp,temp2;
              int tempi=0;
              //values given
              P2=0.6661; P3=-2.8653; Q3=-1.2244;
              V1=1; V2=1.05; Theta1=0;
              //values supposely to be chosen as a rough guess
              Theta2=Theta3=0; V3=1;
              double [][] Y_bus = {{-19.98,10,10},{10,-19.98,10},{10,10,-19.98}};
              double [][]   J   = new double [3][3];
              double []     fx  = new double [3];
              double []    oldx = {Theta2,Theta3,V3};
              double []     x   = {Theta2,Theta3,V3};
              double []     V   = {V1,V2,Theta1};
              double []    Bus  = {P2,P3,Q3};     
              double []   delta = new double [3];
              double []    ANS  = new double [3];
              int f = fx.length;
              int y = Y_bus.length;
              int z = J.length;
              int c = Bus.length;
              int h = delta.length;     
              int e = ANS.length;
              int ox= oldx.length;
              //System.out.println("Arrary size for Ybus is:" +n);
              //output Ybus Matrix
              System.out.println(" Ybus is:");
              System.out.println("---------");
              for ( i=0; i<y; i++)
                   for ( j=0; j<y; j++)
                        System.out.print(+Y_bus[i][j]+" "+", ");
              System.out.println();
              for ( u=1; u<Loop+1; u++){
              //while(delta[0] < limit){
              //Jacobian matrix
              //deltaP2/deltaTheta2
              J[0][0] = (Math.abs(V[1]))* (Math.abs(V[0])) * Y_bus[1][0] * (Math.cos(x[0]))
                        + (Math.abs(V[1]))* (Math.abs(x[2])) * Y_bus[1][2] * (Math.cos(x[0]-x[1]));
              //deltaP2/deltaTheta3
              J[0][1] = -(Math.abs(V[1]))* (Math.abs(x[2])) * Y_bus[1][2] * (Math.cos(x[0]-x[1]));
              //deltaP2/delta|V3|
              J[0][2] = (Math.abs(V[1])) * Y_bus[1][2] * (Math.sin(x[0]-x[1]));
              //deltaP3/deltaTheta2
              J[1][0] = -(Math.abs(V[1]))*(Math.abs(x[2])) * Y_bus[2][0] * (Math.cos(x[1]-x[0]));
              //deltaP3/deltaTheta3          
              J[1][1] = (Math.abs(V[0])) *(Math.abs(x[2])) * Y_bus[2][0] * (Math.cos(x[1]))
                        +(Math.abs(V[1])) *(Math.abs(x[2])) * Y_bus[2][1] * (Math.cos(x[1]-x[0]));
              //deltaP3/delta|V3|
              J[1][2]     = (Math.abs(V[0])) * Y_bus[2][0] * (Math.sin(x[1]))
                        +(Math.abs(V[1]))* Y_bus[2][1] * (Math.sin(x[1]-x[0]));
              //deltaQ3/deltaTheta2
              J[2][0] = - Y_bus[2][0] * (Math.abs(x[2])) * (Math.abs(V[1])) *(Math.sin(x[1]-x[0]));
              //deltaQ3/deltaTheta3
              J[2][1]     = (Math.abs(x[2]))*(Math.abs(V[0])) * Y_bus[2][0] * (Math.sin(x[1]))
                        +(Math.abs(x[2]))*(Math.abs(V[1])) * Y_bus[2][1] * (Math.sin(x[1]-x[0]));
              //deltaQ3/delta|V3|
              J[2][2]     = -((Math.abs(V[0])) * Y_bus[2][0] * (Math.cos(x[1]))
                        + (Math.abs(V[1])) * Y_bus[2][1] * (Math.cos(x[1]-x[0]))
                        + (Math.abs(x[2]))* 2 * Y_bus[2][2]);
              //output Jacobian Matrix
              System.out.println();
              System.out.println(+u+")"+" Jacobian Matrix is:");
              System.out.println("-----------------------");
              for ( i=0; i<z; i++)
                   for ( j=0; j<z; j++)
                        System.out.print(+J[i][j]+" "+", ");
              System.out.println();
              // variable P2
              fx[0] = (Math.abs(V[1]))*(Math.abs(V[0])) * Y_bus[1][0] * (Math.sin(x[0]-V[2]))
                   + (Math.abs(V[1]))*(Math.abs(x[2])) * Y_bus[1][2] * (Math.sin(x[0]-x[1]));
              //System.out.println("P2 is :"+fx[0]);
              // variable P3
              fx[1] = (Math.abs(x[2]))*(Math.abs(V[0])) * Y_bus[2][0] * (Math.sin(x[1]-V[2]))
                   + (Math.abs(x[2]))*(Math.abs(V[1])) * Y_bus[2][1] * (Math.sin(x[1]-x[0]));
              //System.out.println("P3 is :"+fx[1]);
              // variable Q3
              fx[2] = -((Math.abs(x[2]))*(Math.abs(V[0])) * Y_bus[2][0] * (Math.cos(x[1]-V[2]))
                   + (Math.abs(x[2]))*(Math.abs(V[1])) * Y_bus[2][1] * (Math.cos(x[1]-x[0]))
                   + (Math.abs(x[2]))*(Math.abs(x[2])) * Y_bus[2][2]);
              //System.out.println("Q3 is :"+fx[2]);
              //Output f(x)
              System.out.println();     
              System.out.println(+u+")"+" Function f(x) is:");
              System.out.println("--------------------");
              for ( k=0; k<f; k++)
                   System.out.println(+fx[k]);
              System.out.println();
              //ouput P2,P3,Q3 as a matrix
              System.out.println();          
              System.out.println(+u+")"+" Matrix [P2,P3,Q3] is:");
              System.out.println("------------------------");
              for ( k=0; k<c; k++)
                   System.out.println(+Bus[k]);
              System.out.println();
              //finding values of deltaP2,deltaP3,deltaQ3
              System.out.println();          
              System.out.println(+u+")"+" Matrix [d.P2,d.P3,d.Q3] is:");
              System.out.println("------------------------------");
              for ( k=0; k<h; k++)
                   System.out.println(delta[k]= Bus[k]- fx[k]);
              System.out.println();
              //find delta x={deltaTheta2,deltaTheta3,delta|V3|}
              //Gaussian Elimination method
              //solve Ax=b
              //matrix J will be destroyed,solution will be in matrix delta
              if(J[0].length != z)
                   System.out.println("Matrix J must be a Square Matrix!");
                   return;
              for(j=0; j<z; j++)
                   maxi=-1E-12;
                   for(i=j; i<z; i++)
                        if(Math.abs(J[i][j])> maxi)
                             tempi=i;
                             maxi=Math.abs(J[i][j]);
                             //System.out.println(+tempi);
                   if(maxi<1E-12)
                        System.out.println
                             ("The Set either has mutltiple solutions or no unique solution!");
                        return;     
                   //Permuting tempi row with the j-th row
                   if(tempi != j)
                        for(k=j; k<z; k++)
                             temp=J[j][k];          //store 1st row into temp space     
                             J[j][k]=J[tempi][k];     //store last row into 1st row
                             J[tempi][k]=temp;     //store 1st row back into last row
                        temp=delta[j];               //store 1st row into temp space     
                        delta[j]=delta[tempi];          //store last row into 1st row
                        delta[tempi]=temp;          //store 1st row back into last row
                   //System.out.println("deltatemp:"+delta[j]);
                   //Divide j-th row by J[j][j]
                   temp=J[j][j];
                   delta[j]=delta[j]/temp;
                   System.out.println("delta1:"+delta[j]);
                   for(k=j; k<z; k++)
                        J[j][k]=J[j][k]/temp;
                   for(i=0; i<z; i++)
                        if(i != j)
                             temp=J[i][j];
                             temp2=delta;                         
                             for(k=0; k<z; k++)
                                  J[i][k] = J[i][k]-temp*J[j][k];
                                  delta[i]= temp2-temp*delta[j];
                                  System.out.println("delta:"+delta[j]);
                                  System.out.println("J:"+J[i][k]);
              // values of deltax in radians
              System.out.println(+u+")"+" The solution for AX=b is:");
              System.out.println("----------------------------");
              for(i=0; i<z; i++)
                   System.out.println(+delta[i]);
                   x[i] = delta[i];
              // values of deltax in degrees
              System.out.println();
              System.out.println(+u+")"+" The solution for deltaX is:");
              System.out.println("------------------------------");
              ANS[0] = x[0] * Deg/(2*pi);
              ANS[1] = x[1] * Deg/(2*pi);
              ANS[2] = x[2];
              for(i=0; i<e; i++)
                   System.out.println(+ANS[i]);
              //finding X^1=x^0 + deltax^0
              System.out.println();
              System.out.println(" The solution for X after iteration:"+"("+u+")");
              System.out.println("---------------------------------------");
              for(i=0; i<e; i++)
                   x[i] = oldx[i] + ANS[i];
                   System.out.println(+x[i]);
                   System.out.println();
                   //System.out.println("oldx:" +oldx[i]);
                   //System.out.println();
              //update the oldx with the new values from x
              for(i=0; i<ox; i++)
                   oldx[i] = x[i];
                   //System.out.println("oldx:" +oldx[i]);
                   //System.out.println();
              //convert to radians for Math.sin/cos()
              x[0] = x[0] * (2*pi)/Deg;
              x[1] = x[1] * (2*pi)/Deg;
              x[2] = x[2];
              }//for loop
              //if (delta[0] == limit)
              //     break;
              //}//while loop
              // calcuate P1,Q1,Q2
              P1 = (Math.abs(V[0]))*(Math.abs(V[1])) * Y_bus[0][1]* (Math.sin(V[2]-x[0]))
                   + (Math.abs(V[0]))*(Math.abs(x[2])) * Y_bus[0][2] * (Math.sin(V[2]-x[1]));
              System.out.println("P1 is :"+P1);
              System.out.println();
              Q1 = -((Math.abs(V[0]))*(Math.abs(V[1])) * Y_bus[0][1] * (Math.cos(V[2]-x[0]))
                   + (Math.abs(V[0]))*(Math.abs(x[2])) * Y_bus[0][2] * (Math.cos(V[2]-x[1]))
                   + (Math.abs(V[0]))*(Math.abs(V[0])) * Y_bus[0][0]);
              System.out.println("Q1 is :"+Q1);
              System.out.println();
              Q2 = -((Math.abs(V[1]))*(Math.abs(V[0])) * Y_bus[1][0] * (Math.cos(x[0]-V[2]))
                   + (Math.abs(V[1]))*(Math.abs(x[2])) * Y_bus[1][2] * (Math.cos(x[0]-x[1]))
                   + (Math.abs(V[1]))*(Math.abs(V[1])) * Y_bus[1][1]);
              System.out.println("Q2 is :"+Q2);
              System.out.println();
              //Power Loss P_Loss = (P1+P2) - P3
              P_Loss = (P1+P2) - P3;
              System.out.println("Power Loss is :"+P_Loss);
              System.out.println();
              System.out.println("P2 is :"+P2);
              System.out.println();
              System.out.println("P3 is :"+P3);
              System.out.println();
              System.out.println("Q3 is :"+Q3);
              System.out.println();
              //Reactive Power Loss
              Q_Loss = (Q1+Q2) - Q3;
              System.out.println("Reactive Power Loss:" +Q_Loss);
              System.out.println();
              System.out.println("Q1 is :"+Q1);
              System.out.println();
              System.out.println("Q2 is :"+Q2);
              System.out.println();
              System.out.println("Q3 is :"+Q3);
              System.out.println();
              //Power factor PF = P/sqrt[(P^2 +  Q^2)]
              PF = P3/(Math.sqrt( (P3*P3) + (Q3*Q3)));
              System.out.println("Power Factor is :"+PF);
              System.out.println();

    Start off by creating a Matrix class, rather than doing it all with 2d arrays in the main method? (The Matrix class might do little more than be a wrapper around a 2d array, but at least it would be a bit more modular.)

  • Help needed with this assignment

    Heres the question i have to complete.
    Build a new class LotsOfBooks which has an attribute which is an array of Book objects and initialises this array using a constructor method parameter. Write a method "setAllReserved" in LotsOfBooks which invokes setReserved( ) on all the books in the array.
    I have to submit my code into a Java compiler that tests my code against the teachers, if it is wrong you get given an error message. My code compiles fine in the compiler Blue J, but in the online tester i get this message.
    mismatch in setAllReserved
    Sometimes if i jig things about i get a null pointer error in the tester. I do not nesserseraly want a written java answer, just to know what i am doing wrong and what i can change.
    NB The array does not have to have any values and the Book class was already given.
    public class LotsOfBooks
    private Book[] books;
    public LotsOfBooks(Object Book[])
    public void setAllReserved()
    for (int i=0; i<books.length; i++){
    Book b =books;
    b.setReserved();
    public class Book
    String author;
    String title;
    boolean reserved;
    boolean onLoan;
    public Book(String author, String title){
    this.author = author;
    this.title = title;
    reserved = false;
    onLoan = false;
    public void setReserved(){
    reserved = true;
    public void setOnLoan(){
    onLoan = true;
    public boolean isOnLoan(){
    return onLoan;
    public String getAuthor(){
    return author;

    well for the preferred on i get
    DataSet 1
    ----------Compilation output--------------------------------------
    javac BookTester1.java
    BookTester1.java:18: cannot resolve symbol
    symbol : constructor LotsOfBooks (Book[])
    location: class LotsOfBooks
    LotsOfBooks lob = new LotsOfBooks(books);
    ^
    1 error
    ----------Sorry expected answer was-------------------------------
    The method setAllReserved worked OK - well done
    ----------Your answer however was---------------------------------
    ++ ERROR ++
    Your program did not compile
    Scroll back in this window to find more details
    [S] Sorry exercise ci101/Wk12BookA was not completed successfully
    and for if not i get
    DataSet 1
    ----------Compilation output--------------------------------------
    javac BookTester1.java
    ----------Sorry expected answer was-------------------------------
    The method setAllReserved worked OK - well done
    ----------Your answer however was---------------------------------
    Exception in thread "main" java.lang.ClassCastException
         at LotsOfBooks.<init>(LotsOfBooks.java:6)
         at BookTester1.main(BookTester1.java:18)
    [S] Sorry exercise ci101/Wk12BookA was not completed successfully

Maybe you are looking for