Question: TASK 2 Write Java program to do the following: 1. Create 2 integer constants PRICELESSTHAN25 and PRICE25ANDUP. Assign the value 4000 to the first constant

 TASK 2 Write Java program to do the following: 1. Create

TASK 2 Write Java program to do the following: 1. Create 2 integer constants PRICELESSTHAN25 and PRICE25ANDUP. Assign the value 4000 to the first constant and 2200 to the second constant 2. Create 2 variable userAge and insurancePrice 3. Ask the user to enter their age. 4. If their age is less than 25, the insurancePrice is assigned the first constant otherwise it is assigned the second constant Output the insurance price they must pay together with some text describing the output 5. EXAMPLE Enter your age: 22 Your insurance premium is: $4000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!