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 .
The Term Paper on Book Becoming Attached
The human need to have our mother near is the theory that is expressed in chapter one. Chapter one goes through a time line of how we, as humans, came across this theory. The author tends to talk about and describe how as babies the basic need to have mother around is just as important as having food, water, and clean diapers. The author gives examples of children who were adopted after infancy ...
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 } Clear-Host [string]$Title = Read-Host “Book Title” while ( $Title -eq “” ) { [console]::beep(1000,500) $Title = Read-Host “Please Enter Book Title Again” } [string]$Description = Read-Host “Book Description” [string]$CodeNmeber = Read-Host “Code Number” while ( $CodeNmeber -match “^\d+$” ) { $CodeNmeber = Read-Host “The Code Nmubers Are Alpha-numeric.
Please Enter Again” } [string]$InputPrice = Read-Host “List Price “ while ( $InputPrice -notmatch “^\$[0-9]+(\. [0-9]{0,2})? $” ) { $InputPrice = Read-Host “The Prices Are Dollar Sign Plus Numeric. Please Enter Again” } [Decimal]$ListPrice=$InputPrice. Remove(0,1) [Decimal]$Tax=$ListPrice * $TaxRate [Decimal]$PurchasePrice=$ListPrice+$Tax Write-Host “Tax Payable: $” $Tax Write-Host “Purchase Price: $” $PurchasePrice Write-Output “________________________________________________________________” >> . \BookSalesConference2014. txt