Question

I need help with the get quote sql that is all Build a rate quote GUI....

I need help with the get quote sql that is all

Build a rate quote GUI. The system will first allow us to select a customer (assume they are already in the DB), an employee giving the quote, and then select part(s) and/or motorcycles. You system should also include the shipping information in the quote. After all of the items have been selected for the rate quote, we should give the user a “bottom line” total that includes shipping (we wont worry about sales tax in this system). We d like a hard copy of this quote for future reference.

Therefore, you should format the output neatly in System.out.println area for ease of reference. The output should include the current date, customer, employee and product information as well as the computed total for this quote.

I need help with the get quote sql that is all Bui

Here what I have so far and comments i got if you're just getting the quote for this scenario, you are going to simply code independent SELECT statements for each table. One for Customer, one for Employee, one for Parts, etc.

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class ProjectPhase2 extends JFrame
{
JPanel jp = new JPanel();
JLabel customerLabel = new JLabel("Customer");
JTextField cusField = new JTextField(30);
JLabel employeeLabel = new JLabel("Employee");
JTextField empField = new JTextField(30);
JLabel partLabel = new JLabel("Part");
JTextField partField = new JTextField(30);
JLabel motorLabel = new JLabel("Motor");
JTextField motorField = new JTextField(30);
JButton jb = new JButton("Get Quote");
JTextArea textArea = new JTextArea(
"This is an editable JTextArea. "
);

public ProjectPhase2()
{
setTitle("Phase2 Get Quote");
setVisible(true);
setSize(600, 600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
GridLayout experimentLayout = new GridLayout(5,2);
jp.setLayout(experimentLayout);
jp.add(cusField);
jp.add(customerLabel);
jp.add(empField);
jp.add(employeeLabel);
jp.add(partField);
jp.add(partLabel);
jp.add(motorField);
jp.add(motorLabel);

jp.add(jb);
jb.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// String input = cusField.getText();
// System.out.println(input);   
/* Statement stmt = connection.createStatement();
ResultSet cusSet = stmt.executeQuery
("select name, address, city from student where advisor "
+ " = 'Trono'");
ResultSet empSet = stmt.executeQuery
("select name, address, city from student where advisor "
+ " = 'Trono'");

// Iterate through the result and print the student names
while (rset.next())
System.out.println(rset.getString(1) + " " + rset.getString(2)
+ ". " + rset.getString(3));
*/
String inputPart = partField.getText();
String inputMotor = motorField.getText();
if (inputPart.trim().equals("")){
System.out.println("parts was blank");}
else{
System.out.println(inputPart);
}


if (inputMotor.trim().equals(""))
System.out.println("motor was blank");
else
System.out.println(inputMotor);
}
});
  
textArea.setLineWrap(true);
// jp.add(textArea);
add(jp);

}

public static void main(String[] args)
{
// Class.forName("com.mysql.jdbc.Driver");
// System.out.println("Driver loaded");
// Connection connection = DriverManager.getConnection
//("jdbc:mysql://localhost/sampdb", "root","cs304");
// System.out.println("Database connected");   
ProjectPhase2 t = new ProjectPhase2();
}
}

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
I need help with the get quote sql that is all Build a rate quote GUI....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Swing File Adder: Build a GUI that contains an input file, text box and Infile button....

    Swing File Adder: Build a GUI that contains an input file, text box and Infile button. It also must contain and output file, text box and Outfile button. Must also have a process button must read the infile and write to the outfile if not already written that is already selected and clear button. It must pull up a JFile chooser that allows us to brows to the file and places the full path name same with the output file.  Program...

  • With the Code below, how would i add a "Back" Button to the bottom of the...

    With the Code below, how would i add a "Back" Button to the bottom of the history page so that it takes me back to the main function and continues to work? import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; public class RecipeFinder { public static void main(String[]...

  • Convert the following GUI application into an Applet. Do not delete any part of the GUI...

    Convert the following GUI application into an Applet. Do not delete any part of the GUI program, just comment out the part of the program not required. Another Java code is required // Java code: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class PizzaShopping extends JFrame { JCheckBox ckb[]; JLabel jlb1; JRadioButton radio[], radio1[]; static String[] pizzaToppings = "Tomato,Green peppper,Black olives,Mushrooms,Extra cheese,Pepproni,Sausage" .split(","); static String[] pizzaSizes = "Small: $6.50, Medium: $8.50, Large: $10".split(","); static String[] pizzatypes = "Thin Crust, Mediam...

  • please help me debug this Create a GUI for an application that lets the user calculate...

    please help me debug this Create a GUI for an application that lets the user calculate the hypotenuse of a right triangle. Use the Pythagorean Theorem to calculate the length of the third side. The Pythagorean Theorem states that the square of the hypotenuse of a right-triangle is equal to the sum of the squares of the opposite sides: alidate the user input so that the user must enter a double value for side A and B of the triangle....

  • Program #2 Write a program to simulate showing an NBA Team on a Basketball court Here...

    Program #2 Write a program to simulate showing an NBA Team on a Basketball court Here is an example of the screenshot when running the program: Tony Parker T. Splitter T. Duncan M. Gineb Player Kame: M Ginobil Player Age 2 Add A Player Ce An example of the JFrame subclass with main method is as follows import java.awt. import java.awt.event." import javax.swing. public class NBA Playoff extends JFrame private JTextField txtName: private JTextField txtAge: private NBATeam spurs private NBAcourtPanel...

  • Need some help fixing these compilation errors that start around line 20, thank you import javax.swing.*;...

    Need some help fixing these compilation errors that start around line 20, thank you import javax.swing.*; public class PropertyTax1 extends JFrame {    private static final int WIDTH = 400, HEIGHT = 300;       public PropertyTax1()    {        setTitle("Calculation of Property Taxes");        setSize(WIDTH, HEIGHT);        setVisible(true);        setDefaultCloseOperation(EXIT_ON_CLOSE);    } // end of the constructor method       public static void main(String[] args)    {        PropertyTax1 proptax = new PropertyTax1();   ...

  • import javax.swing.*; import java.awt.event.*; import java.awt.*; public class BookReview extends JFrame implements ActionListener {       private JLabel...

    import javax.swing.*; import java.awt.event.*; import java.awt.*; public class BookReview extends JFrame implements ActionListener {       private JLabel titleLabel;       private JTextField titleTxtFd;       private JComboBox typeCmb;       private ButtonGroup ratingGP;       private JButton processBnt;       private JButton endBnt;       private JButton clearBnt;       private JTextArea entriesTxtAr;       private JRadioButton excellentRdBnt;       private JRadioButton veryGoodRdBnt;       private JRadioButton fairRdBnt;       private JRadioButton poorRdBnt;       private String ratingString;       private final String EXCELLENT = "Excellent";       private final String VERYGOOD = "Very Good";       private final String FAIR = "Fair";       private final String POOR = "Poor";       String...

  • I have been messing around with java lately and I have made this calculator. Is there...

    I have been messing around with java lately and I have made this calculator. Is there any way that I would be able to get a different sound to play on each different button 1 - 9 like a nokia phone? Thank you. *SOURCE CODE* import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; class Calculator extends JFrame { private final Font BIGGER_FONT = new Font("monspaced",Font.PLAIN, 20); private JTextField textfield; private boolean number = true; private String equalOp = "="; private...

  • Basic button tracking Deliverables Updated files for app6.java myJFrame6.java myJPanel6.java student.java Contents You can start with...

    Basic button tracking Deliverables Updated files for app6.java myJFrame6.java myJPanel6.java student.java Contents You can start with the files available here. public class app6 { public static void main(String args[]) {     myJFrame6 mjf = new myJFrame6(); } } import java.awt.*; import javax.swing.*; import java.awt.event.*; public class myJFrame6 extends JFrame {    myJPanel6 p6;    public myJFrame6 ()    {        super ("My First Frame"); //------------------------------------------------------ // Create components: Jpanel, JLabel and JTextField        p6 = new myJPanel6(); //------------------------------------------------------...

  • Can someone modify my code so that I do not get this error: Exception in thread...

    Can someone modify my code so that I do not get this error: Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1043) at java.awt.Container.add(Container.java:363) at RatePanel.<init>(RatePanel.java:64) at CurrencyConverter.main(CurrencyConverter.java:16) This code should get the amount of money in US dollars from user and then let them select which currency they are trying to convert to and then in the textfield print the amount //********************************************************************* //File name: RatePanel.java //Name: Brittany Hines //Purpose: Panel for a program that convers different currencyNamerencies to use dollars //*********************************************************************...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT