Create Athlete class with a non-static String array arrayone that will store athletename, athletemaritalstatus, and an double array arraytwo that will store athletenumber, and athletesalary. Athlte class contains the main() method.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Pls send me solution fast within 10 minutes I will rate instantly.... Solution must be in typed form..
• Create Athlete class with a non-static String array arrayone
that will store athletename, athletemaritalstatus, and an
double array arraytwo that will store athletenumber, and
athletesalary.
Athlte class contains the main() method.
• Create a charity class. The class contains a non-static
Charity Calculator() method. The Charity class also
contains double variables charitygiven and
salaryaftercharity including others variables.
• Create a Tax class. The class contains a non-static method
TotalTax(). The Tax class also contains a double variable
percentagetax including other variables.
Now do as follows:
1. Create an object of Athlete class in main() method and
with the reference of that object populate the string and
double arrays of the Athlete class with appropriate values.
2. In the main() method, create an object of Charity class.
From main() method call SalaryCalculator() method with
the reference of that object. Pass firstarray and secondarray
as parameters to the SalaryCalculator ().
3. Assume that the athlete has given $1000 in charity hence
charitygiven=1000. Subtract the charitygiven from the
athletesalary received from the Athlete class to get
salaryafterchairty.
Transcribed Image Text:• Create Athlete class with a non-static String array arrayone that will store athletename, athletemaritalstatus, and an double array arraytwo that will store athletenumber, and athletesalary. Athlte class contains the main() method. • Create a charity class. The class contains a non-static Charity Calculator() method. The Charity class also contains double variables charitygiven and salaryaftercharity including others variables. • Create a Tax class. The class contains a non-static method TotalTax(). The Tax class also contains a double variable percentagetax including other variables. Now do as follows: 1. Create an object of Athlete class in main() method and with the reference of that object populate the string and double arrays of the Athlete class with appropriate values. 2. In the main() method, create an object of Charity class. From main() method call SalaryCalculator() method with the reference of that object. Pass firstarray and secondarray as parameters to the SalaryCalculator (). 3. Assume that the athlete has given $1000 in charity hence charitygiven=1000. Subtract the charitygiven from the athletesalary received from the Athlete class to get salaryafterchairty.
4. From SalaryCalculator() method, call TotalTax() method
of the Tax class. In the parameters of the call, pass
salaryaftercharity
and athletemaritialsatus to the TotalTax()
method.
5. The TotalTax() method will return the approriate
taxpercentage back to the SalaryCalculator() method. The
taxpercentage will be calculated based on the following
table, however you do not need to implement the table
bleow using if-else or switch constructs. Only assume a
value of salaryafterchairty, and athletemartalstatus, and
return an appropriate percentagetax value back to the
SalaryCalculator ().
Marginal
Tax Rate
10%
25%
35%
Single
$0-$8,350
$8,351 - $82,250
$82,251 +
Married
$0-$16.700
$16,701 - $137,050
$137,051 +
6. After receiving the taxpercentage from TotalTax() method,
the SalaryCalculator() method calculates the
athletegrosssalary. The athletegrosssalary is calculated
using any appropriate formula such as the salaryaftercharity
minus the percentagetax.
7. Once the athletegrosssalary has been calculated, create a
new int array in the SalaryCalculator() method and store
the athletenumber and athletegrosssalary in it and return the
arry to the main().
8. Display the athletenumber, and athletegrosssalary in the
main().
Transcribed Image Text:4. From SalaryCalculator() method, call TotalTax() method of the Tax class. In the parameters of the call, pass salaryaftercharity and athletemaritialsatus to the TotalTax() method. 5. The TotalTax() method will return the approriate taxpercentage back to the SalaryCalculator() method. The taxpercentage will be calculated based on the following table, however you do not need to implement the table bleow using if-else or switch constructs. Only assume a value of salaryafterchairty, and athletemartalstatus, and return an appropriate percentagetax value back to the SalaryCalculator (). Marginal Tax Rate 10% 25% 35% Single $0-$8,350 $8,351 - $82,250 $82,251 + Married $0-$16.700 $16,701 - $137,050 $137,051 + 6. After receiving the taxpercentage from TotalTax() method, the SalaryCalculator() method calculates the athletegrosssalary. The athletegrosssalary is calculated using any appropriate formula such as the salaryaftercharity minus the percentagetax. 7. Once the athletegrosssalary has been calculated, create a new int array in the SalaryCalculator() method and store the athletenumber and athletegrosssalary in it and return the arry to the main(). 8. Display the athletenumber, and athletegrosssalary in the main().
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY