Sunday, July 17, 2016

Lab exercise Plus 2

1. Design a GUI application in which the user enters a number in the text field and on clicking the button the sum of the digits of the number should be displayed in a label.
Hint : Suppose user enters 123 the output should be 6(1+2+3).

2. Design a GUI application to accept a String from the user in a text field and print using option pane whether it is a palindrome or not. Hint ABBA is a palindrome.

3. Design a GUI application to accept the cost price and selling price form the user in two text fields then calculate the profit or loss incurred.

4. Design a GUI application to accept a character in a text field and print in a label if that character is a vowel: a, e, i, o, or u. The application should be case sensitive.

5. Design a GUI application that repeatedly accepts numbers in a option pane and once the typed number is 0 the maximum and minimum of all numbers typed are displayed.

6. Design a GUI application in java to convert temperature from Celsius to Fahrenheit or vice versa using radio buttons and two text fields

7. Design a GUI application in java to convert kilograms into grams, litres into milliliters, rupees into paisa using combobox and text fields.

8. A book publishing house decided to go in for computerization. The database will be maintained at the back end but you have to design the front end for the company. You have to accept book code, Title, Author and Quantity sold from the user. The Price will be generated depending upon the book code. Net price should be calculated on the basis of the discount given.
Bookseller - 25%
School - 20%
Customer - 5%

9. A networking company decided to computerize its employee salary . Develop an application to store employee's personal data which will be saved in the back end. The front end should accept Name, Father's Name, Mother's Name, Address, Gender, Basic Salary, Medical and Conveyance. Calculate gross and net salary.
Basic Salary              DA                  HRA
>=40000                    35%                37%
>=20000                    25%                32%
>=10000                    25%                30%

10. Create a GUI application to accept a string and display it in reverse order using the substring() method.

11. Create a GUI application to create random whole numbers between 2 float numbers input by the user.

12. Create a GUI application to accept 3 numbers in separate text fields and display  their sum, average, maximum or minimum after rounding the results on the click of appropriate buttons (There are four separate buttons - one for sum, one for average, one for maximum and one for minimum). The result should be displayed in the fourth text field.

13. Create a GUI application to accept the date (as 1), month (as a number like 3 for March) and year (as 2010) in separate text fields and display the date in the format: dd/mm/yy. Take care of the following points while creating the application: Verify the date input before displaying it in the suggested format and display error messages   herever applicable The date is accepted as 1 (for the first of any month) but should be displayed as 01 in the final format. The year is accepted as 2010 but displayed as 10 in the final format.

14. Create an application to accept two strings - First Name and Last name from the  user and display the message Welcome with the complete name of the user.

15. Create an application to accept the radius of a circle, calculate the area and circumference and display the results in a message box after rounding off the area and circumference to an integer number.

16. Modify application to make sure that the user has not input the complete name in the first name text field.

17. Modify the Case Changer application developed in the lesson to display the input text in Title case using the substring(), toLowerCase() and toUpperCase() methods.