Script 1 Specification:
You work for a medium size wholesale book publisher as the system administrator. This year management has decided, at the last minute, to sell books at its annual book conference. The company as a rule does not sell its books retail, consequently management does not want to purchase an off the shelve retail sales program. Rather, you have been assigned the task of writing a PowerShell text-based program calledLearnName_SalesProgram.ps1 which will do the following.
Allow the sales clerk to the following at the console:
1. Enter the book title –data type string. If the user enters a null string, the program should beep and redisplay the needed value
2. Enter a one sentence description of the book — data type string
3. Enter the book’s ID number. Code numbers are alpha-numeric (e.g. ROM482,SCI233,BUS400). If the user enters a numeric value, the program should prompt for alphanumeric
4. Enter the list price of the book with a dollar sign and decimal format –data type decimal
5. If the user does not enter a numeric value the program should prompt for a numeric value
6. Calculate the harmonized tax rate (HST) of 12% (list price X .12 = tax payable) – data type constant. Display the tax payable and total purchase price for the book to the customer.(tax + list price = purchase price)- data type decimal
7. Output the above information to a file called BookSalesConference2014.txt in the following
8. Optional: include a running total called “Total Book Sales:” which is saved to the file
9. The file format should look like the following:
______________________________________
Title of Book:
Description:
Code Number:
List Price:
Tax Payable:
Purchase Price:
_______________________________________
Total Book Sales: (optional)
Set-Variable TaxRate -Option Constant -value .12 if ( (Test-Path .\BookSalesConference2014.txt) -ne “True” ){
New-Item -Type File .\BookSalesConference2014.txt