You are on page 1of 1

University of Wollongong in Dubai

CSCI213: Java Programming and the Internet Lab 7 Topic: GUI Download CafFrame.java from online resources. This code shows User Interface with no events attached to any of the components. Your task is to attach functionalities to appropriate components to make it a complete code. Note: Read the program very carefully before you start modifying it. Identify the number of panels being used and the appropriate layout on each. Assume the following information in order to calculate bill total for each order.

Calculate the total bill based on the following information: Sandwich AED 2 per unit Tea AED 1 per unit Coke AED 1 per unit Total bill amount should be calculated when user clicks on the OK button. Amount should be displayed on the window. Order should not be processed if user clicks on the Cancel button. For every transaction, generate a random transaction id (id should fall in the range 1 to 50) (look for Math.random in the API). Display the id in a text-field that cannot be edited.

-1-

You might also like