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
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...
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fac1f439a-76fe-4999-ba39-973127eb7e8c%2Fa699ba27-b01b-4c90-b6d5-90e3836363a7%2Fa1x66ri_processed.jpeg&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fac1f439a-76fe-4999-ba39-973127eb7e8c%2Fa699ba27-b01b-4c90-b6d5-90e3836363a7%2F9etzrun_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY