Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: BOOKSHOP MANAGEMENT SYSTEM

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default BOOKSHOP MANAGEMENT SYSTEM

    Please a want friends to help me write java project code that will work for BOOKSHOP MANAGEMENT SYSTEM
    Thank you and waiting forward to hear from you.


  2. #2
    Senior Member PhHein's Avatar
    Join Date
    Mar 2013
    Location
    Germany
    Posts
    609
    My Mood
    Sleepy
    Thanks
    10
    Thanked 93 Times in 86 Posts

    Default Re: BOOKSHOP MANAGEMENT SYSTEM

    What have you tried? - Matt Gemmell
    Post your code and ask specifiq questions. Nobody will do it for you.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: BOOKSHOP MANAGEMENT SYSTEM

    this is my code check for me please

    import java.awt.*;

    import java.awt.event.*;

    import javax.swing.*;

    import javax.swing.event.*;

    public class bookStore extends JFrame

    {

    static String[] yourChoicesItems =

    {

    "Candy 34.00",

    "Cinderella 19.50",

    "The Seasons with Bird 21.00",

    "The DAM book 66.00",

    "Coloring with Thread 56.00",

    "Little Red Hood 30.00",

    "Security Engineering 70.00",

    "Journey 22.00",

    "Java 85.00"

    };



    static double[] yourChoicesPrices = { 34.00,19.50,21.00, 66.00, 56.00, 30.00,70.00, 22.00, 85.00};



    private JList yourChoices;

    private checkOutButtonHandler cHandler;

    private clearButtonHandler crHandler;

    private selectionButtonHandler sHandler;

    private removeButtonHandler rmHandler;

    private JButton checkB,clearB,selectionB,removeB;

    private JCheckBox check;

    private JTextArea list,bill;

    private Container pane;



    public bookStore()

    {

    super("Welcome to Success Book Store");



    pane = getContentPane();

    pane.setBackground(new Color(0, 100, 200));

    pane.setLayout(new BorderLayout(5, 5));



    JLabel yourChoicesJLabel = new JLabel("The Book List Shopping Cart ");

    pane.add(yourChoicesJLabel,BorderLayout.NORTH);

    yourChoicesJLabel.setFont(new Font("Dialog",Font.BOLD,20));



    JPanel m=new JPanel();

    yourChoices = new JList(yourChoicesItems);

    m.add(yourChoices);

    yourChoices.setFont(new Font("Courier",Font.BOLD,14));

    pane.add(m,BorderLayout.WEST);



    selectionB=new JButton("Selection");

    sHandler=new selectionButtonHandler();

    selectionB.addActionListener(sHandler);

    m.add(selectionB);



    JPanel p=new JPanel();

    list = new JTextArea(20,50);

    p.add(list);

    list.setFont(new Font("Courier",Font.PLAIN,14));



    checkB=new JButton("Check out");

    cHandler=new checkOutButtonHandler();

    checkB.addActionListener(cHandler);


    clearB=new JButton("Clear");

    crHandler=new clearButtonHandler();

    clearB.addActionListener(crHandler);


    removeB=new JButton("Remove");

    rmHandler=new removeButtonHandler();

    removeB.addActionListener(rmHandler);



    p.add(removeB);

    p.add(clearB);

    p.add(checkB);



    bill = new JTextArea(20,60);

    p.add(bill);


    pane.add(p,BorderLayout.CENTER);



    setSize(800, 800);

    setVisible(true);

    setDefaultCloseOperation(EXIT_ON_CLOSE);

    }



    private void displayList()

    {

    list.setEditable(false);

    list.setText("");

    int[] listArray = yourChoices.getSelectedIndices();



    for (int index = 0; index < listArray.length; index++)

    {

    list.append(yourChoicesItems[listArray[index]] + "\n");

    }



    list.append("\n");

    }



    private void displayBill()

    {

    int[] listArray = yourChoices.getSelectedIndices();



    double subTotal = 0;

    double total;



    bill.setEditable(false);

    bill.setText("");



    for (int index = 0; index < listArray.length; index++)

    subTotal = subTotal

    + yourChoicesPrices[listArray[index]];

    total = subTotal;



    bill.append("TOTAL \t\tRM"

    + String.format("%.2f", total) + "\n\n");

    bill.append("Thank you - Have a Nice Day\n\n");


    //Reset list array.

    yourChoices.clearSelection();



    repaint();

    }





    private class checkOutButtonHandler implements ActionListener

    {

    public void actionPerformed(ActionEvent e)

    {

    if(e.getActionCommand().equals("Check out"))

    displayBill();

    }
    }



    private class clearButtonHandler implements ActionListener

    {

    public void actionPerformed(ActionEvent e)

    {



    }

    }



    private class selectionButtonHandler implements ActionListener

    {

    public void actionPerformed(ActionEvent e)

    {

    if(e.getActionCommand().equals("Selection"))
    displayList();

    }

    }



    private class removeButtonHandler implements ActionListener

    {

    public void actionPerformed(ActionEvent e)

    {



    }

    }



    public static void main(String[] args)

    {

    bookStore book = new bookStore();

    book.setVisible(true);

    }

    }

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: BOOKSHOP MANAGEMENT SYSTEM

    this is my code check for me please
    Check what? The more specific you are, the more likely you are to get help. And please wrap your code in the code tags.

Similar Threads

  1. Help regarding file management
    By arko_chatterjee in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 4th, 2013, 05:55 AM
  2. Inventory Management System
    By Luffy in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 26th, 2013, 03:11 AM
  3. Inventory Management System
    By Luffy in forum Java Theory & Questions
    Replies: 0
    Last Post: February 26th, 2013, 01:50 AM
  4. Smart Library Management System..What Wrong with my code
    By funkyonly4u in forum What's Wrong With My Code?
    Replies: 3
    Last Post: June 30th, 2012, 07:07 AM
  5. Log Management
    By Sai in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 6th, 2010, 11:11 AM