Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Must print your name and the date at the bottom of the report. All columins MUST align properly and neatly and you MUST match your
Must print your name and the date at the bottom of the report.
All columins MUST align properly and neatly and you MUST match your outpu
the one shown below for full credit.
Here is a screen dump of a full simulation of the program
A manufacturer promotes an electric generator worldwide. The suggested sales price of the
generator being promoted is different in each country they promote the machine. The machine is
sold thru an agent in each county. Raw sales details such as county name, agent name, units
sold and price per unit for each county is given to you in a file named
generatorSalesDetails.dat. Shown below is a prototype of the file.
USA, Foxtail Inc,
Ignite Tech,
Germany, Synchro Studio,
Finland, Think Tank,
Australia, Raptor,
Each row in the file is a comma separated list where
the data are in the order of country name, agent
name, units sold and price per unit.
Write a PowerShell script that opens and reads the file generatorSalesDetails.dat line by line
and then calculates and prints Country, Agent Name, Units Projected, Units Sold,
Difference, Price Per Unit, Total Sales, Expected Sales. Note that the Units
Projected are given to you in a separate array and IT IS NOT a part of the data file. Do not
insert them into the file The Units projected to be sold are given below in that order
matching the countries order in the file
Your output titles should look like the following,
Worldwide Equipment Makers and Distributors
Year ending
Vear ending
Country
Agent Name
Units Projected
Difference
Price Per Unit
Total Sales Expected Sales
You must match these criteria for full credit.
DO NOT alter the given data file
Output MUST have a title and column headings as shown above
All printed floating point number columns must have decimal places.
'Difference', 'Total Sales' and 'Expected Sales' columns are calculated as:
Difference Units Sold Units Projected
Total Sales Units Sold Price Per Unit
Expected Sales Units Projected Price Per Unit
In Grand Totals row, the 'Total Sales' and 'Expected Sales' must have a $ sign.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started