Answered step by step
Verified Expert Solution
Link Copied!

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)

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# How to Program

Authors: Paul J. Deitel, Harvey Deitel

6th edition

134601548, 134601793, 978-0134601540

More Books

Students also viewed these Programming questions

Question

Explore common areas of clinical focus in health psychology.

Answered: 1 week ago

Question

9. Refine your written report through several revisions.

Answered: 1 week ago