Write a Java program to get user input as your name and print the length of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Comprehensive comparison between Linux Kernel and windows Kernel? Comprehensive comparison between Linux System and windows System? Comprehensive comparison between Linux Distributions and windows...
-
Sparkle is one firm of many in the market for toothpaste, which is in long-run equilibrium. a. Draw a diagram showing Sparkles demand curve, marginal-revenue curve, average total- cost curve, and...
-
Determine whether the statement is true or false. Justify your answer. 1. The Binomial Theorem could be used to produce each row of Pascal's Triangle. 2. A binomial that represents a difference...
-
Legion Bank (LB) is examining the profitability of its Star Account, a combined savings and checking account. Depositors receive a 6% annual interest rate on their average deposit. LB earns an...
-
Jalila owns and manages a small business (E Connections) that sells electronic connectors and network components. The following industries purchase products from E Connections: mechanical and plant...
-
Consumer Reports uses a survey of readers to obtain customer satisfaction ratings for the nations largest retailers (Consumer Reports, March 2012). Each survey respondent is asked to rate a specified...
-
a) Having graduated with a bachelor of commerce finance option, you have been requested to discuss with other employees in finance department on three ways that are used to describe real estate....
-
The legs of a picnic table form an isosceles triangle as indicated in the figure. If mABC = 80, determine mx and my so that the top of the table will be parallel to the ground. , 80
-
4) (16 pts) Use the Euclidean Algorithm, showing every step, to calculate each of the following greatest common divisors (gcd). 1) ged(384, 126) 2) ged(144, 89) 3) ged(221, 78) 4) ged(1105, 767)
-
Based on routine activity theory or lifestyle exposure theory come up with some explanation for the difference in rates of violent victimization by sex. Why do some groups have higher rates than...
-
MARR is 12% . Initial investment is 30000. Annual savings is 13000. Years is 7. what is the annual worth
-
a firms marginal tax rate is increased,this would affect the cost of preferred stock and cost of common equity that are used to calculate the firms weighted average cost of capital? T or F
-
Add a check clause constraint to the following statement to ensure that the values of rank are less than 10: create table Student (emp_name emp_id rank char(15), char(30), integer, primary key...
-
What is the PEG for Grab holdings (GRAB) and (DIDI) DIDY? Also what is the P/E for them both.
-
Susan is the owner of a 2-year-old home, and is looking to buy a homeowner's insurance policy. She is primarily concerned with protection from standard property dameging perils that she has no way of...
-
Find the image of x = k = const under w = 1/z. Use formulas similar to those in Example 1. y| y = 0 -21 -2 -1 -1, /1 12 T -1 -1 y= -2 x =0
-
For each of the following sets of integers, write a single statement that will display a number at random from the set. Assume Random random Numbers = new Random() has been defined and use the...
-
Fill in the blanks in each of the following statements: a) A method is said to __________an exception when it detects that a problem has occurred. b) When present, the __________block associated with...
-
Translator programs, such as assemblers and compilers, convert programs from one language (referred to as the source language) to another language (referred to as the target language). Determine...
-
Consider the feedback system shown in Figure 10.26. a. Using Routh's stability criterion, determine the range of the control gain \(K\) for which the closed-loop system is stable. b. Use MATLAB...
-
Figure 10.40 shows a negative feedback control system. a. Design a P controller such that the damping ratio of the closed-loop system is 0.5 . b. Estimate the rise time, overshoot, and \(2 \%\)...
-
The transfer function of a dynamic system is given by \[G(s)=\frac{s+1}{4 s^{4}+5 s^{3}+2 s^{2}+s+6} \] a. Using Routh's stability criterion, determine the stability of the system. b. Using MATLAB,...
Study smarter with the SolutionInn App