150/s1

  • Research cases of illegal wiretapping within the United States.
  • Evaluate why a given instance of wiretapping was illegal.

Learning Journal/Python 1

 

Create a Python dictionary that returns a list of values for each key. The key can be whatever type you want. 

Design the dictionary so that it could be useful for something meaningful to you. Create at least three different items in it. Invent the dictionary yourself. Do not copy the design or items from some other source. 

Next consider the invert_dict function from Section 11.5 of your textbook. 

# From Section 11.5 of: 
# Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press. 

def invert_dict(d):
     inverse = dict()
     for key in d:
          val = d[key]           if val not in inverse:
               inverse[val] = [key]           else:
               inverse[val].append(key)
     return inverse 

Modify this function so that it can invert your dictionary. In particular, the function will need to turn each of the list items into separate keys in the inverted dictionary. 

Run your modified invert_dict function on your dictionary. Print the original dictionary and the inverted one. 

Include your Python program and the output in your Learning Journal submission. 

Describe what is useful about your dictionary. Then describe whether the inverted dictionary is useful or meaningful, and why. 

PART 2 

 

Describe how tuples can be useful with loops over lists and dictionaries, and give Python code examples. Create your own code examples. Do not copy them from the textbook or any other source. 

Your descriptions and examples should include the following: the zip function, the enumerate function, and the items method. 

JAVA Stack&Queue Assignment

 

Question 1: Using stack to implement queue. (You can define your own stack class, or use the Stack class in Java API)

Question 2: Using queue to implement stack. (You can define your own queue class, or use the Queue class in Java API)

Demo them in a test program

Requirements: Submit the repl.it links of the two programs

Please note that you need to submit two repl.it links. You can copy and paste the two links in a .txt/.docx file and upload the file. You can also submit the second link as comments in the assignment submission.

Array, Vectors, and Linked list discussion response

Please respond to the following discussion response with a minimum of 200 words and use a reference. 

 

ArrayList:

Characteristics:

  • ArrayList is used to store components and remove components at any  time because it is flexible to add and remove the components.  
  • ArrayList is similar to arrays but the arrays were deterministic and ArrayList was non-deterministic.
  • ArrayList allows adding duplicate components.
  • ArrayList maintains the order of components in the order of insertion.

The following statement shows how to initialize the ArrayList.

ArrayList list=new ArrayList();

The above list object is used to add different types of components into ArrayList.

ArrayList list=new ArrayList();

The above list object is used to add only the String type component  into the ArrayList. If someone tries to add other types of components  then it provides a compile-time error.

The following statement shows how to add components into ArrayList.

list.add("Cat");
list.add("Dog");
list.add("Cow");
list.add("Horse");

add() is the method used to add components into the ArrayList. Here  the String type is specified so the parameters are enclosed with the  double-quotes. Instead of String Integer type is provided then the  number is passed as a parameter without double-quotes.

The following statement shows how to update components in ArrayList.

list.set(1,"Goat");

Now the component at index 1 is set as Goat instead of Dog. In the  set() method the first parameter specifies the index value and the  second parameter specifies the updated component.

The following statements show how to get all the components that were stored in the ArrayList.

for(String str: list)
{
System.out.println(str);
}

From the above statement, the for-each loop is used to iterate the ArrayList to get all the components in the ArrayList.

Iterator it=list.iterator();
while(it.hasNext())
{
System.out.println(it.next());
}

From the above statement, the Iterator interface is used to get the ArrayList components.

The following statement shows how to remove components from the ArrayList.

list.remove(0);

Now the component at index 0 is deleted from the ArrayList.

The following is the java code that implements the ArrayList.

import java.util.*;
public class ArrayListDataStructure
{
public static void main(String[] args)
{
ArrayList list=new ArrayList();
list.add("Cat");
list.add("Parrot");
list.add("Horse");
list.add("Cow");
list.add("Dog");
System.out.println("ArrayList Components");
for(String str:list)
{
System.out.println(str);
}
list.set(2, "Golden Fish");
System.out.println("nArrayList Components after update");
for(String st:list)
{
System.out.println(st);
}
System.out.println("Size of ArrayList:"+list.size());
list.remove(3);
System.out.println("nArrayList Components after Delete");
for(String str:list)
{
System.out.println(str);
}
System.out.println("Size of ArrayList:"+list.size());
list.add("Love Birds");
Collections.sort(list);
System.out.println("nArrayList Components after Sorting");
for(String str:list)
{
System.out.println(str);
}
}
}

LinkedList:

  • Characteristics of LinkedList are the same as ArrayList like  allowing duplicate components, components stored in the order of  insertion, and non synchronized.
  • The difference is that manipulation is fast in LinkedList as  compared to ArrayList because the ArrayList needs more shifting to  remove a component but the LinkedList does not need shifting.

The following statement shows how to initialize the LinkedList.

LinkedList ll=new LinkedList();

The following statement shows how to add components into LinkedList.

ll.add("James");
ll.add("Daniel");
ll.addFirst("Hepson");
ll.addLast("Shibi");

The following statement shows how to update components in LinkedList.

ll.set(2,"Anisha");

The following statements show how to get all the components that were stored in the LinkedList.

for(String st:ll)
{
System.out.println(st);
}

The following statement shows how to remove components from LinkedList.

ll.remove(3);

The following is the java code that implements LinkedList.

import java.util.Collections;
import java.util.LinkedList;
public class LinkedListDataStructure
{
public static void main(String[] args)
{
LinkedList ll=new LinkedList();
ll.add("Dhanya");
ll.add("Daniel");
ll.add("Xavier");
ll.addFirst("Hepson");
ll.addLast("Shibi");
System.out.println("LinkedList Components");
for(String st:ll)
{
System.out.println(st);
}
ll.set(2,"Anisha");
System.out.println("nLinkedList Components after update");
for(String st:ll)
{
System.out.println(st);
}
System.out.println("Size of LinkedList:"+ll.size());
ll.remove(3);
System.out.println("nLinkedList Components after Delete");
for(String st:ll)
{
System.out.println(st);
}
System.out.println("Size of LinkedList:"+ll.size());
Collections.sort(ll);
System.out.println("nLinkedList Components after Sorting");
for(String st:ll)
{
System.out.println(st);
}
}
}

Vector:

  • Vector is also a dynamic array so there is no size limit.
  • Vector class implements List interface so all the methods in List interface can be used in Vector.
  • Vector is synchronized so it is better to use vector in thread-safe implementation.

The following statement shows how to initialize a Vector class.

Vector vec=new Vector();

The following statement shows how to add components to a Vector.

v.addElement("Cake");
v.addElement("Biscuit");
v.addElement("IceCream");
v.addElement("Chocolate");

The following statement shows how to update components in Vector.

v.set(1,"Drinks");

The following statement shows how to remove components from the Vector.

v.remove(3);

The following is the java code that implements Vector.

import java.util.Collections;
import java.util.Vector;
public class VectorDataStructure
{
public static void main(String[] args)
{
Vector v =new Vector();
v.addElement("Cake");
v.addElement("Biscuit");
v.addElement("IceCream");
v.addElement("Chocolate");
System.out.println("Vector Components");
for(String st:v)
{
System.out.println(st);
}
v.set(1,"Drinks");
System.out.println("nVector Components after update");
for(String st:v)
{
System.out.println(st);
}
System.out.println("Size of Vector:"+v.size());
v.remove(3);
System.out.println("nVector Components after Delete");
for(String st:v)
{
System.out.println(st);
}
System.out.println("Size of Vector:"+v.size());
v.add("Biscuit");
Collections.sort(v);
System.out.println("nVector Components after Sorting");
for(String st:v)
{
System.out.println(st);
}
}
}

ArrayList:

The ArrayList is a resizable array that can be used to store  different types of components at any time. In ArrayList components can  be added anywhere by specifying the index.

The following is the description of the code

  • Initialize an ArrayList class.
  • Use add() method to add components into the ArrayList class.
  • For-each loop is used to print the components.
  • Use the set() method to update the component.
  • Use the remove() method to delete the component.
  • Use size() to get the current size of the ArrayList.
  • Use the sort() method in Collections to sort the components in the ArrayList.

LinkedList:

LinkedList class is used to implement the Linked List linear data  structure. The components are not stored in the neighboring address and  it is stored as containers.  

The following is the description of the code.

  • Initialize the LinkedList class.
  • Use add() method to add components into the LinkedList class.
  • For-each loop is used to print the components.
  • Use the set() method to update the component.
  • Use the remove() method to delete the component.
  • Use size() to get the current size of the LinkedList.
  • Use the sort() method in Collections to sort the components in the LinkedList.

Snip of the Output:

Vector:

Vector is the growable array. Vector is synchronized so it has legacy  methods. Iterators can not be returned by the vector class because if  any concurrent changes occur then it throws the  ConcurrentModificationException.

The following is the description of the code

  • Initialize the Vector class.
  • Use and elements() method to add components into the Vector class.
  • For-each loop is used to print the components.
  • Use the set() method to update the component.
  • Use the remove() method to delete the component.
  • Use size() to get the current size of the Vector.
  • Use the sort() method in Collections to sort the components in the Vector.

Meeting Times Assignment

https://www.youtube.com/watch?v=3WrZMzqpFTc&themeRefresh=1.Take minutes from this meeting and submit for grading. There are not names of the speakers for this meeting so you may assign names to the players.

Prepare a set of meeting minutes from the video you watched. The purpose of these minutes is to convey information to those who did not attend.

Your minutes should always answer the who, what, when, why, and how questions.

bswa week11 p11

Hello,

i need this paper by 3/31 afternoon 12am.

Strictly No plagiarism please use your own words.

Do a bit of research on penetration testing techniques. Investigate and document the following

  • Five network penetration testing techniques
  • Advantages and disadvantages of each
  • One notable social engineering test
  • Possible negative implications of penetration testing

Please write 300 words

 https://www.youtube.com/watch?v=wDQ0KXR4D7A

Make sure Strictly No plagiarism content should not match and even the reference should not match in plagiarism 

local copy

  

1. A local copy center needs to buy white paper and yellow paper. They can buy from three suppliers. Supplier 1 sells a package of 20 reams of white and 10 reams of yellow for $60. Supplier 2 sells a package of 10 reams of white and 10 reams of yellow for $40. Supplier 3 sells a package of 10 reams of white and 20 reams of yellow for $50. The copy center needs 350 reams of white and 400 reams of yellow. Using Python, determine (1) how many packages they should buy from each supplier in order to minimize cost and (2) the minimum cost.

2. A new test has been developed to detect a particular type of cancer. A medical researcher selects a random sample of 1,000 adults and finds (by other means) that 4% have this type of cancer. Each of the 1,000 adults is given the new test and it is found that the test indicates cancer in 99% of those who have it and in 1% of those who do not. Based on these results, what is the probability of a randomly chosen person having cancer given that the test indicates cancer? What is the probability of a person having cancer given that the test does not indicate cancer?Round the probabilities to four decimal places.

3. If a tank holds 5000 gallons of water, which drains from the bottom of the tank in 40 minutes, then the volume of the water remaining in the tank after minutes is given by . Using Python, determine the rate at which water is draining from the tank. When will it be draining the fastest?

4. A rectangular container with a volume of 475 ft3 is to be constructed with a square base and top. The cost per square foot for the bottom is $0.20, for the top is $0.10, and for the sides is $0.015. Find the dimensions of the container that minimize the cost. Round to two decimal places.

5. Assume the total revenue from the sale of items is given by while the total cost to produce items is . Find the approximate number of items that should be manufactured so that profit is maximized. Justify that the number of items you found gives you the maximum and state what the maximum profit is.

6. For the following function, determine the domain, critical points, intervals where the function is increasing or decreasing, inflection points, intervals of concavity, intercepts, and asymptotes where applicable. Use this information and Python to graph the function.

Domain:

By inspection, the value x = -2 will cause the denominator to be equal to 0. Thus the value x = -2 must be excluded from the domain. There are no other values that must be excluded, thus the domain is (-∞, -2) U (-2, ∞).

7. The rate of growth of the profit (in millions) from an invention is approximated by the function where represents time measured in years. The total profit in year two that the invention is in operation is $25,000. Find the total profit function. Round to three decimals.

8. For a certain drug, the rate of reaction in appropriate units is given by

9. Determine if the following function is a probability density function on

10. Researchers have shown that the number of successive dry days that occur after a rainstorm for a particular region is a random variable that is distributed exponentially with a mean of 9 days. Using Python, determine the (separate) probabilities that 13 or more successive dry days occur after a rainstorm, and fewer than 2 dry days occur after a rainstorm. Round the probabilities to four decimal places.

Research Project- Planning Project

You are the new project manager at Garden Decks of Beauty, a local company for the past 12 years in the Lexington, KY area.  Your first assignment will be for the Melrose family (Todd and Margo, plus two yippy dogs to drive the neighbors nuts) who moved into their new home two years ago and now wish to replace the 8’ by 3’ slab of concrete (the stoop) which their backyard facing French Doors step onto with a new luxurious deck area with hot-tub and accoutrements.  Their backyard is 80’ wide and 120’ deep and runs at a 5% slope straight down the back.  By the way, Todd and Margo are Iron Triangle lovers – Time/Cost/Quality.  Win them and you win their neighbors’ business.Customer’s Basic Requirements

  • A two-area deck with the upper level (will step on from the French Doors), being a 5 meter by 7-meter rectangular area
  • One end of the upper level will have a 5 meter by 3 meters by 3.5-meter-tall pergola – you may use a kit or build and design from scratch
  • You will have a single step down to the second circular area which will be 7 meters in diameter and have a 2.5 meter square hot-tub on the far side – this will need electrical, and you will acquire and facilitate the installation through the vendor
  • You will be able to step from the circular area to the yard on a paving stone path which will run out to the garden – the path will be 7 meters long and 1 meter wide – this path will have electrical yard lights
  • There will be a 25’ diameter area halfway down the path which will have a built in fire pit with seating (4 seats / benches) – the area will use gravel and border stones
  • All deck areas will be edged with decorative railing
  • The deck framing will set on 4”x4” footers which will be concreted 1 meter into the ground (below frost line) – you will used galvanized hangers to support frame supports
  • The lower area will have built in flower boxes 2’x 3’ – three of them
  • The upper area will have a gas grill with built in gas service
  • You will need a building permit and it will cost 50 dollars
  • All railing will have decorative lighting running along it
  • Both main deck areas will be fully landscaped around the perimeter with plants, decorative stones, perennials, and bushes. – your team will do the landscaping
  • You will have an experienced construction crew of 4 FTE’s which will cost $80/hour including benefits and 1.5-time overtime applies
  • You will have a team of 2 experienced landscape professionals who will cost $75/ hour and overtime applies.
  • Need a couple outdoor, 110 electrical outlets for Xmas lights, etc.
  • You will need electrical you will vendor out – determine cost
  • You will vendor out the hot-tub installation – determine cost
  • You will need a vendor to install and run the gas-line – determine cost
  • The deck will be fully sealed with a medium brown stain / preservative
  • You will use treated lumber for all framing, and you will decide on what product to use for surface boards (wood, synthetic, etc.)
  • The upper level will have two built in seats near the grill area (wood) – not under the pergola
  • You will need to determine the timeline – will precipitate from the Work Breakdown Structure
  • Assume you have all the tools you need
  • Any requirements not specifically stated are at your discretion.
  • A 5 foot by 12-foot 2×8 raised bed tomato and pepper area just to the left of where you might walk off the center of the upper deck with drip irrigation installed and drip irrigation faucet at one corner of the raised bed.

Project Deliverables (Documents to be created) – Everything will be due at the end of Week 7 (Sunday, As a team, it is extremely important to all of you that you participate in the creation of every document listed below in some way.  That you leave this course with the knowledge of what the document is for and what it typically contains. You will need to create all of the documents as a team and you will use those documents to create slides for your project status presentation using a Power Point.Documents:

  1. Project Charter
  2. RACI (you can use EXCEL)
  3. Statement of Work (SOW)
  4. Scope Document
  5. Very Basic Drawing https://financesonline.com/best-free-landscape-design-software/
  6. Procurement Process (materials and vendors)
  7. Assumptions and Constraints Document
  8. Risk and Issues Log (you can use EXCEL)
  9. Communication Plan (you can use EXCEL)
  10. Work Breakdown Structure (WBS) (you can use EXCEL)
  11. Quality Document
  12. Change Request Process Document
  13. Milestone Time-line Breakdown
  14. Budget (this will come out of the WBS)
  15. Project Status Report – this is prepared on a PowerPoint slide deck and will go to leadership.  The report must contain:
    1. Color coded status
    2. Budget Section
    3. Risk Section
    4. Issues Section
    5. Current past achievements
    6. Work areas currently underway (WIP – work in progress)

Part 3 – How to Approach the Group ProjectInternet Research – using the internet to research topics is a researcher’s best friend.  Possible topics:

  • Deck construction basics
  • Hot tubs for sale and installation
  • How to pick the best gas grill
  • How to run a gas line to a grill
  • Landscape planning
  • Estimating construction labor costs
  • Lowes or Home Depot sites for material costs
  • How to build a fire-pit and cost of materials
  • Procurement and contract basics
  • Building a deck flower box
  • Wayfair site for pergolas or patio furniture
  • How to build a pergola (YouTube videos)

Other resources:

  • Your textbook
  • UC Library

Final Note:I know that many of you are thinking “I have no experience with construction, building decks, landscaping, etc…”  What you must realize is that when you seek employment as a project manager, you will always have this conundrum of wondering how much you really need to know about the area of work the project lies within (telecom, healthcare, IT, travel, constructions, finance, insurance etc…) to be an effective, successful project manager.   Some employers will place great importance on the amount of knowledge you have in a particular area, others like myself, will not.  What you must be ready to do is learn/absorb as much knowledge in the area of project work as soon as possible.  Be ready to explore all your options to gain and find the knowledge you need to function effectively.  You need enough vocabulary and understanding to operate and communicate well. 

VBScript Database QueryLab Report

  

VBScript Database QueryLab Report

Task 4: Write and Run Database Query Program 1

In this scenario, we need to query the Computer database to determine which computers need to be replaced. Our decision will be based on the CPU speed, Number of Processors and the size of the Hard Drive.

· In the space provided in your Lab Report document, paste your modified VBScript program and the RUN.

 

In the table cell below, paste your ComputerReplace.vbs Program

In the table cell below, paste the desktop RUN from your ComputerReplace.vbs Program

  

Task 5: Write and Run Database Query Program 2

In this scenario, we need to upgrade our company computers based on the Operating System and the amount of memory. We want to ensure that all Fedora 10 machines are upgrade to Fedora 14 and all Windows XP machines are upgraded to Windows 7. If we find any computers with only 2 GB of memory, we will upgrade the memory to 4 GB.

 In the table cell below, paste your ComputerUpgrade.vbs Program