A new Java Student in need of help

I am new to this Java language and while so far I have found it to be quite easy I have now come up against a program that is giving me some problems. Our teacher has given us this program that had a bunch of errors and we had to find them and also correct them. There were 20 errors to start and I have gotten it down to only 2 errors but I cannot figure out how to correct them. The teacher said to use whatever we could get our hands on to help us correct this code (internet, books, etc) so I figured that I would try this message board. This is my first post so could someone please give me a hand? Here is the code:
import java.util.*;
public class Names
public static void main(String args)
try
List list = createList(args);
Collections.sort(list);
Iterator i = list.iterator();
while (i.hasNext())
String s = (String) i.next();
system.out.println(s);
catch (Exception e)
System.out.printlnn("Exception"+ e.getMessage() "\n");
private static List createList(String args[]) throws Exception
List List;
if (args.length == 0 || argx(0).equals("ArrayList"))
list = ArrayList();
System.out.println("Using ArrayList");
else if (args[0].equals("LinkedList"))
list = new LinkedList();
system.out.println("Using LinkedList");
else if
throw new Exception
("invalid argument " + args[0] + ". Valid choices are ArrayList or LinkedList");
fillList(list);
return list;
private static void fillList (List list)
list.add("Jim");
list.add("Helen");
list.add("Jennifer");
list.add("Daniel");
list.add("Michelle");
and here are the 2 errors that I can't seem to figure out:
C:\$jg105\Names.java:24: ')' expected.
System.out.printlnn("Exception"+ e.getMessage() "\n");
^
C:\$jg105\Names.java:41: '(' expected.
else if
^
2 errors
Finished
any help will be appreciated thanks Bob

import java.util.*;
//add this:
import java.util.LinkedList;
public class Names
//CHANGE    public static void main(String args) {
    public static void main(String[] args) {
        try {
            List list = createList(args);
            Collections.sort(list);
            Iterator i = list.iterator();
            while ( i.hasNext() ) {
                String s = (String) i.next();
// CHANGE               system.out.println(s);
                System.out.println(s);
        catch (Exception e) {
// CHANGE           System.out.printlnn("Exception"+ e.getMessage() "\n");
        System.out.println("Exception"+ e.getMessage()+"\n");
    private static List createList(String args[]) throws Exception {
// CHANGE       List List;
        List list;
// CHANGE       if ( args.length == 0 || argx(0).equals("ArrayList") ) {
        if ( args.length == 0 || args[0].equals("ArrayList") ) {
// CHANGE           list = ArrayList();
            list = new ArrayList();
            System.out.println("Using ArrayList");
        } else if ( args[0].equals("LinkedList") ) {
            list = new LinkedList();
// CHANGE           system.out.println("Using LinkedList");
            System.out.println("Using LinkedList");
// CHANGE       } else if {
            } else {
            throw new Exception
                ("invalid argument " + args[0] + ". Valid choices are ArrayList or LinkedList");
        fillList(list);
        return list;
    private static void fillList (List list) {
        list.add("Jim");
        list.add("Helen");
        list.add("Jennifer");
        list.add("Daniel");
        list.add("Michelle");
}

Similar Messages

  • Java Student In Need Of Help - JDBC

    I need to create a connection between a MS Access database and my Java Application. Could anyone help me with this? I've tried the online tutorials but I still could not manage to get my head around it!
    Please help
    Finbarr.

    hey lee
    i'm just after finding a good site on JDBC with MS ACCESS, so i'm going to study this and see can i make head or tails of it! i really want to try and see if i can do it myself first. If i'm having trouble I'll get back to ya!
    This is my first time in here!
    Thanx
    Fin.

  • At a dead end.  A java student in need of help.

    I've hit a wall.
    The program is supposed to allow the user to draw five different polygons using the polygon class and let the user pick the color for each polygon and move each polygon around the screen once it is filled in. The user clicks to add the points and then double clicks to fill in the polygon. Then the polygon is added to the array. Up to the dragging around the screen the program works fine. When I click on a polygon with the shift down nothing happens and I've spent several hours trying to figure out why.
    I've placed several System.out.println's in the code and I think I've narrowed down the problem. (I hope) I think it might have something to do with the canvas repainting. Because the S.O.P's show that the program is going through and executing that code. It might also have something to the do with my polygon array, but to my knowledge that is setup fine.
    Thanks a bunch if you try to help.
    Brad
    // Full Code Below
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class poly extends JFrame implements ActionListener
         /* Accessible Variables */
         private JPanel canvas;
         private JPanel mp;
         private JComboBox choice;
         private JButton reset;
         private Podly polyArray[] = new Podly[5];
         private Podly currentPoly = new Podly();
         private Podly movingPoly = new Podly();
         private int count;
         private Color currentColor;
         private Point firstPoint;
         private boolean newPoly = true;
         private boolean moving = false;
         private boolean overflowed = false;
         poly()
              setTitle("Polygon");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              count = 0;
              /* Interactive Buttons and Menus */
              JMenuBar tp = new JMenuBar();
              JMenu color = new JMenu("Color");
              JMenuItem MBlack = new JMenuItem("Black");
              color.add(MBlack);
              JMenuItem MRed = new JMenuItem("Red");
              color.add(MRed);
              JMenuItem MGreen = new JMenuItem("Green");
              color.add(MGreen);
              JMenuItem MYellow = new JMenuItem("Yellow");
              color.add(MYellow);
              MBlack.addActionListener(this);
              MRed.addActionListener(this);
              MGreen.addActionListener(this);
              MYellow.addActionListener(this);
              tp.add(color);
              canvas = new CanvasArt();
              canvas.setBackground(Color.white);
              canvas.addMouseListener(new Points());
              canvas.addMouseMotionListener(new Moved());
              choice = new JComboBox();
              choice.addItem("Black");
              choice.addItem("Red");
              choice.addItem("Green");
              choice.addItem("Yellow");
              choice.addActionListener(this);
              reset = new JButton("Reset");
              reset.addActionListener(this);
              JLabel chooseColor = new JLabel("Choose a color:");
              JLabel holdShift = new JLabel("Hold shift, click, and drag to move a polygon.");
              mp = new JPanel();
              mp.add(chooseColor);
              mp.add(choice);
              mp.add(reset);
              mp.add(holdShift);
              setJMenuBar(tp);
              getContentPane().add(canvas);
              getContentPane().add(mp, "South");          
         public static void main(String [] args)
              JFrame main = new poly();
              main.setSize(600, 600);
              main.setVisible(true);
         public void actionPerformed(ActionEvent e)
              Object test = e.getSource();
              Object selection;
              if (test instanceof JComboBox)
                   JComboBox source = (JComboBox)e.getSource();
                   selection = source.getSelectedItem();
                   if (selection.equals("Black")) currentColor = Color.black;
                   else if (selection.equals("Red")) currentColor = Color.red;
                   else if (selection.equals("Green")) currentColor = Color.green;
                   else if (selection.equals("Yellow")) currentColor = Color.yellow;
              else if (test instanceof JButton) // Repaints if Reset Button is Pressed
                   repaint();
                   currentPoly.reset();
                   count = 0;
                   overflowed = false;
              else
                   JMenuItem source = (JMenuItem)e.getSource();
                   selection = source.getText();
                   if (selection.equals("Black")) currentColor = Color.black;
                   else if (selection.equals("Red")) currentColor = Color.red;
                   else if (selection.equals("Green")) currentColor = Color.green;
                   else if (selection.equals("Yellow")) currentColor = Color.yellow;
         class Podly extends Polygon // Class adds Color Fuctionality to Polygon class
              Color polyColor;
              void setColor(Color y)
              {polyColor = y;}
              Color getColor()
              {return polyColor;}
         /* Canvas Painting Panel */
         class CanvasArt extends JPanel
              public void paintComponent(Graphics g)
                   super.paintComponent(g);
                   System.out.println("Canvas is called");
                   System.out.println(polyArray);
                   for (int i=0; i>count;i++)
                        System.out.println("Loop is going");
                        Podly y = polyArray;
                        g.setColor(y.getColor());
                        g.fillPolygon(y);
                        System.out.println(y);
                        System.out.println("Loop has filled in polygon"); // Test
                   System.out.println("painting complete");
         class Points extends MouseAdapter
              public void mousePressed(MouseEvent e)
                   Graphics g = canvas.getGraphics();
                   if (overflowed) // Checks for overflow in program.
                        g.setColor(Color.RED);
                        Font font = new Font("SansSerif",Font.BOLD, 30);
                        g.setFont(font);
                        g.drawString("OVERFLOW", 10, 30);
                        Font font2 = new Font("SansSerif",Font.BOLD, 20);
                        g.setFont(font2);
                        g.setColor(Color.BLUE);
                        g.drawString("Double Click to Play Again", 10, 50);
                        if (e.getClickCount() == 2) // Allows user to play again.
                             repaint();
                             currentPoly.reset();
                             count = 0;
                             overflowed = false;
                   else
                        int x = e.getX();
                        int y = e.getY();
                        if (newPoly)
                             firstPoint = new Point(x,y);
                             if (e.isShiftDown())
                                  System.out.println("Gets before Check loop");
                                  for (int r=count-1;r>=0;r--)
                                       System.out.println("Inside For Check Loop");
                                       System.out.println(polyArray[r]);
                                       if (!polyArray[r].contains(x,y))          
                                            System.out.println("Point is found");
                                            movingPoly = polyArray[r];
                                            System.out.println("MovingPoly Defined");
                                            moving = true;
                                            System.out.println("Moving is true"); // test
                                            break;
                             else
                                  currentPoly.setColor(currentColor);
                                  currentPoly.addPoint(x,y);
                                  g.fillOval(x,y,1,1);
                                  newPoly = false;
                        else
                             if (e.getClickCount() == 2)
                                  g.setColor(currentPoly.getColor());
                                  g.fillPolygon(currentPoly);
                                  polyArray[count] = currentPoly;
                                  currentPoly.reset();
                                  count++;
                                  if (count == polyArray.length)
                                  {overflowed = true;}
                                  newPoly = true;
                             else
                                  g.setColor(currentPoly.getColor());
                                  currentPoly.addPoint(x,y);
                                  g.drawLine(firstPoint.x, firstPoint.y, x, y);
                                  firstPoint.move(x,y);
              public void mouseReleased(MouseEvent e)
                   if(e.isShiftDown())
                   { moving = false; }
         class Moved extends MouseMotionAdapter
              public void mouseDragged(MouseEvent e)
                   if (moving && e.isShiftDown())
                        int x = e.getX();
                        int y = e.getY();
                        System.out.println("Gets here");
                        movingPoly.translate((x-firstPoint.x),(y-firstPoint.y));
                        firstPoint.move(x,y);
                        canvas.repaint();

    Here is the updated code still with the color error I talked about above.
    :) Thanks for all the help everyone.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class poly extends JFrame implements ActionListener
         /* Accessible Variables */
         private JPanel canvas;
         private JPanel mp;
         private JComboBox choice;
         Podly [] polyArray;
         private Podly currentPoly;
         private Podly movingPoly;
         private int count;
         private Color currentColor;
         private Point firstPoint;
         private Color polyColor;
         private boolean newPoly = true;
         private boolean moving = false;
         private boolean overflowed = false;
         poly()
              setTitle("Polygon");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  // Exits program on window close.
              polyArray = new Podly[5];
              count = 0;                                      // Set count to zero.
              /* Interactive Buttons and Menus */
              JMenuBar tp = new JMenuBar();
              JMenu color = new JMenu("Color");
              JMenuItem MBlack = new JMenuItem("Black");
              color.add(MBlack);
              JMenuItem MRed = new JMenuItem("Red");
              color.add(MRed);
              JMenuItem MGreen = new JMenuItem("Green");
              color.add(MGreen);
              JMenuItem MYellow = new JMenuItem("Yellow");
              color.add(MYellow);
              MBlack.addActionListener(this);
              MRed.addActionListener(this);
              MGreen.addActionListener(this);
              MYellow.addActionListener(this);
              tp.add(color);
              canvas = new CanvasArt();
              canvas.setBackground(Color.white);
              canvas.addMouseListener(new Points());
              canvas.addMouseMotionListener(new Moved());
              choice = new JComboBox();
              choice.addItem("Black");
              choice.addItem("Red");
              choice.addItem("Green");
              choice.addItem("Yellow");
              choice.addActionListener(this);
              JLabel chooseColor = new JLabel("Choose a color:");
              JLabel holdShift = new JLabel("Hold shift, click, and drag to move a polygon.");
              mp = new JPanel();
              mp.add(chooseColor);
              mp.add(choice);
              mp.add(holdShift);
              setJMenuBar(tp);
              getContentPane().add(canvas);
              getContentPane().add(mp, "South");          
         /* Button Listeners */
         public void actionPerformed(ActionEvent e)
              Object test = e.getSource();
              Object selection;
              if (test instanceof JComboBox)
                   JComboBox source = (JComboBox)e.getSource();
                   selection = source.getSelectedItem();
                   if (selection.equals("Black")) currentColor = Color.black;
                   else if (selection.equals("Red")) currentColor = Color.red;
                   else if (selection.equals("Green")) currentColor = Color.green;
                   else if (selection.equals("Yellow")) currentColor = Color.yellow;
              else
                   JMenuItem source = (JMenuItem)e.getSource();
                   selection = source.getText();
                   if (selection.equals("Black")) currentColor = Color.black;
                   else if (selection.equals("Red")) currentColor = Color.red;
                   else if (selection.equals("Green")) currentColor = Color.green;
                   else if (selection.equals("Yellow")) currentColor = Color.yellow;
         class Podly extends Polygon  // Class adds Color Fuctionality to Polygon class
              void setColor(Color y)  // sets the Polygon's color.
              {polyColor = y;}
              Color getColor()   // returns the Polygon's color.
              {return polyColor;}
         /* Canvas Painting Panel */
         class CanvasArt extends JPanel
              public void paintComponent(Graphics g)
                   super.paintComponent(g);
                        for (int i=0; i<count;i++)
                             g.setColor(polyArray.getColor());
                             g.fillPolygon(polyArray[i]);
         class Points extends MouseAdapter
              /* Listens for mouse press, constructs polygons, stores them in array. */
              public void mousePressed(MouseEvent e)
                   Graphics g = canvas.getGraphics();
                   if (overflowed) // Checks for overflow in program.
                        g.setColor(Color.RED);
                        Font font = new Font("SansSerif",Font.BOLD, 30);
                        g.setFont(font);
                        g.drawString("OVERFLOW", 10, 30);
                        Font font2 = new Font("SansSerif",Font.BOLD, 20);
                        g.setFont(font2);
                        g.setColor(Color.BLUE);
                        g.drawString("Double Click to Play Again", 10, 50);
                        if (e.getClickCount() == 2) // allows user to play again by resetting.
                             repaint();
                             count = 0;
                             overflowed = false;
                   else
                        int x = e.getX();
                        int y = e.getY();
                        if (newPoly)
                             firstPoint = new Point(x,y);
                             if (e.isShiftDown())
                                  for (int r=count-1;r>=0;r--)
                                       if (polyArray[r].contains(x,y))          
                                            movingPoly = polyArray[r];
                                            moving = true;
                                            break; // exits for loop after Polygon with point is found.
                             else
                                  currentPoly = new Podly();
                                  currentPoly.addPoint(x,y); // Adds the first point.
                                  currentPoly.setColor(currentColor); // Sets the Polygon Color
                                  g.fillOval(x,y,1,1);
                                  newPoly = false;
                        else
                             /* Close the current Polygon at double click,
                             * then moves on to the next. */
                             if (e.getClickCount() == 2)
                                  g.setColor(currentPoly.getColor());
                                  g.fillPolygon(currentPoly);
                                  polyArray[count] = currentPoly;
                                  count++;
                                  if (count == polyArray.length)
                                  {overflowed = true; canvas.repaint();}
                                  newPoly = true;
                             else
                                  g.setColor(currentPoly.getColor());
                                  currentPoly.addPoint(x,y);
                                  g.drawLine(firstPoint.x, firstPoint.y, x, y);
                                  firstPoint.move(x,y);
              /* Listens for mouse release */
              public void mouseReleased(MouseEvent e)
                   if(e.isShiftDown())
                   { moving = false; }
         /* Moves selected Polygon around */
         class Moved extends MouseMotionAdapter
              public void mouseDragged(MouseEvent e)
                   if (moving && e.isShiftDown())
                        int x = e.getX();
                        int y = e.getY();
                        movingPoly.translate((x-firstPoint.x),(y-firstPoint.y));
                        firstPoint.move(x,y);
                        canvas.repaint();
         public static void main(String [] args)
              JFrame poly = new poly();
              poly.setSize(600, 600);
              poly.setVisible(true);

  • I'm new to itunes and need some help. Can anyone tell me if it is possible to download an album which has explicit content without actually downloading the explicit songs?

    I'm new to itunes and need some help.  Can anyone tell me if it is possible to download an album which has explicit songs without actually downloading the songs that are explicit?

    See if there's a non-explicit version and download that?  Just download the individual songs you want, and not the others?
    Honestly, your phrasing doesn't make sense.  You're asking how to download an album without downloading its tracks? 

  • HT4993 A CHINESE STUDENT REALLY NEED YOUR HELP!!

    A CHINESE STUDENT REALLY NEED YOUR HELP!!
    Dear Sir or Madam,
    As I bought my iPhone 5 (16GB,White) in the USA from Sprint, full price with tax,  unlocked ,it was excepted to be a global phone. But now I come across with some problems in China  using local carrier, everything is working properly except sending text message, and iMessage and Facetime also seem not to work.This is very serious for Apple and me! Will I have the chance to fix this?
    I tried all the possible solutions from the Internet, and the Official solution offered by Apple (http://support.apple.com/kb/TS4459), but it doesn't seem to work.
    Will Apple help me with this issue? Please do.
    Information of my iPhone:
    SN: :F1*******8GJ
    <Personal Information Edited by Host>

    luyao49 wrote:
    A CHINESE STUDENT REALLY NEED YOUR HELP!!
    Dear Sir or Madam,
    As I bought my iPhone 5 (16GB,White) in the USA from Sprint, full price with tax,  unlocked
    No such thing is sold from any authorized source in the US. The Sprint phone is not unlocked. It can be unlocked by Sprint for use on international (non US) carriers for current Sprint customers in good standing after completing (I believe) 60 days of service.
    If you are having problems using certain features on an unsupported carrier, you'll have to work it out with your carrier.

  • What does a new non-DE user need? | Help for a Wiki page

    Hey Archers,
    I'm using Arch with the Compiz Standalone Window Manager and I need some help for a project.
    It turns out (who knew) that computers need a lot more to run smoothly than just a desktop and applications. You need network managers, gtk themes and much much more. Now, Desktop Environments such as GNOME and KDE provide a lot of these programs built-in, good for them, but I'm looking to build my system as dependency-free as I can and the big DE's don't really provide that. Especially GNOME just ropes me in whenever I want to use the tiniest piece of it (darn you gnome-keyring).
    So I come to you fora, with a quest for information. I want to compile an overview of essential and useful applications with minimal dependencies that allow a CompizIndy user to build his system freely. And if I get enough information, I want to turn it into its own page for the Wiki so it becomes easier to get started with a birds-eye view of what you need to flesh out your system (not exclusively for CompizIndy btw). So please help me!
    What applications/daemons/tools should a new system install? I'm not asking which ones are the best or worst or your favorites, just which kinds do you need --that aren't covered in the install guide--?
    For example it's advisable to get:
    Panel/dock
    desktop manager
    network manager
    compositing manager
    a tool for managing removable devices (ntfs-3g etc)
    a packer/unpacker
    a screensaver
    power management
    alt-F2 runcommand
    custom keybindings
    a user switch/logout manager
    a volume manager
    etc.
    So what do you recommend? What do you need to get up and going?
    Hoping to hear from you guys and girls,
    Matthias
    PS: if I'm doubling up on anything, please let me know and save me effort and embarassment ^_^
    Last edited by Matsjo (2011-01-28 20:37:26)

    There are many threads on this, although individual ones asking for "the best app to do XXX". You could try searching those. Also Search for the LnF Awards threads. you might find a few ideas there. We also have wiki pages for light-weight applications which might be useful
    Panel/dock  none
    desktop manager none
    network manager netcfg
    compositing manager none or xcompmgr (for basic compositing)
    a tool for managing removable devices (ntfs-3g etc) udiskie or udev rules or devmon
    a packer/unpacker coreutils eg - tar, bzip etc with an alias called "ex" in .aliases
    a screensaver none
    power management ???
    alt-F2 runcommand gmrun
    custom keybindings xbindkeys
    a user switch/logout manager none
    a volume manager see udiskie....
    BTW, if this is for you, then simply install Arch and use a non DE based WM --- eventually you will figure out what you are missing

  • New in srm, i need some help

    Hy everyone, i'm new in srm, i need to learn how to create a new user in the system, i can copy an user, but if the user is external i cannot write in the table t77s0.
    Does someone has a tutorial?
    Thanks a lot, Julieta

    Hi Julieta,
    In table t77s0, you can set indicators for HR replication according to note 550055.
    After this, for users which were replicated from HR system, you should not modify it in SRM system, but only HR side and synchronize the changes.
    Regards,
    Ivy

  • Help.  new Java student

    Hi. Can anyone help me write a Java program that ask the user to input their class and the grade they think they will get in each class. Then find the grade point average for that user. it needs to use JOptionPane and display the classes, its grade, and the users grade point average

    Self-note: Class needs to ask what class, ask what grade in that class, get gradepoint average.
    If you're like me when I first took java and I started getting advice, though I heard terms like method/constructor/etc, I didn't truly start to understand it until way later.
    Does your teacher require you to use more than 1 class for this program and are you using an IDE (Eclipse, netbeans, etc)?
    Usually an IDE will give you options to complete a JOptionPane which saves your wrists some fatigue and helps you pick out what you need.
    Here's something you may consider starting out with:
    public class Grades{
    double grade;
    double gpa;
    String course;
    public static void main(String[] args) {
    course = JOptionPane.showInputDialog("Please enter the class name");
    grade = JOptionPane.showInputDialog("Please enter a grade of 1-100:");
    }What that does is declare three variables (grade, gpa, and class).
    Then it asks the user for their class name and a number grade from 1-100. (If your teacher isnt asking for anything specific like a letter grade then I would go with that)
    It takes the user's input and stores it into grade and gpa as shown to the left of the Joptionpane( ie. grade = )
    You'll probably want to make a loop and use a YES_NO_CANCEL Joptionpane (google for usage and ask for more help if you need help writing this)
    So that a student can enter as many grades as he wants before stopping the program.
    Then you'll have to take all those grades and get the average and assign a letter grade based on what the average is( im not sure exactly how GPA works but it's probably like if you have a grade of 90+ it's 4.0, 80+ is 3.0, etc etc)
    Good luck mate.

  • Student in need of HELP!Best application for writting java Code?

    I've been working on two different systems and need to be able to work on both..On one system the SDK is installed on a linux machine on another on a windows machine...unfortunately i cant open the linux created files on my windows machine although i can compile ad run them! What application would allow me to work on both systems wothout creating problems?

    Hi,
    I am a bit confused by this question. My colleagues here use Windows to create their files and I use a Linux machine. I have never encountered a problem as described here. Its a company policy here for everyone to save files in UNIX format, so I can readily open and edit those files created in Windows on my Linux box with NetBeans or EMACS I use. Sometimes when my colleagues forget to save their files in UNIX format, I have to apply dos2unix to mend those files, but still that isnt too teadious at all.
    Try opening the files you created in Windows with any text editor that you have available in Linux - vi, emacs, gEdit whatever. And please tell here what problems, if any you encountered, in actually editing them again.
    Correct me if I have misunderstood your question.
    hth,
    Binil

  • Desperate student in need of help with assignment =(

    Please skip this bit if you don't want to read the things that led to this point
    Hi, Im ICTstudent. Im trying to finish school before the summer holidays and find a job so I can afford an appartment to live in with my girlfriend.
    I have an assignment that I need to finish asap because of the nearing summer holidays. My coach told me that it should take me about a weekend to finish it, so I asked my teacher to send me all the relevant data. after downloading oracle express edition etc, i installed them on vista and encountered a lot of problems (which I finally resolved thanks to this fantastic forum!)
    However, this means that I have been working on this assignment for 2 days already. Just when I wanted to start working on the Form I need to build, I discovered that my teacher had sent me the wrong DB model :s :s :s I now had to rebuild the entire db =(
    So, almost 2 days later I built the new db and basic form (which is filling the tables on the form with the db records) in Forms Builder. Now ive spent almost double the time i should have on this assignment, and I have to build a number of constraints... I have no clue how to even start with these =( That's why I'm asking you guys for help. I know its a lot to ask for, but I really have no other ideas.
    Thanks for any help you can offer me
    The assignment I got from my teacher:
    Create a master detail form that looks like this:                              
    http://img222.imageshack.us/img222/4531/masterdetail.jpg
    Which I did, It fills it up nicely with data from the DB, except for the following things:
    Number of highest bids:
    The number of highest bids the bidder has in the itemlist (if it exceeds the minimum price).
    Include the following constraint:
    bid.date needs to be in time for the auction. This means that it must be before auction.date.
    Add a function that:
    When activated, changes all the “Bid number” numbers into the number which has the highest bid, as long as it is higher then the min price.
    Tables:
    Bid:
    bidID
    auctionlistID
    memberID
    bid
    date
    member:
    memberID
    name
    adres
    city
    auctionlist:
    auctionlistID
    description
    maxbid
    minbid
    auction:
    auctionID
    date
    index:
    auctionID
    auctionlistID
    Thanks for reading :)

    You get marks for honesty. Often students who post here don't admit to their status. Some responders seems to be wound up by students asking for help. I don't know why, maybe they've forgotten what it was like to be a beginner. Me, I'm happy as long as I get a course credit.
    By the way, a set of CREATE TABLE scripts is generally more helpdul than bald DESC statements.
    Your BID table doesn't seem to have a column for amount, which will make it hard to implement Number of highest bids Unless that is what the BID column means, in which case it needs a clearer name.
    Include the following constraint will have to be done as a input validation in the form, as these sorts of cross-table constraints are hard to implement in the database. Come to think of it, you probably want to include some input validation to ensure that a new BID meets the MINAMT.
    Add a function that not sure what the point of that function would be.
    Having read through your post I think you are in the wrong forum. This is a database PL/SQL forum; really you should be asking your question in [the Forms forum|http://forums.oracle.com/forums/forum.jspa?forumID=82]
    Which leads me to my last point: what is your question? You have given us lots of info but you haven't explained what you need from us.
    Good luck
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Student in need of help

    Hello,
    Iam a new student to Oracle and SQL I need to find out what these symbols and terms do in this language. RUN START / @ GET. I was told that there are multiple purpose keys????
    Please HELP
    Thank you

    These are actually SQL*PLUS commands, and not sql commands. SQL*Plus is Oracle's command line interface to sql.
    @file_name Runs the specified command file
    /          Runs the command currently in the buffer
    GET        Loads the specified operating session file into
               the buffer
    RUN        Lists and runs the command currently in the buffer
    START      Is the same as @

  • Java menus, noob needs lotsa help

    how do u create menus, i have seen books and stuff, but they don't help. i need to know how to open from a file with the open box popping up. like, how do u save to a file, open from a file, etc. all the books say is that u can create a menu and u need an actionlistener. plz help, i hope i am not confusing

    how do u create menus, i have seen books and stuff,
    but they don't help. i need to know how to open from
    a file with the open box popping up. like, how do u
    save to a file, open from a file, etc. all the books
    say is that u can create a menu and u need an
    actionlistener. plz help, i hope i am not confusingThere are five basic steps you'll need to do.
    Step 1. Create an AbstractAction
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JFileChooser;
    AbstractAction openAction = new AbstractAction("Open File...") {
    public void actionPerformed(ActionEvent e) {
    JFileChooser myChooser = new JFileChooser( );
    // <YOUR_COMPONENT> is the containing Component, like the JDialog.
    myChooser.showDialog(<YOUR_COMPONENT>, "Open File...");
    Step 2. Create a JMenuItem and attach your newly created AbstractAction.
    import javax.swing.JMenuItem;
    JMenuItem myMenuItem = new JMenuItem(openAction);
    Step 3. Add the JMenuItem you just created to your JMenu
    import javax.swing.JMenu;
    JMenu myFileMenu = new JMenu("File");
    myFileMenu.add(myMenuItem);
    Step 4. Add the JMenu you just created to a JMenuBar
    import javax.swing.JMenuBar;
    JMenuBar myMenuBar = new JMenuBar( );
    myMenuBar.add(myFileMenu);
    Step 5. Set the menu bar of your parent JDialog or JFrame to the JMenuBar you just created is Step 4.
    import javax.swing.JDialog;
    JDialog mainDialog = new JDialog( );
    mainDialog.setJMenuBar(myMenuBar);

  • New to Solaris administration - Need some help with some issues

    Hello all,
    I am a new to Solaris administration and need some assistance with a few things. I was going to make separate posts but decided it would be easy to keep track of in one. I really do not know much about the OS but I do have a little Linux background so that might help me out. I am going to number my problems to keep them sorted, so here we go.
    The machine:
    Sunfire V880
    4x 73GB HDs
    PCI dual fiber channel host adapter
    Attached RAID array:
    Sun StorEdge T3 Array with 9x 73GB HDs
    Sun DDS4 Tape Drive in a Unipack
    OS: Solaris 5.10
    Updates: Updated everything except 2 patches (Updating is a real pain isn't it? At least it seems that way to me.)
    1. So I might as well start with the update issues! These 2 updates will not install:
    -PostgreSQL 8.2 source code, (137004-02)
    Utility used to install the update failed with exit code {0}.
    -Patch for mediaLib in solaris, (121620-03)
    Install of update failed. Utility used to install the update is not able to save files. Utility used to install the update failed with exit code 4.
    No idea why the PostgreSQL update is not working, but the medialib patch seems to not have enough hard drive space.
    2. Where are all the drives? I don't know how to find the RAID box or the other 3 internal hard drives. When I installed the OS, I think I installed it on only one hard drive and that might be part of the reason why the medialibe update above says that I don't have enough space.
    3. I probably need more space for the OS and updates, is there a way to "add" space onto the hard drive that currently is running the OS?
    3. Once I see the other hard drives I wish to combine them to make a RAID 0 and RAID 5 array, how do I go about doing that?
    4. How can I find/see the tape drive?
    5. Does my swap space really need to be 64GB? I know the book I have read suggests it, but I only made it 5GB because it didn't seem to make sense to make it 64GB.
    Thank you in advance for the help. I know these are a lot of questions to ask but please go easy on me :)
    rjbanker
    Edited by: rjbanker on Mar 7, 2008 8:21 AM

    SolarisSAinPA*
    1.
    -PostgreSQL 8.2 source code, (137004-02)
    Utility used to install the update failed with exit code {0}.
    Exit code 0 means there were no errors. When you run showrev -p 137004-02, does your system show that the patch is installed? You can check the log for a particular patch add attempt in /var/sadm/patch/+patch_num_rev+1- A bunch of stuff shows up, here is a portion (I am not entirely sure what it means, there must be a least a page of stuff like this):
    Patch: 121081-08 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc cccrr, SUNWccccr, SUNWccfw, SUNWccsign, SUNWcctpx, SUNWccinv, SUNWccccfg, SUNWcc fwctrl
    Patch: 122231-01 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc ctpx
    Patch: 120932-01 Obsoletes: Requires: Incompatibles: Packages: SUNWcctpx
    Patch: 123123-02 Obsoletes: Requires: Incompatibles: Packages: SUNWccinv
    Patch: 121118-12 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc smauth, SUNWppror, SUNWpprou, SUNWupdatemgru, SUNWupdatemgrr, SUNWppro-plugin-su nos-base
    2.
    Where are all the drives? I don't know how to find the RAID box or the other 3 internal hard drives. When I >installed the OS, I think I installed it on only one hard drive and that might be part of the reason why the >medialibe update above says that I don't have enough space.
    When you run format command, how many drives are listed? Identify your root drive (compare with output of df command you ran earlier) Please post here.2. Output of df-hk, looks like I ran out of room. Should I just go ahead and reinstall the OS?
    Filesystem size used avail capacity Mounted on
    /dev/dsk/c1t0d0s0 5.9G 5.4G 378M 94% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 42G 1.3M 42G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
    5.9G 5.4G 378M 94% /platform/sun4u-us3/lib/libc_psr.so.1
    /platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
    5.9G 5.4G 378M 94% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
    fd 0K 0K 0K 0% /dev/fd
    swap 42G 1.1M 42G 1% /tmp
    swap 42G 32K 42G 1% /var/run
    /dev/dsk/c1t0d0s7 46G 47M 46G 1% /export/home
    3. So I guess the general consensus is to reinstall the OS, is that correct?
    4. There is nothing in \dev\rmt, and unfortunately I don't have a tape to test it with!
    5. I guess 5GB will be ok for what we do.
    Alan.pae*
    1. I think the above text might explain why it failed, although I don't know how to correct it.
    2. Output of format:
    # mount
    / on /dev/dsk/c1t0d0s0 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d80008 on Mon Mar 10 10:56:51 2008
    /devices on /devices read/write/setuid/devices/dev=4dc0000 on Mon Mar 10 10:56:19 2008
    /system/contract on ctfs read/write/setuid/devices/dev=4e00001 on Mon Mar 10 10:56:19 2008
    /proc on proc read/write/setuid/devices/dev=4e40000 on Mon Mar 10 10:56:19 2008
    /etc/mnttab on mnttab read/write/setuid/devices/dev=4e80001 on Mon Mar 10 10:56:19 2008
    /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4ec0001 on Mon Mar 10 10:56:19 2008
    /system/object on objfs read/write/setuid/devices/dev=4f00001 on Mon Mar 10 10:56:19 2008
    /platform/sun4u-us3/lib/libc_psr.so.1 on /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 read/write/setuid/devices/dev=1d80008 on Mon Mar 10 10:56:50 2008
    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 on /platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 read/write/setuid/devices/dev=1d80008 on Mon Mar 10 10:56:50 2008
    /dev/fd on fd read/write/setuid/devices/dev=50c0001 on Mon Mar 10 10:56:51 2008
    /tmp on swap read/write/setuid/devices/xattr/dev=4ec0002 on Mon Mar 10 10:56:52 2008
    /var/run on swap read/write/setuid/devices/xattr/dev=4ec0003 on Mon Mar 10 10:56:52 2008
    /export/home on /dev/dsk/c1t0d0s7 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d8000f on Mon Mar 10 10:56:57 2008
    3. Judging by the above text I will be doing a reinstall huh?
    4. Actually I am not familiar with tape backups let alone solaris backup apps! Any suggestions? (Preferably free, have to cut down on costs.)
    5. No comment
    Thanks for the help, hope to hear from you again!
    rjbanker

  • Student in need of help (Trouble merging cells in CS3)

    I am currently attending college, pursuing a degree in computer systems. One of the required courses is web design. I am using Adobe Dreamweaver CS3, and lets just say, I don't particularly like it.
    Our instructor wants us to familiarize ourselves with Dreamweaver by building a basic page using tables.
    His required outline is this : http://img231.imageshack.us/img231/3855/pagedesign.png
    Now, to start, I have no problem creating the table. That is easy. The problem I have is shaping everything to look like that picture. I've been trying to do this with a 7 x 10 table.
    My technique so far has been to merge all of the cells on the top row for text1, then I Merge all of the cells for the borders on the far left and the far right. After that, I merge the cells necessart for text2. Again, no problems so far. After I have merged the cells for text2, I create the border directly to the left of Page Name and Graphic1 by merging the cells, then I merge the cells for Page Name. Once again, no problems so far. After that, I merge the cells for graphic1, and then create seperator between graphic1,  and graphic2. Once I have done that, I merge the cells for Text3.
    Now, here is where I run into problems. When I merge the cells for graphic2, I hope to get the result that is in that image, however, instead of getting that result, the cell shrinks. Some things I have already tried to remedy this problem (keep in mind, I am completely new to this, so in all reality, I have no clue what I'm doing):
    1. I tried deleting the table, redoing it, but starting from the bottom, going up. With this strategy, instead of graphic2 giving me a problem, the seperator between graphic1 and graphic2 shrunk in height but expanded in width.
    2. I tried simply resizing the cell through the properties manager. This did not work at all. When I entered the value, value vanished.
    3. I tried messing around with the resizing tool, but that did no good as it cannot change just one cell. It changes all the cells on the table.
    4. I tried inserting new rows/columns and remerging the cells according to the new rows/columns I entered. This did not work at all.
    So, that is my problem. I wish I could give a graphical image of the problem (Like a before and after picture) but unfortunatley I am not in class right now and that is the only place I have access to dreamweaver. I have asked my instructor about this problem and he told me to try and insert text or an image into the cell so it would not resize. He has made it clear that he cannot step by step instructions because we have to figure it out on our own. I can understand where is coming from but in the same respect, I don't feel as if I am gaining any kind of knowledge as to how to use dreamweaver.
    Whoever could help me with this problem: It would be greatly appreciated. I hate falling behind in class and that is why I feel is happening right now because I cannot get past this part. Another student attempted to help me but he couldn't figure it out either, even after he reconstructed the page himself on another computer without any problem.
    Thank you again for whoever helps. If you have any questions about my problem, feel free to post it here. Thanks again

    I was bored and feeling generous...lol I thin this code will create the table layout your looking for. I will express my distain for tables used for page layouts, as they are not standard anymore. But you do have to follow your instructors lead. Anyway, here is the code.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    <table border="1" cellspacing="2" cellpadding="2">
      <tr>
        <td colspan="6">text1</td>
      </tr>
      <tr>
        <td width="2" rowspan="7"> </td>
        <td colspan="4">text2</td>
        <td width="18" rowspan="7"> </td>
      </tr>
      <tr>
        <td width="14" rowspan="3"> </td>
        <td colspan="3">page name</td>
      </tr>
      <tr>
        <td width="68" rowspan="2">graphic1</td>
        <td width="6" rowspan="3"> </td>
        <td height="57">text3</td>
      </tr>
      <tr>
        <td width="64" rowspan="2">graphic2</td>
      </tr>
      <tr>
        <td colspan="2">blank space</td>
      </tr>
      <tr>
        <td colspan="4">text4</td>
      </tr>
      <tr>
        <td colspan="4">text5</td>
      </tr>
    </table>
    Hope that works for you. hmmm this forum is so buggy. I inserted raw code...maybe the wrong thing to do. Trying again.
    Message was edited by: teedoffnewbie wasnt exactly right.

  • HELP! I'm new at this and need some help getting started

    I am currently working on our website and was wondering how do I make a new page?
    for example.
    I want people to click on a link on the homepage to say a stockist list and see another page open with that information on.
    Also I need to know how to make the homepage have white strips on the left and right (for an example of what I mean please visit www.internationalrobes.com)
    I look forward to your replies!
    Carly

    Well, these are more web design related questions, but I will help as much as I can in the context.
    Going about adding a page:
    1) Navigate to Admin > Layout > Static pages
    2) Add a new static page here and enter your content
    3) Once it is saved, you should see an eyeglasses icon next to the page and you can copy that url and use it in a link.
    4) For example
    <a href="common/pagedetail.aspx?PageCode=test">My link here</a>
    As far as the white stripes, I think you mean centering a page?
    1) Edit the main master page under your theme
    2) Center the content using css, more info here: [http://www.thesitewizard.com/css/center-div-block.shtml]
    I think you would also benefit from the WebEx i created on implementing a layout into Webtools available here: [http://www.businessoneecommerce.com/developerdownloads/Implementing_a_Webtools_Theme.zip]

Maybe you are looking for

  • 802.1x + Machine Account Authentication = Vulnerability?

    Hello forum, I'm trying to determine the security implications of utilizing 802.1x authentication/authorization with the "Domain Computers" option selected within ACS. The problem I am having with this scenerio is this: 1) Client machines are authent

  • Copy sheets and sort

    I'm new to numbers, and have been learning how to use the software - great tool! I have - what should be - a simple request, but I have not found the answer just yet - so I'd like some feedback and direction. I have a sheet set up which I would like

  • Installation SSSLLLOOWWWW on new iMac

    I bought a new iMac today and the first thing that I'm doing is installing Leopard, which was included in the box. First of all, the machine shut down during the consistency check. Not a restart, but completely shut itself off when it was about 4% co

  • Your Save operation could not be completed

    Hi, I started Photoshop Express Online on my Windows 7 computer using Firefox. I uploaded some pictures. All was fine. When I edit a picture however (which itself is working fine, too) I only get the error message shown in the title. This is happenin

  • WP8 Selecting Prefered Network Provider when Roami...

    Hi, I have a Lumia 820 and I'm about to travel to another country.... Would there be an option to select a prefered network provider when roaming? I'm unable to find an this option under "network+" or "mobile network" in settings.. The reason for ask