Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started