{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSC113_Lab8 - King Saud University College of Computer and...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011 Lab#8 : GUI Write a java program that can show the following working interface. This program represents a Burger Shop that can calculate the price of the burger depending upon its ingredients and size. The price of each option is given in parenthesis. Please note that there is no button to hit to calculate the price. Every time User clicks on radio button or check box, the price is updated in the text field. For more detail, please see the procedure after the GUI images. User has chosen Honey and Beef and the size of burger is small. The total amount according to this selection is 15+40+20=75 User has chosen Cheese , Honey , Beef and ketchup and the size of burger is medium. The total amount according to this selection is 10+15+40+5+30=100
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011 Lab#8 : GUI • User has chosen Cheese , Beef and ketchup and the size of burger is large. The total amount according to this selection is 10+40+5+40=95 Procedure: Create a class “ BurgerShop ” . JFrame will be the super class of this class and this class will also implement the ItemListener interface to implement the event handler. Add attributes of type JCheckBox, JRadioButton , JTextField and JLabel to Design the above interface. Layout Manager for the above GUI is GridLayout with 5 rows and 4 columns. You can choose some other Layout also. You can also add attributes and methods to implement the functionality. Create a Test(Main) Class to run the show....
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern