scripting assignment

NOTE:  This is a little different than what is described in video.  

Create one script that does two things.  It creates a backup of your directory or performs a security check to be sure the files have not been changed without you knowing. 

Your script must do the following:

1) If the user indicates option 1 on the command line, it performs a backup of your home directory structure.

2) If the user indicates option 2 on the command line,  to does a security check. The script checks if any files in a directory have changed (use sha1sum and diff).  You will need to create a temporary file to hold the new data so you can compare the two. You code should also do the following:

  • Create a maintenance log of who (username) and when (date) the hash checks were completed.  Store the date and name in a file called maintenance.  If the file already exists the code should append to the end.
  • Make sure you check to be sure if you can read the file and you can write to it before doing it. If you can’t print out an error.  
  • The script should print out the name of the file(s) that changed and its old and new hash. 
  • Prove that your code works: 
    • Show maintenance log
    • Show all conditions including error conditions working 

Read through all the provided source code to make sure that you understand the context. A class named BinarySearchTree with an add method plus various utility methods is provided for you. You must not change any provided method with a body that is alr

 

Instructions

  1. Read through all  the provided source code to make sure that you understand the context. A  class named BinarySearchTree with an add method plus various utility  methods is provided for you. You must not change any  provided method with a body that is already complete. Note that linked  nodes are used to implement the BinarySearchTree class. Note also that  the data type allowed in the BinarySearchTree is constrained to be a  class that implements the Comparable interface and thus has a natural  total order defined.
  2. The min method of the BinarySearchTree class currently has no body. You must provide a correct body for the min method.
  3. A  sample main method is provided to illustrate building a simple binary  search tree and then using the min method to search for particular  values.

Problem Description: Finding the Minimum Value in a Binary Search Tree

Complete the body of the min method so that it returns the minimum value in the binary search tree.

The  following table lists an example call to min and the expected return  value when called in the context of the binary search tree pictured  below.

Method CallExpected Return Value

min() 1

/**

 * Complete the min method in the nested BinarySearchTree class below.

 *

 */

public class BSTMin {

  /** Provides an example. */

  public static void main(String[] args) {

    BinarySearchTree iBst = new BinarySearchTree<>();

    iBst.add(10);

    iBst.add(12);

    iBst.add(8);

    iBst.add(2);

    iBst.add(6);

    iBst.add(4);

    Integer imin = iBst.min();

    // The following statement should print 2.

    System.out.println(imin);

    BinarySearchTree sBst = new BinarySearchTree<>();

    sBst.add(“W”);

    sBst.add(“A”);

    sBst.add(“R”);

    sBst.add(“E”);

    sBst.add(“A”);

    sBst.add(“G”);

    sBst.add(“L”);

    sBst.add(“E”);

    String smin = sBst.min();

    // The following statement should print A.

    System.out.println(smin);

  }

  /** Defines a binary search tree. */

  static class BinarySearchTree> {

    // the root of this binary search tree

    private Node root;

    // the number of nodes in this binary search tree

    private int size;

    /** Defines the node structure for this binary search tree. */

    private class Node {

      T element;

      Node left;

      Node right;

      /** Constructs a node containing the given element. */

      public Node(T elem) {

        element = elem;

        left = null;

        right = null;

      }

    }

    /*   >>>>>>>>>>>>>>>>>>  YOUR WORK STARTS HERE  <<<<<<<<<<<<<<<< */

    ///////////////////////////////////////////////////////////////////////////////

    //    I M P L E M E N T  T H E  M I N  M E T H O D  B E L O W     //

    ///////////////////////////////////////////////////////////////////////////////

    /**

     * Returns the minimum value in the binary search tree.

     */

    public T min() {

    }

    /*   >>>>>>>>>>>>>>>>>>  YOUR WORK ENDS HERE  <<<<<<<<<<<<<<<< */

    ////////////////////////////////////////////////////////////////////

    // D O  N O T  M O D I F Y  B E L O W  T H I S  P O I N T  //

    ////////////////////////////////////////////////////////////////////

    ////////////////////

    // M E T R I C S //

    ////////////////////

    /**

     * Returns the number of elements in this bst.

     */

    public int size() {

      return size;

    }

    /**

     * Returns true if this bst is empty, false otherwise.

     */

    public boolean isEmpty() {

      return size == 0;

    }

    /**

     * Returns the height of this bst.

     */

    public int height() {

      return height(root);

    }

    /**

     * Returns the height of node n in this bst.

     */

    private int height(Node n) {

      if (n == null) {

        return 0;

      }

      int leftHeight = height(n.left);

      int rightHeight = height(n.right);

      return 1 + Math.max(leftHeight, rightHeight);

    }

    ////////////////////////////////////

    // A D D I N G  E L E M E N T S //

    ////////////////////////////////////

    /**

     * Ensures this bst contains the specified element. Uses an iterative implementation.

     */

    public void add(T element) {

      // special case if empty

      if (root == null) {

        root = new Node(element);

        size++;

        return;

      }

      // find where this element should be in the tree

      Node n = root;

      Node parent = null;

      int cmp = 0;

      while (n != null) {

        parent = n;

        cmp = element.compareTo(parent.element);

        if (cmp == 0) {

          // don’t add a duplicate

          return;

        } else if (cmp < 0) {

          n = n.left;

        } else {

          n = n.right;

        }

      }

      // add element to the appropriate empty subtree of parent

      if (cmp < 0) {

        parent.left = new Node(element);

      } else {

        parent.right = new Node(element);

      }

      size++;

    }

  }

}

discussion ro

Your job this week is to choose one of the applications from the list available at this link from National Instruments. (Links to an external site.) Once you open the National Instruments link, hover over ‘Solutions’ to navigate to one of the possible solutions using LabView.

Pick one of the applications listed that relate to an area that interests you.

Review the ‘Industry Trends’ to gain an insight of possible and future applications.

Summarize the characteristics of the application to choose from in an initial post to your classmates.

In your original post, answer the following:

  • Be sure your application is not too similar to classmates’. There are many different applications to choose from, so this should not be a problem.
  • Your response should demonstrate critical thinking.
  • Your response must incorporate information attained from one credible resource. Cite your source.
  • Make sure your post is free of grammatical and spelling errors.

Exp19_Excel_Ch04_CapAssessment_Rockville_Auto_Sales

  

Exp19_Excel_Ch04_CapAssessment_Rockville_Auto_Sales

 Exp19 Excel Ch04 CapAssessment Rockville Auto Sales 

  

Project Description:

You work for Rockville Auto Sales and have been asked to aid in the development of a spreadsheet to manage sales and inventory information. You will start the task with a prior worksheet that contains vehicle information and sales data for 2018. You need to convert the data to a table. You will manage the large worksheet, prepare the worksheet for printing, sort and filter the table, include calculations, and then format the table.

Steps to Perform:

     

Start   Excel. Download and open the file named Exp19_Excel_Ch04_Cap_AutoSales.xlsx.   Grader has automatically added your last name to the beginning of the   filename.

 

Freeze the first row on the   Fleet Information worksheet.

 

Convert the data to a table,   name the table Inventory, and apply the Gold, Table Style Medium 19.

 

Remove duplicate records.

 

Sort the table by Make in   alphabetical order, add a second level to sort by Year Smallest to Largest,   and a third level to sort by Sticker Price Smallest to Largest.

 

Repeat the field names on all   pages.

 

Change page breaks so each   vehicle make is printed on a separate page.

 

Add a footer with your name on   the left side, the sheet name code in the center, and the file name code on   the right side.

 

Click the Sales Information   worksheet and convert the data to a table, name the table Sales, and apply the Green, Table   Style Dark 11.

 

Type % of sticker in cell E1.

 

Create a formula with structured   references to calculate the percentage of the Sticker Price in column E.

 

Format the range E2:E30 with   Percent Style Number Format.

 

Add a table Total Row and then   display the Average of % of sticker and Sum of Sticker Price and Sale Price.

 

AutoFit the width of columns B:E   to show the total values.

 

Select the range E2:E30. Apply   Solid Fill Blue Data Bars conditional formatting to the % of sticker data.

 

With the range E2:E30 selected,   create a new conditional formatting rule that uses a formula to apply yellow   fill and bold font to values that sold for less than or equal to 70% of the   sticker price.

 

On the First Quarter Sales   worksheet, rename the table FirstQuarter.

 

Filter the data to display   January, February, and March sales.

 

Add a footer with your name on   the left side, the sheet name code in the center, and the file name code on   the right side.

 

Select Landscape orientation for   all sheets.

 

Save and close EXP19_Excel_CH04_Cap_AutoSales.xlsx.   Exit Excel.

YO19_Excel_Capstone_Intro_Smart_Rental

 YO19_Excel_Capstone_Intro_Smart_Rental

  

Project Description:

Virginia Garrero owns a small business in which she rents high end handbags, accessories, dresses and evening gowns. Virginia has created a workbook to keep track of weekly rentals. She uses this workbook to keep track of rentals and also to identify trends in length of rental, and payment method. Virginia wants to use this information when forecasting which new products to purchase for her rental business. To purchase new products, she will need to take out a loan. Therefore, she also wants to know what her monthly payment would be if new products were purchased. You have been asked to help finish the workbook so that Virginia can use it on a weekly basis.

     

Start   Excel. Download and open the file named   Excel_Capstone_Intro_SmartRental.xlsx. Grader has automatically added your last name to   the beginning of the file name. Save the file to a location where you are   storing your files.

 

To improve the appearance of the   RentalData worksheet, wrap the text of cell range A5:I5.

 

Merge and Center cell range   K1:P1.
  Copy the format of cell K5 and paste the format to cell range N5:P5.

 

Delete Sheet4 and Sheet5 from   the workbook.

 

On the RentalData worksheet, in   cell E6, enter a DATEDIF (or DAYS) formula to determine the length of rental   in days based on the date rented and the date returned. Copy this formula   through cell range E7:E31.

 

On the RentalData worksheet,   assign a named range Rates to cell range A34:B37.

 

In cell G6, use an appropriate   VLOOKUP function to retrieve the daily rate from the named range Rates for   the product in column A. The function should look for an exact match.
  Copy the formula through cell G31.
  Format cell range G6:G31 with the Accounting Number Format.

 

Rewards customers are allowed a   discount on their rentals. In cell H6, enter a formula to determine if a   discount should be applied. If the payment method in column F was Rewards, the customer should receive   the discount shown in cell B39. Otherwise the formula should return a zero.   Use absolute referencing where appropriate and then copy the formula through   cell range H7:H31.
  Apply the Percent style with zero decimal places to cell range H6:H31.

 

Virginia considers customers who   spend over $200 a week to be valued customers and wants to draw attention to   their sales totals.
  Apply a Conditional Format to cell range I6:I31 that will highlight the   values greater than 200 with Green Fill and Dark Green Text. 

 

In cell I32, use a function to   add the Total Sales column.
  If necessary, in cell I32, remove the Conditional formatting.
  In cell I32, apply the Total cell style, bold formatting and change the font   to size 16.

 

Adjust the width of columns O   and P to 13
  Hide rows 33:39.

 

Virginia is considering offering   specials to clients based on their payment method. Therefore, she wants you   to help her analyze the week’s payment information so she can determine her   clients’ preferred method of payment.
 

  In cell L6, using a Statistical function, count the number of times the   criteria in cell K6 is used. Use absolute referencing where necessary and   then copy the formula through cell L9.

 

In cell O6, using a Statistical   function, determine the average total sales based on the payment method type   in cell N6. Use absolute referencing where necessary and then copy the   formula through cells O9.

 

In cell P6, using a Math &   Trig function, determine the total sale per payment method based on the   payment method in cell N6. Use absolute referencing and then copy the formula   through cell P9.
  Apply a Gradient Fill Orange Data Bar to P6:P9. 

 

Virginia wants to determine if   the sales goal for the week was met. The sales goal for the week is met if   the total sales is greater than or equal to $3,000.
  In cell L13, enter a logical function to determine if the sales goal for the   week was met. Return a value of Yes if the sales goal was met, or No if the sales goal was not met. 

 

When Virginia started gathering   client data, she entered her clients’ names in all capital letters and in   column A. She has asked you to change the names of each client to proper   case.
 

  On the Clients worksheet, in cell B2, use a text function to change the text   in cell A2 to proper case. Copy the formula through cell B26. 

 

Virginia is considering taking   out a loan to purchase more products to rent to customers. In order to   purchase the products she needs, she has determined that she needs to borrow   $10,000. She would like you to help her determine her monthly payment based   on the loan amount, an interest rate of 5.5% with a repayment of the loan   after 5 years.
 

  On the LoanData worksheet, in cell B6, determine the monthly payment.
 In cell B6, edit the formula to return   an absolute value.

 

Virginia is curious about her   handbag line of rentals. She has asked you to create a combination chart that   shows the days rented and the total sales.
 

  Using cell ranges A5:A10, E5:E10, and I5:I10 on the RentalData worksheet,   create a combination chart with the Total Sales as the secondary axis. The   secondary axis should be a line chart.
  Move the chart to a new chart sheet named HandbagsChart
  Move the Chart Sheet to the last position (far right).
  Enter the chart title Handbag Rental
  Apply Chart Style 5.
  Add a primary vertical axis label Days Rented
  Add a secondary vertical axis label Total Sales
 

 

Save and close Excel_Capstone_Intro_SmartRental.xlsx.   Exit Excel. Submit the file as directed.

Programming Project

  

Programming Project 3 (100 Points toward Course Grade)

Instructions:  The following programming problem can be solved by a program that uses three basic tasks-Input Data, Process Data, and Output Results. To process the data, it uses loops, arrays, decisions, accumulating, counting, searching and sorting techniques. Use RAPTOR to design a suitable program to solve this problem.

Problem Statement

Assume the Scores array is parallel to the Players array (both arrays are below).

Scores array

Scores[0] = 198

Scores[1] = 486

Scores[2] = 651

Scores[3] = 185

Scores[4] = 216

Scores[5] = 912

Scores[6] = 173

Scores[7] = 319

Scores[8] = 846

Scores[9] = 989

Players Array

Players[0] = “Joe”

Players[1] = “Ann”

Players[2] = “Marty”

Players[3] = “Tim”

Players[4] = “Rosy”

Players[5] = “Jane”

Players[6] = “Bob”

Players[7] = “Lily”

Players[8] = “Granny”

Players[9] = “Liz”

Write a looping program that presents the user with 3 options:

1) Sort Output by Players

2) Sort Output by Scores

3) Exit Program

When the first option is selected, sort the Players array in alphabetical order, keeping the Scores array parallel. Add code that determines the highest and lowest scores in the list. Include code to display each player’s score and name in the sorted order. Below the sorted list display the highest and lowest scores in the list and the name of the player who received that score. 

Your sort by Player output display should look like this:

Scores Sorted by Player:

486     Ann

173     Bob

846     Granny

912     Jane

198     Joe

319     Lily

989     Liz

651     Marty

216     Rosy

185     Tim

———————————–

989     Highest Score by Liz

173     Lowest Score by Bob

When the second option is selected, sort the Scores array in numerical order, keeping the Players array parallel. Add code that determines the average score of the entire list. Include code to display each player’s score and name in the sorted order. Below the sorted list display the average of all scores in the list. Your sort by Scores output display should look like this:

Players Sorted by Scores:

173     Bob

185     Tim

198     Joe

216     Rosy

319     Lily

486     Ann

651     Marty

846     Granny

912     Jane

989     Liz

—————————

498     Average Score 

You may use either the Bubble Sort or the Selection Sort algorithms.

Option three is self explanatory. NEVER call “main” from inside your program. Use a loop that keeps your program running until the user chooses option 3.

Round the Average score to the nearest whole number, as shown in the output example above.

You MUST use Modular Programming techniques by using Sub Modules (Sub Charts in RAPTOR) in your program. Your “main” module should not be very large. Again, NEVER call “main” from inside your program. Also, do not use “recursion” in this program (submodules that call themselves). You are only allowed to use looping techniques to repeat sections of your submodules.

You may NOT “hard code” the numbers for highest and lowest scores. Nor simply sort the array by score and use the lowest and highest indexes. These must be discovered through algorithm that will work on an unsorted array. NOR may you “hard code” the number for the average score. Accumulate the scores in a loop then calculate the average. If the array data is changed, the Hi/Low/Avg scores should automatically be found or calculated with the new data.

Hard-code the values of the arrays into your program. Do NOT ask the user to input the values. 

Other Requirements:

Documentation: Use the “Comments” feature to document each symbol in the flowchart. You do this by right-clicking the symbol and selecting “Comment.” Be sure to identify the data type of each variable used. Be sure to explain what each formula does. Be sure to explain what each of the other symbols in the flowchart does in a comment.

· Test and debug your Program: Create sample input data, run the program, then check your answers with a calculator or Excel. If something did not match up, then fix your program.

· Program must execute and produce correct output.

· Read this page again to be sure you covered all requirements.

· See the Programming Project Rubric for grading principles.

· Extra Credit: 1) Add an option to the menu with code that allows the user to type in a Player’s name and then displays the Player’s score. 2) Use files to input your array data.

SIEMENS SIMATIC

I need to write a term paper on the topic Siemens Simatic- PCS7/WINCC (SCADA) 

There are all the requirements for the term paper alongside the template for the term paper.
Please help and thank you 

Engineering Ethics

For paper 3, you will analyze the ethical or unethical nature of a specific engineering issue by identifying problems in the situation and using an engineering code of ethics to determine how engineering actions and decisions were ethical or unethical. You should write your analysis on one of the topics below. Within your chosen topic, you’ll argue three points that focus on specific parts of engineering that were ethical or unethical according to a specific code of engineering ethics (e.g., NSPE Code of Ethics (Links to an external site.), ASME Code of Ethics (Links to an external site.)).

Manned Trip to Mars

LEARNING OUTCOMES/GOALS

(1) Students form a persuasive and well-supported argument about the ethical issues of the case

(2) Students adequately describe the technical engineering aspects of the issue for a general audience

(3) Students create clear, organized, and detailed documents

ASSIGNMENT CHECKLIST

All papers must be in 12-point Times New Roman font (smaller fonts are appropriate for figure captions and text inside figures).

All margins must be 1” all around (note that old versions of Word typically default to 1.25” for left and right margins, so you will need to change these).

All papers should be 4-6 pages, double-spaced.

Graphics should be used as needed, particularly in the technical description.

The paper should be well-researched and cite various sources as needed. Your sources are necessary to provide authoritative support for your ideas and to give credit for supporting ideas that don’t belong to you. Use the APA style of documentation to format your in-text citations and References section.

Your paper should have a well-defined point/thesis – a statement somewhere in the introduction that conveys to the reader precisely what your subject is, what your position is, and how you will support this position. Remember that a thesis is a promise to the reader that you’re going to discuss one specific main idea; the rest of your paper is how you go about keeping that promise.

GENERAL WRITING AND ORGANIZATION CONSIDERATIONS

Every paragraph and section should be obviously related to the thesis; every paragraph and section should be obviously related to each other; every sentence in a paragraph should be obviously linked to each other and should obviously refer back to its paragraph’s topic sentence.

The structure of the paper should include an introductory section, a section that describes the engineering issue/technology/problem, a section that discusses the relevant ethical issues and applies a code of engineering ethics to the issues, and a conclusion section. These sections should be clearly labeled with section headings.

Your audience for paper 3, though educated, possesses no specialized knowledge of your research/experiment or of the ethical situation you’re discussing; this fact means you must provide a technical explanation of your chosen scenario (defining any technical terms).

Graphics must serve a substantive purpose, which means you must think carefully about what areas of your content might be helped by visual representation and what types of graphics (photos, diagrams, tables, charts, etc.) will most effectively accomplish your purpose. These graphics may certainly come from outside sources as long as you cite them appropriately. If you modify a graphic in any way, your citation should reflect changes made.

Assignment W3 (database)

1 page

For mapping, there are Mapping Cardinality Constraints and some traditional mapping methods such as One to one, One to many, Many to one, and Many to many.

Please describe the  Mapping Cardinality Constraints, examples of 4 mappings, and provide possible (extra) mapping mechanism that is different from the above 4 mappings.