1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pickupchik [31]
3 years ago
15

Understanding Sequential Statements Summary

Computers and Technology
1 answer:
Kisachek [45]3 years ago
8 0

Answer:

// Payroll.java

public class Payroll

{

int numOfDependents;

double salary;

double salaryToHome;

double Federal_Tax,TAX_RATE,Depen_tax;

 

Payroll(double salry,int nod)

{

numOfDependents=nod;

salary=salry;

Federal_Tax=6.5;

TAX_RATE=28.0;

Depen_tax=2.5;

}

 

double getTAX_RATE()

{

return TAX_RATE*salary/100;

}

double Federal_Tax()

{

return Federal_Tax*salary/100;

}

double getDepenAmount()

{

return numOfDependents*(Depen_tax*salary/100);

}

double getTakeHomeSalary()

{

return salary+getDepenAmount()-(getTAX_RATE()+Federal_Tax());

}

void printOutput()

{

System.out.print("\nState Tax: $"+getTAX_RATE());

System.out.print("\nFederal Tax: $"+Federal_Tax());

System.out.print("\nDependents: $"+getDepenAmount());

System.out.print("\nSalary: $"+salary);

System.out.println("\nTake Home Pay: $"+getTakeHomeSalary());

 

}

public static void main(String args[])

{

Payroll obj=new Payroll(1250,2);

obj.printOutput();

}

}

// ModifiedPayroll.java

import java.util.Scanner;

public class ModifiedPayroll

{

 

int numOfDependents;

double salary;

double salaryToHome;

double Federal_Tax,TAX_RATE,Depen_tax;

 

ModifiedPayroll(double salry,int nod)

{

//initialise variables

numOfDependents=nod;

salary=salry;

Federal_Tax=6.5;

TAX_RATE=28.0;

Depen_tax=2.5;

}

 

double getTAX_RATE()

{

return TAX_RATE*salary/100;

}

double Federal_Tax()

{

return Federal_Tax*salary/100;

}

double getDepenAmount()

{

return numOfDependents*(Depen_tax*salary/100);

}

double getTakeHomeSalary()

{

return salary+getDepenAmount()-(getTAX_RATE()+Federal_Tax());

}

void printOutput()

{

System.out.print("\nState Tax: $"+getTAX_RATE());

System.out.print("\nFederal Tax: $"+Federal_Tax());

System.out.print("\nDependents: $"+getDepenAmount());

System.out.print("\nSalary: $"+salary);

System.out.println("\nTake Home Pay: $"+getTakeHomeSalary());

 

}

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

System.out.print("\nEnter Salary: $");

double salary=sc.nextDouble();

System.out.print("\nEnter number Of Dependents:$");

int nob=sc.nextInt();

ModifiedPayroll obj=new ModifiedPayroll(salary,nob);

obj.printOutput();

}

}

Explanation/Output:

// For Payroll.java

State Tax: $350.0

Federal Tax: $81.25

Dependents: $62.5

Salary: $1250.0

Take Home Pay: $881.25

// For ModifiedPayroll.java

Enter Salary:$1550.0

Enter number of Dependents:$3

State Tax: $434.0

Federal Tax: $100.75

Dependents: $116.25

Salary: $1550.0

Take Home Pay: $1131.5

You might be interested in
Question # 7 Dropdown Select the correct word to complete the sentence. The original ARPANET had four nodes and connected groups
attashe74 [19]

Answer:

Facility

Explanation:

This is the answer because you can spell it out with Horizon.

4 0
3 years ago
Read 2 more answers
Consider the operation of deleting the root of a binary search tree. if the root has one child, then ________.
PSYCHO15rus [73]

The reference to the root of the tree should be set to null

<h3>Can the root of a binary tree be null?</h3>
  • Only the subtrees are nulled out, the root always remains and will never be set to null.
<h3>What is null root?</h3>
  • null-, root. -null- comes from Latin, where it has the meaning "none; not one.
  • '' This meaning is found in such words as: annul, null, nullify.

To learn more about it, refer

to brainly.com/question/24448358

#SPJ4

4 0
2 years ago
Define power supply and types of power supply<br>​
emmainna [20.7K]

Answer:

hope you like it

Explanation:

Two types of power supplies exist, DC-DC and AC-DC. DC-DC power supplies allow you to plug in electrical devices into car outlets or similar sources that supply direct current, or DC, power. These power supplies are not the most commonly used, though.

Classification of Power Supply and Its Different Types

OUTPUT = DC OUTPUT = AC

INPUT = AC Wall wart Bench power supplies Battery charger Isolation transformer Variable AC supply Frequency changer

INPUT = DC DC-DC converter Inverter Generator UPS

4 0
3 years ago
Jim maintains attendance records for his employees for the year. Row B includes the dates of attendance, and column A includes t
ahrayia [7]
To lock multiple rows (starting with row 1), select the row below the last row you want frozen, choose the View tab, and then click Freeze Panes. To lock multiple columns, select the column to the right of the last column you want frozen, choose the View tab, and then click Freeze Panes<span>.


I hope my answer has come to your help. Thank you for posting your question here in Brainly. We hope to answer more of your questions and inquiries soon. Have a nice day ahead!
</span>
4 0
4 years ago
Read 2 more answers
In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
lianna [129]
Right click the text you want to format, On the home tab click the line and paragraph spacing command . A drop down menu will appear. Move the mouse over the various options . The line spacing will change in the document. 

Was that helpful?
5 0
4 years ago
Other questions:
  • Is Bluetooth considered a computing innovation?
    8·1 answer
  • What risks and safeguards are associated with wireless communication? what is “war driving” or “war flying”? are you comfortable
    14·1 answer
  • Why is musical notation important? What benefits do musicians and others receive from being able to write down and note aspects
    12·1 answer
  • PLEASE HELP I NEED RIGHT ANSWER!
    9·2 answers
  • Assume there is a variable, h that has already been assigned a positive integer value. Write the code necessary to compute the s
    9·1 answer
  • How can volunteering to help plan a fundraiser for your team or club be a way
    7·1 answer
  • What does the action tool allow you to do in Microsoft Powerpoint?
    15·1 answer
  • Strobe lights can become more yellow as they age true or false
    8·1 answer
  • How do you delete questions you asked?
    7·2 answers
  • Television, the internet, and smartphones are different communication _______blank hsn uses in its imc.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!