Question
Declare andinitialize the following variables: numberOfDependants, initialized to the value 5 Salary, initialized to the value 56667.77 deductionPerDependant, initialized to the value .10. customerName, initialized
Declare andinitialize the following variables:
- numberOfDependants, initializedto the value 5
- Salary,initializedto thevalue56667.77
- deductionPerDependant,initializedto the value .10.
- customerName,initializedto thevalueFrank Tex
- companyName,initializedto thevalue LLCC Tax Service
Writea program to calculate the deduction for each dependent, the total for all deductions, and output a report like the one in sample output. Test your program with different values in the variables. Your program should print out the correct values no matter what value the variables are initialized to.
Sample Output: Hello _________, welcome to __________. Based on your salary of $__________ the deduction for each of your ____ dependents is $ ____________, for a total of $__________.
Use this to start your project public static void main(String[] args) {
//Declare your variables here
//Put your calculation code here
//Put your output here }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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