our puts the better chance you have of pleasing you

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
Please help me with this program using java. ( there are two parts)
Part A - Loading the Arrays
Complete the following program. The better formatted and
interesting your
output and inputs the better chance you have of pleasing your
customer.
Revenue Canada wants you to develop a program that
calculates the tax owed for the top twenty CEOs in
Canada. You will need to create a file containing the CEO's
names, their company name and their annual salary in
separate lines. You can choose a different group of people
if you like.
Kevin Loughrey
Thompson Creek Metals Co.
Inc.
3356000.00
James Balsillie
Research In Motion Ltd.
141594333.00
Prem Watsa
Fairfax Financial Holdings
Ltd.
619000.00
Richard Clark
Red Back Mining Inc.
3310667.00
John Shackleton
Open Text Corp.
4861667.00
John Wright
Petrobank Energy and
Resources Ltd.
4353333.00
Here is an example of how the file should look like.
Note that this example only contains data for 6 people.
You will need to research the information and add to
your own text file. You can get this information from this
file at:
Your task is to develop a program that calculates the tax
owed for these CEOs, displays this information and
saves it into a second file named taxInfo.txt.
To get you started, software experts at Revenue Canada
have provided you with the following IPO chart and
pseudo code.
Transcribed Image Text:Part A - Loading the Arrays Complete the following program. The better formatted and interesting your output and inputs the better chance you have of pleasing your customer. Revenue Canada wants you to develop a program that calculates the tax owed for the top twenty CEOs in Canada. You will need to create a file containing the CEO's names, their company name and their annual salary in separate lines. You can choose a different group of people if you like. Kevin Loughrey Thompson Creek Metals Co. Inc. 3356000.00 James Balsillie Research In Motion Ltd. 141594333.00 Prem Watsa Fairfax Financial Holdings Ltd. 619000.00 Richard Clark Red Back Mining Inc. 3310667.00 John Shackleton Open Text Corp. 4861667.00 John Wright Petrobank Energy and Resources Ltd. 4353333.00 Here is an example of how the file should look like. Note that this example only contains data for 6 people. You will need to research the information and add to your own text file. You can get this information from this file at: Your task is to develop a program that calculates the tax owed for these CEOs, displays this information and saves it into a second file named taxInfo.txt. To get you started, software experts at Revenue Canada have provided you with the following IPO chart and pseudo code.
1. Setup the taxpayer file for input
2. Setup the taxinfo file for output
3. For the first twenty records
a. Read one record from the taxpayer file (Name, Company, Salary)
b. Save into three arrays (String, String, double)
c. If salary < 10000000.00
i, taxRate 40,00
d. otherwise
i. taxRate = 53.00
e. Calculate the tax owed ( call method calcTax(salary, taxRate))
f. Write the record to the taxInfo file
4. Close the taxpayer file
5. Close the taxinfo file
6. Display a status message on the screen (e.g. records stored in file...)
7. Display the records on the screen
Other methods:
caleTax method (double salary, double taxrate) returns tax owed
8. tax owed salary taxrate / 100
9. Return tax owed
The output file of your program should look like
for the first 3 records:
Kevin Loughrey
Thompson Creek Metals Co. Inc.
3356000.00
1342400.00
James Balsillie
Research In Motion Ltd.
141594333.00
75044996.49
Prem Watsa
Fairfax Financial Holdings Ltd.
619,000.00
247,600.00
As a bonus, Revenue Canada is willing to pay more for
your program if you were to display the results on the
screen as well. The display should look similar to:
Kevin Loughrey, Thompson Creek Metals Co. Inc., $3,356,000.00, $1,342,400.00
James Balsillie, Research In Motion Ltd., $141,594,333.00, $75,044,996.49
Prem Watsa, Fairfax Financial Holdings Ltd., $619,000.00, $247,600.00
Richard Clark, Red Back Mining Inc., $3,310,667.00, $1,324,266.80
John Shackleton, Open Text Corp., $4,861,667.00, $1,944,666.80
John Wright, Petrobank Energy and Resources Ltd., $4,353,333.00, $1,741,333.20
Part B - Searching and Sorting
1. Create a search method in your program that allows
the user to find a tax payer and display their
information to the user. Change your program to
prompt the user for a name to find. Have the main
method call this method.
2. Add code to your program to sort the information
according to salary in ascending order. Save the sorted
information into a new file.
Transcribed Image Text:1. Setup the taxpayer file for input 2. Setup the taxinfo file for output 3. For the first twenty records a. Read one record from the taxpayer file (Name, Company, Salary) b. Save into three arrays (String, String, double) c. If salary < 10000000.00 i, taxRate 40,00 d. otherwise i. taxRate = 53.00 e. Calculate the tax owed ( call method calcTax(salary, taxRate)) f. Write the record to the taxInfo file 4. Close the taxpayer file 5. Close the taxinfo file 6. Display a status message on the screen (e.g. records stored in file...) 7. Display the records on the screen Other methods: caleTax method (double salary, double taxrate) returns tax owed 8. tax owed salary taxrate / 100 9. Return tax owed The output file of your program should look like for the first 3 records: Kevin Loughrey Thompson Creek Metals Co. Inc. 3356000.00 1342400.00 James Balsillie Research In Motion Ltd. 141594333.00 75044996.49 Prem Watsa Fairfax Financial Holdings Ltd. 619,000.00 247,600.00 As a bonus, Revenue Canada is willing to pay more for your program if you were to display the results on the screen as well. The display should look similar to: Kevin Loughrey, Thompson Creek Metals Co. Inc., $3,356,000.00, $1,342,400.00 James Balsillie, Research In Motion Ltd., $141,594,333.00, $75,044,996.49 Prem Watsa, Fairfax Financial Holdings Ltd., $619,000.00, $247,600.00 Richard Clark, Red Back Mining Inc., $3,310,667.00, $1,324,266.80 John Shackleton, Open Text Corp., $4,861,667.00, $1,944,666.80 John Wright, Petrobank Energy and Resources Ltd., $4,353,333.00, $1,741,333.20 Part B - Searching and Sorting 1. Create a search method in your program that allows the user to find a tax payer and display their information to the user. Change your program to prompt the user for a name to find. Have the main method call this method. 2. Add code to your program to sort the information according to salary in ascending order. Save the sorted information into a new file.
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

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