question archive Assignment Introductionspecifications listed here are minimum specifications This assignment will cover many of the concepts topics and techniques discussed in class

Assignment Introductionspecifications listed here are minimum specifications This assignment will cover many of the concepts topics and techniques discussed in class

Subject:Computer SciencePrice: Bought3

Assignment Introductionspecifications listed here are minimum specifications This assignment will cover many of the concepts topics and techniques discussed in class. This assignment requires you to automate database management through an interactive PowerShell menu.  The , you can always go beyond and make the scripts/menu more interactive and complete, such as validating user input, creating submenus,etc.. Download the CSV file provided for the assignment. All work must be saved to this file.

You must work in a group of 3-4 students. The assignment can be split up so that each person can work on specific parts of the assignment and then combine the parts to complete the assignment. This is how work is completed in a production environment. It is in your best interest to work together, so that all members have a working knowledge of the entire assignment. 

Due Date: One person from each group will produce a video demonstrating the menu and documenting Deliverable #2.  The video submissions must be submitted prior to the end of term. In addition, one person from each group must save the PSM1 file as TXT and submit it using the assignment text link, by the end of term. Instructions for making the video and submission are in Week 13.

Please send me Deliverable #1 by email  listing your group members' names and who is responsible for what.  Make sure you indicate in the subject line WIN213Nxx:Assignment (where xx is your section letters). I will create groups on My Seneca so you and your partners can communicate and share code.

Scenario

Canadian Tire is a large national retail chain with networks across Canada.  The company has hired several new administrative staff at their corporate head office, but none of the staff understand PowerShell.  Consequently, Canadian Tire has hired you to write a module incorporating basic database management tools using PowerShell. The specifications for the module are the following:

 

1.     A menu with 7 options (the seventh option will be to exit the program)

2.     The menu must be designed to loop and return after each user selection is completed

3.     The Title of the menu must include the Win213 Group number

4.     All code is to be written as functions and packaged as a module called Win213AssignXX (XX represents a 2-digit code which will be provided by your instructor)

5.     All functions are to use standard verb-noun names and include comments and comment-based help files.

6.     All database changes must be saved to the CSV file provided with the Assignment

7.     Option 6 must create an interactive GUI of the Client database and output user selection to a text file called ClientReport.txt. The date must be displayed in the GUI Title and in the file name. 

 

Menu Option 1: Remove-Duplicates

A problem of CSV files is the possibility of duplicates. A duplicate last name is allowed. A duplicate first name is allowed, but a duplicate last and first name is not allowed. This is a problem when you have multiple user input. Therefore, your function must remove duplicates with the same first and last names.

1)     Write a function which will do the following:

Note: (Research the get-help files for Group-Object, Select-Object and Measure-Object cmdlets to complete this function)

·         Test if the path to the database file exists and if not exit with a message

·         Test to see if duplicate first and last names exist in the database

·         Count and display now many duplicates exist

·         Give the user the option to exit the program or continue to remove duplicates

·         Save the file with duplicates removed to the save directory but with a different name.

o    Remove the old database file

o    Rename the new file with the old name clientinfo.csv.

·           Display a message "Removed Duplicates" (note if the duplicate count is 0, then this message should not appear).

 

 

Table 1: Menu Option 1 Sample Screen Shots

 

 

 

 

Notice Duplicates:

Zoe Ferrell and Reese Solis

 

 

 

 

 

Menu Option 2: Get-ClientName

A basic database task is to test if a client's name is in the database  or not.  If the name is found save the first and last names to out of scope Script variables so that the name can be used by menu options 3 and 4. If the name is not found, the user will select option 5 and add the user to the database.

 

1)     Write a function which will do the following:

·       Test if the path to the database file exists and if not exit with a message

·       Accept user input as "Enter client name [Jane Doe]?" (both first and last names)

·       Split the input into first and last names and save as script scope variables

·       Display a message if the client name is in the database or not

Table 2: Menu Option 2 Sample Screen Shot

 

 

Menu Option 3:  Set-ClientInfo

A basic procedure in database management is the ability to update client information. Database's are never static, people move, get married, companies go under, or change name. Editing a database is a daily activity.

 

1)     Write a function which will do the following:

·         Test if the path to the database file exists and if not exit with a message

·           Display a message "Editing client _______  _________ information"

(name from option 2)

·           Use the [array]::IndexOf(ArrayName, StringToLookFor) static method to find the client's index position in the array

·           Provide user input to amend client properties at the appropriate index position

·           Save the file with amended properties to the save directory but with a different name.

o     Remove the old database file

o     Rename the new file with the old name clientinfo.csv.

·           Display a message "Client information edited"

 

Table 3: Menu Option 3 Sample Screen Shots

 

Notice:

No Duplicates

Reese Solis - updated

 

 

Menu Option 4:  Remove-ClientInfo

As well as editing client information, databases have to be updated by removing client names. Customers die, or move out of your service area, or are influenced by family members not to buy from you. For these reasons, databases must be updated daily to remove names who will no longer be clients.

 

1)     Write a function which will do the following:

·           Test if the path to the database file exists and if not exit with a message

·           Display a message "Removing client ___________  _______________ information"

(name from option 2)

·           Use [array]::IndexOf() static method to find client's position in the array

·           Remove that position from the array and save array variable with a new name

·           Save the file with deleted client to the save directory but with a different name.

o       Remove the old database file

o       Rename the new file with the old name clientinfo.csv.

·           Display a message "Client information removed"

Table 4: Menu Option 4 Sample Sceen Shots

 

 

 

                 

Notice:

Rita Solia removed

 

 

Menu Option 5:  Add-ClientInfo

Research has shown that businesses that do not have a 30% increase in new clients every year will not survive past their fifth year. Businesses must always be promoting, attend home shows, conduct media campaigns and have special promotions to encourage new customers.

 

1)     Write a function which will do the following:

·           Test if the path to the database file exists and if not exit with a message

·              Create an array and a pscustomobject to enter hash table information

·              Accept user input to enter client information (Use Read-Host or mandatory parameters)

·              Append the new client information to the existing database file

·              Import the updated database file with the new client name

·               Save the database file with new client to the save directory but with a different name.

o      Remove the old database file

o      Rename the new file with the old name clientinfo.csv.

·              Display a message "New client added"

 

Table 5: Menu Option 5 Sample Screen Shots

 

 

 

 

Menu Option 6:  Show-ClientInfo

A unique feature of PowerShell is the ability to create an interactive GUI window of the database so the user and select the criteria on which to sort the information, for example selecting all contractors to send a special product flyer by email.

 

1)     Write a function which will do the following:

·              Test if the path to the database file exists and if not exit with a message

·                Import the database file and send all properties to an interactive GUI window

·                Allow user selection to be piped to Out-File to create a Client Report with today's date in the title

Table 6: Menu Option 6 Sample Sceen Shots

 

 

Notice the date in the GUI windows Title and in the file name

 

Grading

1.     Video demonstration of menu items                  10 marks

2.     Text organization,Neatness,Comments              5 marks

Total     15 marks.

Group members get the same mark unless a Problem Report is filed with the instructor.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions