14.10 Exercises


14.10 Exercises

  1. Design and implement a program that carries out conversion from inches to centimeters and from centimeters to inches. The program must include a GUI for the user to select which conversion will be calculated, and then the user inputs data and gets the result on the frame.

  2. Modify the salary problem with GUI, presented in this chapter. The calculations of the salary increase and updating the salary should be done in class Csalarygui, instead of in class Sal_listener.

  3. Redesign the GUI for the salary problem presented. Use several panels and different layout managers and colors for the buttons than the ones included in the problem presented in this chapter.

  4. Design and implement a program with two or more classes that draws a toy house and a few trees. Use lines, rectangles, ovals, and arcs.

  5. Design and implement a program that converts temperature from degrees Fahrenheit to Celsius and vice versa. The program should present the appropriate GUI with the selection using two buttons, one for each type of conversion.

  6. Search the appropriate Web pages for additional graphical elements. Design and implement a program that uses a GUI that includes a combo box to solve the temperature conversion problem.

  7. Search the appropriate Web pages for additional graphical elements. Design and implement a program that uses a GUI that includes a combo box to solve the problem for conversion from inches to centimeters and vice versa.

  8. Design and implement a program that includes a GUI for inventory data. This consists of item code, description, cost, quantity in stock, and other data. Use labels, text fields, and buttons to calculate the total inventory value for each item.

  9. Redesign the previous program and implement it using text areas. Search the Web for information on these graphical elements.

  10. Search the appropriate Web pages for additional graphical elements. Design and implement a program that uses a GUI that includes a slider to solve the problem for conversion from inches to centimeters and vice versa.

  11. Search the appropriate Web pages for additional graphical elements. Design and implement a program that uses a GUI that includes a slider to solve the temperature conversion problem.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net