Main method: 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 z 10000000.00 i. taxRate = 40.00 d. otherwise i. taxRate = 53.00 e. Calculate the tax owed ( call method calc Tax(salary, taxRate) f. Write the record to the taxInfo file 4. Close the taxpayer file 5. Close the taxrate file 6. Display a status message on the screen (e.g. records stored in file.) 7. Display the records on the screen Other methods: calc Tax method (double salary, double taxrate) returns tax owed 1. tax owed = salary * taxrate / 100 Return tax owad

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 using java
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 arnd iheir annual salary in separate lines, You can choose a different group of
people if you like.
Kevin Loughrey
Thompson Creek Metals Co. Ine.
Here is an example of how the file should
look like, Note that this example only
contains data for 6 people. You will need
3356000.00
James Balsillie
Research In Motion Ltd.
to research the information and ndd to
141594333.00
your own text file.
Prem Watsa
Fairfax Financial Holdings Ltd.
ark
Red Back Mining Inc.
3310667.00
John Shackleton
Open Text Corp.
4861667.00
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.
John Wright
Petrobank Energy and Resources Ltd.
4353333.00
To get you started, software experts at
Revenue Canada have provided you with the following IPO chart and pseudo code.
IPO Chart
Taxpayer file - taxpayer.txt containing Name (string), Company information
(string), Salary (double)
If salary is less than or equal to $10000000.00
Input
Processing
Tax rate is 40%
Tax owed is equal to salary times the tax rate
Else
Tax rate is 53 %
Tax owed it equal to salary times the tax rate
Tax information file - taxInfo.txt AND screen output containing
Name (String) Company (String), salary (double), Tax Owed (double)
Output
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 arnd iheir annual salary in separate lines, You can choose a different group of people if you like. Kevin Loughrey Thompson Creek Metals Co. Ine. Here is an example of how the file should look like, Note that this example only contains data for 6 people. You will need 3356000.00 James Balsillie Research In Motion Ltd. to research the information and ndd to 141594333.00 your own text file. Prem Watsa Fairfax Financial Holdings Ltd. ark Red Back Mining Inc. 3310667.00 John Shackleton Open Text Corp. 4861667.00 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. John Wright Petrobank Energy and Resources Ltd. 4353333.00 To get you started, software experts at Revenue Canada have provided you with the following IPO chart and pseudo code. IPO Chart Taxpayer file - taxpayer.txt containing Name (string), Company information (string), Salary (double) If salary is less than or equal to $10000000.00 Input Processing Tax rate is 40% Tax owed is equal to salary times the tax rate Else Tax rate is 53 % Tax owed it equal to salary times the tax rate Tax information file - taxInfo.txt AND screen output containing Name (String) Company (String), salary (double), Tax Owed (double) Output
Pseudo code:
Main method:
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 calc Tax(salary, taxRate))
f. Write the record to the taxInfo file
4. Close the taxpayer file
5. Close the taxrate file
6. Display a status message on the screen (e.g. records stored in file.)
7. Display the records on the screen
Other methods:
calc Tax method (double salary, double taxrate) returns tax owed
1. tax owed = salary * taxrate / 100
8. 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
Transcribed Image Text:Pseudo code: Main method: 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 calc Tax(salary, taxRate)) f. Write the record to the taxInfo file 4. Close the taxpayer file 5. Close the taxrate file 6. Display a status message on the screen (e.g. records stored in file.) 7. Display the records on the screen Other methods: calc Tax method (double salary, double taxrate) returns tax owed 1. tax owed = salary * taxrate / 100 8. 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
Expert Solution
steps

Step by step

Solved in 3 steps with 5 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