I need help writing this code. write a program using the concepts of Java that we’ve seen thus far in class. Save your file (the file with the .java extension) in Project 2 dropbox in the eCompanion.1. Create a class called MyFirstVariables.2. In the main method, create a Scanner object to read input from the keyboard3. Create 3 variables a. One of type int b. One of type double c. One of type String4. Give the variables appropriate names: the int will represent a person’s age, the double will represent the person’s salary, and the String will represent the person’s full name.5. prompt the user to enter his/her age6. get that value and store it in the int variable7. prompt the user to enter his/her salary8. get that value and store it in the double variable9. prompt the user to enter his/her full name10. get that value and store it in the String variable11. Write 3 print statements the print out each variable. An example of one the print statements should look like: Your age is 28. (use the \n escape character to add additional white space between the printed lines)12. Use the increment operator to add one to the person’s age.13. Increase the person’s salary by 10% using a compound assignment operator.14. Write 2 print statements that print out the new age and salary.15. Write a print statement that only prints the first character of the person’s name. The print statement should be something like: The first letter in your name is S
View All Comments
| View Tutorial