Display a welcome message in a message dialog box

Assignment Help JAVA Programming
Reference no: EM131266203

1. Create a Java Application Project named PRJ1[Last Name][First Initial]. As an example, if your name was Xavier Smith, then the project would be named PRJ1SmithX.

2. Review the requirements for the program (3 a. - 3 h.) then generate a test plan in a document named PRJ1SmithXTestPlan using the Test Plan Example document listed in Week 1 Activities as a guide. An example is presented in this document for your consideration.

3. Once you are in the IDE with the tabbed PRJ1SmithX.java in the Source window, begin developing the following program:

a. Declare all appropriate identifiers for the program.

b. Have a set of prompts that request a user's (1) first name, (2) middle initial, (3) last name, (4) age in years, and (5) three lucky numbers in a set of Input Dialog Boxes (JOptionPane.showInputDialog()).

c. Display a welcome message in a Message Dialog Box (JOptionPane.showMessageDialog()) that includes the full name, e.g., "Welcome John Q Smith.".

d. Display the message from the Output column from the table below in a Message Dialog Box based on the age entered:

If the age input is Output

Less than 12 years* You are just a kid!

12 years You are almost there.

13 years but less than 20 years Welcome teenager.

20 years but less than 21 years Welcome almost adult.

21 years but less than 65 years Welcome adult.

65 years or older Welcome Senior Citizen.

*It is assumed that "less" means entering at least a 1 in the first test instance. There will not be any tests for a value of 0 or any negative numbers for this assignment, though it would be expected to check for these values in a real world program.

e. For determining the appropriate output for the Message Dialog Box in d., use a single test per condition contained in a cascading conditional structure avoiding all unnecessary, redundant coding.

f. Display appropriate text in a Message Dialog Box for the average of the three lucky numbers, e.g., "The average of your three lucky numbers is: 20."

g. When the user ends the program include a final line of text after a blank line: "Thanks for sharing your information, [first name from entry]."

h. Add the appropriate documentation to the program as suggested in the Documentation for Programs document listed in Week 1 Activities as a guide.

[As an alternative for the three Message Dialog Boxes, you can attempt to place all three output messages (name, age message, and lucky number average - think \n) in the same Message Dialog Box. This is not a requirement.]

4. When the assignment works correctly for all parts, capture images of the results - screen shots - for each of the test plan sets of data - the program will have to run for each of the sets - and paste each of them after the test plan prepared in Item 2. above into PRJ1SmithXTestPlan. The document contains the following: your test plan matrix followed by each of the screen shot sets of output. Each of the screen shot sets is tagged as Test Output 1, etc. or whatever term you prefer to use.

5. Once you complete the Project 1 program attach the PRJ1SmithX.java and PRJ1SmithXTestPlan files to the appropriate location in LEO.

Reference no: EM131266203

Questions Cloud

Find a new product or system that uses a pm : Find a new product or system that was announced or released within the last three months. Conduct a security review of that product or system as described in Section 1.12. Pick one of the assets that you identified and construct an attack tree for..
Write a java program that plays a two player dice game : Write a Java program that plays a two player dice game called Guts. If a player rolls a 1, then the turns ends and the player receives no points for that turn.
Write a function that deletes kth element of the linked list : Write a function that returns the info of the kth element of the linked list. If no such element exists, terminate the program. Write a function that deletes the kth element of the linked list.
Find a new product or system that maintains long-term secret : Find a new product or system that was announced or released within the last three months. Conduct a security review of that product or system as described in Section 1.12. Pick one of the assets that you identified and construct an attack tree for..
Display a welcome message in a message dialog box : Display a welcome message in a Message Dialog Box (JOptionPane.showMessageDialog()) that includes the full name, e.g., "Welcome John Q Smith.".
Discuss an advertising campaign that you feel is successful : Discuss an advertising campaign that you feel was/is successful. - Why do you think it was so successful?- What was the target audience.
Provide information regarding the most common drugs : Express your personal perspective on the nature and complexity of our society's current problems with drug use. Provide information regarding the most common drugs of abuse both in the United States, and more specifically in Florida. Back up your ..
Create a method called displayemployeeinformation : Create a method called displayEmployeeInformation that accepts an Employee object, provides an output header string, and then displays Employee information.
Billions of dollars of fixed investment : Microprocessors for computers are produced in "fabs," large high-tech factories which can require billions of dollars of fixed investment. Do you expect there will be a range of declining average cost in the microchip industry? How does your answe..

Reviews

Write a Review

JAVA Programming Questions & Answers

  What does this sequence of statements print

What is wrong with the following variable declarations - What does this sequence of statements print

  Create a form that contains a guessing game

Create a Form that contains a guessing game with five RadioButtons numbered 1 through 5.  Randomly choose one of the RadioButtons as the winning button.  When the user clicks a RadioButton, display a message indicating whether the user is correct.

  Describe the equivalence classes

Prove that these relations on the set of all functions from Z to Z are equivalence relations. Describe the equivalence classes.

  Describe the swing applet life cycle

Describe the swing applet life cycle. Create a swing applet that displays the date and time in a JTextField with the JLabel "Today is" when the user clicks a JButton

  The fancy new french restaurant la food is very popular for

the fancy new french restaurant la food is very popular for its authentic cuisine and high prices. this restaurant does

  Describe the differences between relative and linear layouts

Describe the differences between relative and linear layouts. Why are .png files the preferred type of image resource for the Android device? Write a paragraph that gives at least three reasons.

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  This assignment will focus on creating java servlets that

this assignment will focus on creating java servlets that can not only serve html to web users but also provide a web

  Generate and display the polynomial

Design and write the methods calculate Brute Force and calculate Horner for calculating the polynomial value for an integer value of x by using the brute force approach and respectively Horner's technique. Each method should take two parameters: t..

  Your letterinventory class must use an array

Your LetterInventory class must use an array of Counter objects. Note that there is no nextChar method in the Scanner class. You must use the next() method and then use a loop through the characters of the token that is returned. Ignore any character..

  Calculates the price of carpeting for rectangular rooms.

Once you have written these classes, use them in an application that asks the user to enter the dimensions of a room and the price per square foot of the desired carpeting. The application should display the total cost of the carpet.

  Create wheel 360 degree

You have to create wheel, 360 degree. That is numbered 0-36. it is supposed to be spun, and randomly lands on one of the numbers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd