Question: Write a Java program to get user input as your name and print the length of the name. a) create a variable b) add
Write a Java program to get user input as your name and print the length of the name. a) create a variable b) add comments c) print your name and length of your name with some design using (*'s or -'s) 2. Write a Java program to get user input as Name, State and salary a) define state tax as constant with 7% if in Florida else 7.5% (Define constant variables STATE_FL_TAX = 0.07 and OTHER_STATE = .075) b) Calculate the net salary based on the user entered state c) Print the user name, Gross salary, Tax amount and the Net Salary d) Format the amounts in 2 decimal precision
Step by Step Solution
There are 3 Steps involved in it
a java import javautilScanner public class NameLength public static void mainString args create a variable String name get user input for name Scanner scanner new ScannerSystemin SystemoutprintEnter y... View full answer
Get step-by-step solutions from verified subject matter experts
