Preview

a1 script win213

Satisfactory Essays
Open Document
Open Document
380 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
a1 script win213
2014.01.13 – WIN213 Assignment 1 – Part 1

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

You May Also Find These Documents Helpful

  • Good Essays

    It210 Week 4 Psuedocode

    • 584 Words
    • 3 Pages

    = Yes || yes|| No || no Write: “That is not a correct entry!” Write: “Please enter Yes or No.” Input QuitNow…

    • 584 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    5. The program will calculate and display a final tax based on a 7.5% sales tax.…

    • 498 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    Display it on the next line in decimal and the user if he or she wants to do it. Again if the user type ‘y’ or ‘Y’ the program repeats. If the user type anything else the program terminates. If the user types an illegal character, prompt the user to type again. Page: 115…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 week 2

    • 320 Words
    • 3 Pages

    1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height.…

    • 320 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chid Abuse

    • 829 Words
    • 4 Pages

    | On the Main St. worksheet, in cell B26, insert a function that will calculate the average sales for Quarter 1. Copy the function in cell B26 to the range C26:E26.…

    • 829 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    unit 8 homework

    • 793 Words
    • 5 Pages

    4. Design a loop that asks the user to enter a number. The loop should iterate 10 times and keep a running total of the numbers entered.…

    • 793 Words
    • 5 Pages
    Good Essays
  • Good Essays

    c. Modify the program of Part b so that at the option of the user, it displays…

    • 300 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    BU224 unit 1

    • 893 Words
    • 4 Pages

    1. Liza needs to buy a textbook for the next economics class. The price at the college bookstore is $65. One online site offers it for $55 and another site, for $57. All prices include sales tax. The accompanying table…

    • 893 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Javascript Error Handling

    • 255 Words
    • 2 Pages

    1. Write JavaScript code that anticipates and handles an error for an expected numeric field. This code is executed on keypress and the entered value is saved for you in a variable called enteredChar. Include the try block of JavaScript statements needed to check if the character is not a number or a non-alphanumeric character or if you throw an error message.…

    • 255 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Finance

    • 1032 Words
    • 5 Pages

    SunShine Systems (trends, ratios stock performance) (LO3) SunShine Systems is a leading supplier of computer related products, including servers, workstations, storage devices, and network switches.…

    • 1032 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    This Is a Paper

    • 469 Words
    • 2 Pages

    * The design is not robust as there are no statements for error handling and handling exceptions. To make this code more robust I would add error handling statements like the user can only enter numbers that are between 0 and 100. Also the user cannot enter any strings like winding and other data types, for other numbers and data types the system will display "invalid input. Please enter a number between 0 and 100." Also notice that it doesn't handle the case of entering 49. You need <= 49, as it is now, when you enter 49 all it will say is "how did u do?" same thing with entering 100 and for anything over 100.…

    • 469 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    It-321 - Project 2 Script

    • 791 Words
    • 4 Pages

    switchport mode trunk int fa1/0 no shutdown exit int fa1/0.1 encapsulation dot1q 1 ip address 172.16.1.1 255.255.255.0 no shutdown exit int fa1/0.10 encapsulation dot1q 10 ip address 172.16.10.1 255.255.255.0 no shutdown exit int fa1/0.20 encapsulation dot1q 20 ip address 172.16.20.1 255.255.255.0 no shutdown exit vlan 10 name Accounting exit vlan 20 name Marketing exit int fa0/1 switchport mode trunk no shutdown exit int fa0/2 switchport mode trunk no shutdown exit int fa0/3 switchport mode trunk no shutdown exit int vlan 1 ip address 172.16.1.4 255.255.255.0 no shutdown ip default-gateway 172.16.1.1 int…

    • 791 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Assigment 2 Wad

    • 302 Words
    • 2 Pages

    System.out.print("Press 1 to Add Student\nPress 2 to Enter Course\nPress 3 to Registration\nPress 4 to Show Current Student Press\nPress 5 to Drop Student\nPress 6 to EXit ");…

    • 302 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Interaction Design

    • 514 Words
    • 3 Pages

    Carry out an Hierarchical Task Analysis for the task of buying books from a High Street bookseller. Your analysis should take account of the range of user needs – e.g., some users will want to find a specific title while others want to browse potential titles before making a selection. Your HTA should be presented using the standard graphical notion and detailed plans should be written.…

    • 514 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Sections of the Library

    • 706 Words
    • 3 Pages

    6. Text Book Bank Section - There is a separate Text Book Bank ( TBB ) Secton in the Library. Books from TBB are issued for one semester against a nominal charge of Rupees 2 ( two) for each book.…

    • 706 Words
    • 3 Pages
    Good Essays