The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
1. Design and implement a Java program that will gather a user s first name, middle initial, lastname, age in years, and 3 lucky numbers. The program should output the following based on the user s input:
a. A welcome message repeating their full name (e.g. Welcome John Q Smith)
--> Check data type for a string and character.
b. A message based on their age with these types of messages.
Display You are just a kid! , if the user is less than or equal to 12 years old
Display Welcome teenager! , if the user is greater than 12 and less than 20 years old
Display Welcome almost adult! , if the user is 20 years old.
Display Welcome adult! , if the user is 21 years old or greater.
c. A message displaying the average of their 3 lucky numbers. For example The average of your 3 lucky numbers is : 20
2. Additional requirements include:
a. Use JOptionPane.showInputDialog() methods for your user to input their data
b. Use JOptionPane.showMessageDialog() methods to display your messages.
c. Include a comprehensive set of application test data that you used to test your program. Your test data can be shown in a table that includes input data, expected output, actual output and pass/fail results from the test. Your test data can be presented in the form of a table as follows:
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll