Computer Science

      In the main method, write the Java code that computes an estimate of pi based on the percentage of numbers from a random sampling that are relatively prime (e.g., coprime). The instructions for createArray and percentageRelativelyPrime along with the source code for gcd are given below. (a) Prompt the user for two integers: a number of samples (numSamples) and a maximum random number (maxRandom). (b) Make two calls to createArray to populate two arrays (array1 and array2 ) with numSamples integers from 1 to maxRandom, including the endpoints. (c) Call the method percentageRelativelyPrime with the actual parameters array1 and array2, storing the return value in a double variable percent. (d) Print the result of the following equation with six (6) positions after the decimal. πestimate = r 6.0 percent (e) Ask the user if they would like to continue. Repeat the above steps until the user elects to stop.

     Write a new method in the same class as the method main to create an array of random integers and return the reference of the array. (a) The public and static method named createArray accepts two (2) integer formal parameters and returns an integer array reference variable. (b) The two formal parameters define the size of the array to be created and the maximum value to be stored in the array. (c) Declare an integer array reference variable and array object with the number of elements from the size parameter. Should the size parameter be zero or negative, create an array of size one hundred (100). (d) Fill the integer array with random values based on the following expression: R∗maxV al+1, where R is a call to Math.random() and maxV al is the maximum value parameter. Should maxV al by zero or negative, replace the maximum value parameter with one hundred (100). (e) Return the array reference variable to the calling method. 

    Write a new method in the same class as the method main to repeatedly call the gcd method (given below) for every corresponding pair of elements from two integer arrays and return the percentage of pairs that were relatively prime. (a) The public and static method named percentageRelativelyPrime accepts two (2) integer array formal parameters and returns a double value  (b) The two formal parameters A and B are arrays of equal length. Iterate through the elements of the arrays and increment a counter whenever Ai and Bi are relatively prime (i.e., their greatest common divisor is 1). (c) Compute and return the counter divided by the number of elements in an array 

 public static int gcd(int number1, int number2) { int smaller = Math.min(number1,number2); for(int lcv = smaller; lcv > 1; lcv–) { if(number1 % lcv == 0 && number2 % lcv == 0) return lcv; //the gcd of number1 and number 2 } return 1; //number1 and number2 are relatively prime } 

microsoft SDL

 Due Date: 11:59 pm EST Sunday of Unit 7 Points: 100 Overview: There are several common practices used to secure software development in Microsoft’s SDL as well as in all Secure Software Development Lifecycles (SSDLCs).  List and describe these practices.  Instructions: From our readings of Microsoft’s SDL and SafeCode’s “Fundamental Practices for  Secure Software Development” (3rd Edition, March 2018) list and describe the practices  added for security and commonly found in an SDL or SSDLC that are not found in the  standard SDLC approaches. Requirements: • Should target your organization’s senior leadership • 2–3 page APA paper excluding title and reference pages  • Provide at least two references and in-text citations in APA format (these will  preferably be in addition to the main text)  • College level writing  • Should be your own work in your own words 

Security Training Program

 Please is important to refer to the attached document for the powerpoint presentation.

Urgently due tomorrow.

Module 06 Course Project – Security Training Program

The policies that you have created and modified have received final approval from management.

You have been asked to do the following:

  • Develop a security training program for the staff to ensure that the updated and new policies are fully understood.

For this submission, you will:

  • Create a PowerPoint presentation to be used for training the staff.
  • Highlight ALL changes whether they are new policies or changes to existing policies.
  • Provide 10 – 15 slides and include speaker notes.
  • Make your presentation clear and use an appropriate and influential tone to engage staff so that the new policies and changes are easily understood.
  • Use professional language, proper grammar and spelling.

In this assignment, you will design

  

In this assignment, you will design a program to perform the following task:
Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user.
Before attempting this exercise, be sure you have completed all of chapter 8 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter. There are 3 main components of your submission including the problem analysis, program design and documentation, and sample test data.
1. Provide your analysis for the following problem statement: You need to write a program that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user.
 

Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output? What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe any necessary formulas and sample calculations.
2. Provide your program design for the problem you analyzed for calculating and displaying the area and perimeter of a rectangle. Always work for modular design where possible. Be sure to use separate functions for calculating the area and perimeter of the rectangle. Other subprograms for Input and Output should be included as needed. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls, and a Hierarchy chart for the program (see figure 3.8 page 148). Finally, display the flow charts (using Raptor, or your favorite graphics editor) for each module. (See figure 5.3 page 225 as an example.)
 

Include header and step comments in your pseudocode, using a similar approach as the example provided in section 2.3 (textbook page 86). See example 2.8 on pages 87-88).
3. Prepare at least 3 sets of input data (Test data) along with expected output for testing your program. Your test data can be presented in the form of a table as was shown in Assignment 1.
 

PLEASE PUT THE ANSWERS IN THIS FORMAT
 

Problem definition: Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length and width) are provided by a user.
 

A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section.
 

B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.

 C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.
 

easy and own words, discussion topic, one page only,

 

discussion deals with Operating systems and its vulnerabilities.  An  operating system is defined as the following:  A software that manages  the hardware and software of a system.  It also provides the User  Interface that allows humans to interact with the system. As much of the  information is either created and/or stored in the system, securing the  OS requires a thorough understanding of the Operating system and how to  secure it.  There are many different types of operating systems that  exist, either for desktops, routers, switches, servers, and mobile  devices.

In the previous week’s discussion, you identified and discussed a system and its vulnerabilities. 

  1. Based on the definition above, please identify the operating  system.  Provide recommendations on how you would secure and harden the  operating system to ensure it has been configured more securely.
  2. Based on the system and its operating system, please research the  vendor and its website to identify any hardening guides and documents  you may find.  You may also research other sources on the Internet for a  hardening guide.  Some of useful sites you may visit are the following: 
    • SANS Information Security (Links to an external site.)  – SANS is a valuable information Security resource.  SANS organization  has been recognized within the Information Security community as an  indispensable tool for all security needs.  The reading room serves as  the repository on thousands of white papers and documents regarding  information security.  It has templates on creating InfoSec policies and  guidelines on how to configure IT systems securely.
    • Best Practices and How To Articles (Links to an external site.)  – Here is a collection of Information Security policy documents, best  practices, and how to articles for Information Security.  It can be used  to help develop hardening documents.
    • National Vulnerability Database Repository (Links to an external site.)  – National Institute of Standards and Technology is a government agency  that is tasked with developing standards on all technology, from IT to  non-IT technology and things like standard weights and measure.  Many  regulations that drive Information Security reference NIST as a source  for standard methodologies used in the industry.
  3. Based on your research, please list and discuss any operating system  configuration that needs to be evaluated and hardened.  Please identify  the default setting and what it needs to be to ensure a higher level of  security.  You should also indicate the importance of the setting.

Assignment

Answer each these questions in a paragraph with at least five sentences: Include the question and number your responses accordingly. Provide a citation for each answer.

1. What kind of speech was the First Amendment written to protect?

2. Does the First Amendment apply only to spoken words?

3. What does it mean that laws regulating speech must be content neutral?

4. Why are common carriers prohibited from controlling the content of the material they carry? 

5. How does the Supreme Court determine whether material is obscene?

6. Why have attempts to censor the Internet failed in the US?

7. Why not just ban spam? 

8. Why did Facebook ban Alex Jones and Louis Farrakan?

9. Should websites that show how to 3d print guns be banned? 

10. According to the Supreme Court ‘anonymity is a shield from the tyranny of the majority’. What does that mean?