Question: // Chapter 3 Programming Activity //1. add your import statements here public class PracticeMethodsi public static void main String [ //2. a. Create a Scanner

 // Chapter 3 Programming Activity //1. add your import statements here

// Chapter 3 Programming Activity //1. add your import statements here public class PracticeMethodsi public static void main String [ //2. a. Create a Scanner object to read from the keyboard b. Prompt the user for his/her first name c. Print a message that says hello to the user d. Print a message that says how many letters are in the user's name / Your code goes here 13. Print an empty line // Your code goes here //4. a. Using previously created Scanner object prompt the user for the year (s)he was born b. Calculate and print the age the user will be this year (prompt the user for the current year) c. Declare a constant for average life expectancy, set its value to 78.74 d. Print a message that tells the user the percentage of their expected life they've lived. Use the Desimalkeruak class to format the percentage / Your code goes here 15. a. Create a Random object and generate a random integer between 1 and 20 inclusive b. Using previously created Scanner object prompt the user for a guess c. Print a message that tells the user the number and how far from the number the guess was (hint: use Matb abs) / Your code goes here

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!