Write a program that prompts the user to enter the name, the number of children, and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that prompts the user to enter the name, the number of children, and the basic salary of an employee. The program will then: • Calculate the bonus: bonus = number of children * $25 Calculate the new salary: new salary = salary + bonus Apply a tax of 10% and find the paid salary: paid salary = new salary * (1 – tax) The program will then display all the information needed as shown in the sample run below Sample Run: Enter the name of che employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0 Write a program that prompts the user to enter the name, the number of children, and the basic salary of an employee. The program will then: • Calculate the bonus: bonus = number of children * $25 Calculate the new salary: new salary = salary + bonus Apply a tax of 10% and find the paid salary: paid salary = new salary * (1 – tax) The program will then display all the information needed as shown in the sample run below Sample Run: Enter the name of che employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0
Expert Answer:
Answer rating: 100% (QA)
Solution code import javautilScannerpackge to take the user input public class HelloWorld public sta... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Write a program that prompts the user to enter the name of an ASCII text file and displays the frequency of the characters in the file.
-
Write a program that prompts the user to enter a Social Security number in the format DDD-DD-DDDD, where D is a digit. Your program should check whether the input is valid. Here are sample runs:...
-
In Problems 2628, find the value of each determinant. 21 5 0 26 -3 1 0
-
a. In this chapter, we never actually defined exploitation. What is one dictionary definition of the word? b. In your opinion, does the dictionary definition go too far or not far enough when it...
-
Based on the information from the Air Canada 2011 Annual Report shown below, identify differences between the accounting for PPE using IFRS (used by Air Canada) and ASPE (as shown in the chapter)....
-
An \(R L C\) circuit with a \(10 \mu \mathrm{F}\) capacitor is connected to a variable-frequency power supply with an rms output voltage of \(6.0 \mathrm{~V}\). The rms current in the circuit as a...
-
EVA Company was incorporated on January 2, Year 5, and commenced active operations immediately. Ordinary shares were issued on the date of incorporation and no new ordinary shares have been issued...
-
How does brevity serve as a hallmark of effective communication, particularly in academic discourse?
-
Iranzo Ammunition is an all-equity firm that currently has 6,000,000 shares outstanding worth $50 per share. The company's considering converting to a capital structure that is 50.0% debt. The firm...
-
The process of bringing, maintaining, and defending a lawsuit is called litigation. It is, also, known as:- Court dispute resolution Alternative dispute resolution Judicial dispute resolution...
-
- Association questions (10 marks) Match up the following credit management elements to the underlying reasons for these elements and answer the questions below. #1 #2 #3Element Underlying...
-
correction of an error in previously issued financial statements requires restatement of all prior financial statements presented to correct the error(s) in those financials. requires revision in all...
-
Prepare the journal entries for the following transactions: Clearly indicate what is a DR and what is a CR. When identifying the account, put in brackets an (A) for an asset, (L) for liability, and...
-
Put the following lines/sentences in an order to write an effective persuasive letter - select which order they would go on a letter. 10 points 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th We appreciate...
-
This speech is a Fact/Value speech outline Need to include introduction, body, conclusions and sources at 5. Please make sure it's a proper outline and read & follow all the instructions below....
-
Unions have played an important role in the US workplace since their founding in the 19th Century and were instrumental in changing working conditions for many. Research and discuss three pros and...
-
Use multiplication or division of power series to find the first three nonzero terms in the Maclaurin series for each function. y = e x2 cos x
-
Write a program that prompts the user to enter a file name, then displays the frequency table of the characters in the file and displays the Huffman code for each character.
-
Write a program that animates quadratic probing, as shown in Figure 27.5. You can change the initial size of the hash-table in program. Assume the load-factor threshold is 0.75. Firefox...
-
Assume a runner runs 24 miles in 1 hour, 40 minutes, and 35 seconds. Write a program that displays the average speed in kilometers per hour.
-
Consider a system of rigid bodies connected by springs as shown in figure 2.20. The bodies are assumed to move only in the horizontal direction. Further, we consider only the static problem, and...
-
The truss shown in figure 1.30 has two elements. The members are made of the aluminum hollow square cross section. The outer dimension of the square is \(12 \mathrm{~mm}\), and the inner dimension is...
-
Using the 2node isoparametric element in the heat conduction equations in eq. (4.20) in chapter 4 , derive the conductivity matrix. Equation 4.20: d7 kA ST(x) dx kA dTdST dx dr -dr= -JAQ,ST(x)dr.
Study smarter with the SolutionInn App