Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

This project focuses on demonstrating the understanding of data types, input/output, sequential and selection programming statements, and mathematical operations.

The project requirements include:

1. Create a Java Application naming the Project PRJ1CRUZC

2. Design and implement a Java program that will gather a user's first name, middle initial, last name, age in years, and 3 lucky numbers in a set of Input Dialog Boxes.

3. The program should output the information identified in the user's inputs designated in #2:

a. Display a welcome message in a Message Dialog box that includes the full name, e.g., "Welcome Cassandra Cruz."

b. Display a message 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. 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.

c. For determining the appropriate output for the Message Dialog box in b., use a single test per condition contained in a cascading conditional structure.

d. Display a message in a Message Dialog box for the average of the three lucky numbers input in #2, e.g., "The average of your three lucky numbers is: 20."

4. 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.

5. Once the assignment works correctly, create three sets of screen shots of the results - the Message Dialog Box(s) - using different data on the screen and name the files PRJ1CRUZCShot[1, 2, 3]. Be sure to have different age groups represented.

6. 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:

Example application test data:

Prompt

Input

Expected Output

Actual Output

Test Pass?

First Name:

Middle Initial:

Last Name:

* Age:

Lucky Number 1:

Lucky Number 2:
Lucky Number 3:

John

Q

Smith

34

10

20

30

 

 

Welcome John Q Smith

Welcome Adult!

 

 

The average of your lucky numbers is: 20

 

 

Welcome John Q Smith

Welcome Adult!

 

 

The average of your lucky numbers is: 20

 

 

Y

Y

 

 

 

Y

Additional Ages:

11

12

13

19

20

21

45

65

You are just a kid!

You are almost there.

Welcome teenager.

Welcome teenager.

Welcome almost adult.

Welcome adult.

Welcome adult.

Welcome Senior Citizen.

You are just a kid!

You are almost there.

Welcome teenager.

Welcome teenager.

Welcome almost adult.

Welcome adult.

Welcome adult.

Welcome Senior Citizen.

Y

Y

Y

Y

Y

Y

Y

Y

 

Additional test cases here. Be sure to test all logic.

 

Additional test cases here. Be sure to test all logic.

a. Declared all of appropriate identifiers/variables to hold the resulting values

b. Used the JOptionPane.showInputDialog() for the at least three elements of a name

c. Used the JOptionPane.showInputDialog() for the age

d. Used the JOptionPane.showInputDialog() for the three lucky numbers

e. Used the JOptionPane.showInputDialog() for the at least three elements of a name

f. Displayed the message with the correct age message using JOptionPane.showMessageDialog()

g. Displayed the correct average with the appropriate text using JOptionPane.showMessageDialog()

h. The conditional programming structure code is appropriate with maximum points only given to single test per conditional.

i. The calculation for determining the average is correctly coded

j. Screenshots appropriate display

k. There is a test data document

Proper programming practice must be included in the code. The following are points removed after the normal grade for the assignment is calculated:

a. All variable identifiers are user-friendly, documentable, that is, there are no identifiers like x, y, z within the code (-1.0 point).

b. There is no redundant code. The use of the same text in multiple lines of the code is not code practice and should not be present.

c. Whenever there is a set of options available to the user, there must be a message displayed indicating a wrong answer and the ability for the user to enter a correct option. 

Java, Programming

  • Category:- Java
  • Reference No.:- M9522646

Have any Question?


Related Questions in Java

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As