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

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 between 200 and 300 words

In: Computer Science

Mention the model fit indices for determining the predictive accuracy of classification methods.

Mention the model fit indices for determining the predictive accuracy of classification methods.

In: Computer Science

Can you give a java code example of using a singleton pattern and factory pattern design...

Can you give a java code example of using a singleton pattern and factory pattern design together?

In: Computer Science

Using Java, design a program that creates an array of Card objects, shuffles them, then recursively...

Using Java, design a program that creates an array of Card objects, shuffles them, then recursively sorts them by value and then recursively sorts them by value and suit



You will need to create a Card class with the following two fields:
• value (a String)
• suit (a String)
You may include any other fields, constructors, or methods as needed.
Your single array will need to contain 52 card objects, one for each value of each suit. The values to use are 2-10, J, Q, K, and A, with A being the card with the highest value. The suit values to use are H (for Hearts), D (for Diamonds), C (for Clubs), and S (for Spades).
After building the array, shuffle the array using the Fisher-Yates Algorithm. You must implement this algorithm yourself. After shuffling, print each object’s value and suit to show the array was shuffled. The output for each object printed should be VALUE - SUIT. For example: 2 - H.
Then, you’ll need to recursively sort the array based on the values. All 2 cards should be at the beginning and all A cards should be at the end; The suit is irrelevant here. After sorting, print each object’s value and suit again to show the array was sorted based on the cards’ values.Finally, you’ll recursively sort the array based on the values and suit. Clubs should be first, then Diamonds, then Hearts, then Spades. Each suit should be sorted from 2-A. After sorting, print each object’s value and suit again to show the array was sorted based on the cards’ values and suits.


please comment

In: Computer Science

#include<iostream> using namespace std; int main() {    int number_resistors;    double Resistors;    double series;...

#include<iostream>

using namespace std;

int main() {

   int number_resistors;

   double Resistors;

   double series;

   double parellel;

   cout << "how many resistors: ";

   cin >> number_resistors;

   while (number_resistors != 0)
   {
       cout << "Enter the values of" << number_resistors << " resistors ";

       for (int i = 0; i < number_resistors; i++) {

           cin >> Resistors;

           series += Resistors;

               parellel += 1 / (Resistors);

       }

       parellel = 1 / parellel;

       cout << "series resistance is " << series << endl;

       cout << "parellel resistance is " << parellel << endl;

       cout << "reenter the number of resistors and zero is not accepted " << endl;

       cin >> number_resistors;

   }

   return 0;

}

my code is not working and i not know why

In: Computer Science

write a python script to calculate 401k with compounding interest

write a python script to calculate 401k with compounding interest

In: Computer Science

Write a program named filemaker.py in python that will be used to store the first name...

Write a program named filemaker.py in python that will be used to store the first name and age of some friends in a text file named friends.txt. The program must use a while loop that prompts the user to enter the first name and age of each friend. Each of these entries should be written to its own line in the text file (2 lines of data per friend). The while loop should repeat until the user presses Enter (Return on a Mac) for the name. Then, the file should be closed and a message should be displayed. See Sample Output. SAMPLE OUTPUT Enter first name of friend or Enter to quit Denny Enter age (integer) of this friend 24 Enter first name of friend or Enter to quit Penny Enter age (integer) of this friend 28 Enter first name of friend or Enter to quit Lenny Enter age (integer) of this friend 20 Enter first name of friend or Enter to quit Jenny Enter age (integer) of this friend 24 Enter first name of friend or Enter to quit File was created

In: Computer Science

For some reason another programmer has asked you to write a function. The function is called...

For some reason another programmer has asked you to write a function.

The function is called getWarYear ( ) It has one parameter , an integer.

if it is 1 return a random number in the range of 1914 to 1919.

if it is 2 return a random number in the range of 1938 to 1945.

Since the function is returning an year the data type of the return value is an integer.

In: Computer Science

In this lab, you will write a function that takes five (5) doubles as input and...

In this lab, you will write a function that takes five (5) doubles as input and passes back the mean (average) and the standard deviation. Your function should be named mean_std and it should return the mean (a double) and pass the standard deviation (also a double) back by reference.

The mean and standard deviation are a common calculation in statistics to express the range of "typical" values in a data set. This brief article explains how to calculate the standard deviation: http://www.mathsisfun.com/data/standard-deviation.html (Just the first part, up to where it says "But ... there is a small change with Sample Data".

Use the pow and sqrt functions from the cmath library in your function.

Passing in five separate numbers in five variables is annoying, but we haven't talked yet about passing around sets of numbers. That'll come in the next module.

Pay attention! You are passing back the two calculated values not printing them to the screen! There is no user input/output in this problem! Use what is given.

#include <iostream>
// including cmath to get access to pow and sqrt
#include <cmath>
using namespace std;

// put your function here, and name it mean_std


// main will be called when you are in "Develop" mode, so that you can put testing code here
// when you submit, unit tests will be run on your function, and main will be ignored
int main() {
   return 0;
}

In: Computer Science

Program 3: Give a baby $5,000! Did you know that, over the last century, the stock...

Program 3: Give a baby $5,000! Did you know that, over the last century, the stock market has returned an average of 10%? You may not care, but you’d better pay attention to this one. If you were to give a newborn baby $5000, put that money in the stock market and NOT add any additional money per year, that money would grow to over $2.9 million by the time that baby is ready for retirement (67 years)! Don’t believe us? Check out the compound interest calculator from MoneyChimp and plug in the numbers!

To keep things simple, we’ll calculate interest in a simple way. You take the original amount (called the principle) and add back in a percentage rate of growth (called the interest rate) at the end of the year. For example, if we had $1,000 as our principle and had a 10% rate of growth, the next year we would have $1,100. The year after that, we would have $1,210 (or $1,100 plus 10% of $1,100). However, we usually add in additional money each year which, for simplicity, is included before calculating the interest.

Your task is to design (pseudocode) and implement (source) for a program that 1) reads in the principle, additional annual money, years to grow, and interest rate from the user, and 2) print out how much money they have each year. Task 3: think about when you earn the most money!

Lesson learned: whether it’s your code or your money, save early and save often…

Sample run 1:

Enter the principle: 2000

Enter the annual addition: 300

Enter the number of years to grow: 10

Enter the interest rate as a percentage: 10

Year 0: $2000

Year 1: $2530

Year 2: $3113

Year 3: $3754.3

Year 4: $4459.73

Year 5: $5235.7

Year 6: $6089.27

Year 7: $7028.2

Year 8: $8061.02

Year 9: $9197.12

Year 10: $10446.8

Sample run 2 (yeah, that’s $9.4MM):

Enter the principle: 5000

Enter the annual addition: 1000

Enter the number of years to grow: 67

Enter the interest rate as a percentage: 10

Year 0: $5000

Year 1: $6600

Year 2: $8360

Year 3: $10296

Year 4: $12425.6

Year 5: $14768.2

.

.

Year 59: $4.41782e+06

Year 60: $4.86071e+06

Year 61: $5.34788e+06

Year 62: $5.88376e+06

Year 63: $6.47324e+06

Year 64: $7.12167e+06

Year 65: $7.83493e+06

Year 66: $8.61952e+06

Year 67: $9.48258e+06

please in pseudocode and c++. thank you! sorry about that.

In: Computer Science

Background Information: Global Treps: Many people are familiar with the television show called Shark Tank where...



Background Information:
Global Treps: Many people are familiar with the television show called Shark Tank where entrepreneurs (sometimes called “treps”) present their business ideas to a group of investors or sharks. Several colleges, high schools, and even elementary schools throughout the world hold unique versions of a shark tank like event. You believe that creating a non-profit organization with one central mobile-friendly website/application to assist groups in organizing these types of events would spark even more entrepreneurs throughout the world. You would plan to hold several shark tank like events during the term of the project and create a site and applications to help continue developing more global treps. This site/application would include the following capabilities:
Provide guidelines and templates for running a shark tank type of event
Accept donations from potential investors targeted toward specific schools or organizations wishing to host an event (similar to the popular DonorsChoose.org site where people can fund teacher’s requests)
Accept ideas for needed new products or services
Provide the ability for organizations to create their own custom site to solicit local participants and sharks, accept applications, and promote the winners as well as losers
Research ideas for a mechanism where a certain percentage of all donations and profits earned by contestants are donated back to the Global Treps organization
Provide an online version of the events by showing videos of contestants and live reactions of the sharks while also getting live inputs and donations from viewers
Change the Laws Campaign: Launch a global campaign to change laws to reduce further income inequality and promote social responsibility. This project would also involve creating a mobile-friendly website/application that would include information about current and proposed laws, allow discussions of potential ideas to change laws, organize people to contact appropriate lawmakers, etc.
Wealthy Unite: Develop a system to enable the richest people in the world to provide their input on how they can make the world a better place. Provide information on what several people are currently doing (i.e., Bill Gates, Warren Buffet, famous celebrities, etc.) to promote philanthropy. Allow others to donate to suggested causes and recommend other ways to reduce economic inequality.
Global Smart Shoppers: Develop a mobile app and website that recommends products and services produced by organizations that promote social responsibility. Customize the app so it works in any country in the user’s desired language. Work with large companies that do not currently sell products or services in certain countries to expand to regions in need. Allow small companies to easily add their products and services to the shopping network.

Questions
1. Summarize each of the proposed projects in the Running Case section using a simple table format suitable for presentation to top management. Include the name of each project, identify how each one supports business strategies, assess the potential financial benefits and other benefits of each project, and provide your initial assessment of the value of each project. Write your results in a one- to two-page memo to top management, including appropriate back-up information and calculations.

In: Computer Science

C programming - Implement a dynamic array, please read and implement the dynarray.c file with what...

C programming - Implement a dynamic array, please read and implement the dynarray.c file with what is given

dynarray.h

/*
* This file contains the definition of the interface for the dynamic array
* you'll implement. You can find descriptions of the dynamic array functions,
* including their parameters and their return values, in dynarray.c. You
* should not modify anything in this file.
*/

#ifndef __DYNARRAY_H
#define __DYNARRAY_H

/*
* Structure used to represent a dynamic array.
*/
struct dynarray;

/*
* Dynamic array interface function prototypes. Refer to dynarray.c for
* documentation about each of these functions.
*/
struct dynarray* dynarray_create();
void dynarray_free(struct dynarray* da);
int dynarray_size(struct dynarray* da);
void dynarray_insert(struct dynarray* da, void* val);
void dynarray_remove(struct dynarray* da, int idx);
void* dynarray_get(struct dynarray* da, int idx);
void dynarray_set(struct dynarray* da, int idx, void* val);

#endif

dynarray.c

#include

#include "dynarray.h"

/*
* This is the definition of the dynamic array structure you'll use for your
* implementation. Importantly, your dynamic array implementation will store
* each data element as a void* value. This will permit data of any type to
* be stored in your array. Because each individual element will be stored in
* your array as type void*, the data array needs to be an array of void*.
* Hence it is of type void**.
*
* You should not modify this structure.
*/
struct dynarray {
void** data;
int size;
int capacity;
};

/*
* This function should allocate and initialize a new, empty dynamic array and
* return a pointer to it. The array you allocate should have an initial
* capacity of 2.
*/
struct dynarray* dynarray_create() {
return NULL;
}

/*
* This function should free the memory associated with a dynamic array. In
* particular, while this function should up all memory used in the array
* itself (i.e. the underlying `data` array), it should not free any memory
* allocated to the pointer values stored in the array. In other words, this
* function does not need to *traverse* the array and free the individual
* elements. This is the responsibility of the caller.
*
* Params:
* da - the dynamic array to be destroyed. May not be NULL.
*/
void dynarray_free(struct dynarray* da) {
return;
}

/*
* This function should return the size of a given dynamic array (i.e. the
* number of elements stored in it, not the capacity).
*/
int dynarray_size(struct dynarray* da) {
return 0;
}

/*
* This function should insert a new value to a given dynamic array. For
* simplicity, this function should only insert elements at the *end* of the
* array. In other words, it should always insert the new element immediately
* after the current last element of the array. If there is not enough space
* in the dynamic array to store the element being inserted, this function
* should double the size of the array.
*
* Params:
* da - the dynamic array into which to insert an element. May not be NULL.
* val - the value to be inserted. Note that this parameter has type void*,
* which means that a pointer of any type can be passed.
*/
void dynarray_insert(struct dynarray* da, void* val) {
return;
}

/*
* This function should remove an element at a specified index from a dynamic
* array. All existing elements following the specified index should be moved
* forward to fill in the gap left by the removed element. In other words, if
* the element at index i is removed, then the element at index i+1 should be
* moved forward to index i, the element at index i+2 should be moved forward
* to index i+1, the element at index i+3 should be moved forward to index i+2,
* and so forth.
*
* Params:
* da - the dynamic array from which to remove an element. May not be NULL.
* idx - the index of the element to be removed. The value of `idx` must be
* between 0 (inclusive) and n (exclusive), where n is the number of
* elements stored in the array.
*/
void dynarray_remove(struct dynarray* da, int idx) {
return;
}

/*
* This function should return the value of an existing element a dynamic
* array. Note that this value should be returned as type void*.
*
* Params:
* da - the dynamic array from which to get a value. May not be NULL.
* idx - the index of the element whose value should be returned. The value
* of `idx` must be between 0 (inclusive) and n (exclusive), where n is the
* number of elements stored in the array.
*/
void* dynarray_get(struct dynarray* da, int idx) {
return NULL;
}

/*
* This function should update (i.e. overwrite) the value of an existing
* element in a dynamic array.
*
* Params:
* da - the dynamic array in which to set a value. May not be NULL.
* idx - the index of the element whose value should be updated. The value
* of `idx` must be between 0 (inclusive) and n (exclusive), where n is the
* number of elements stored in the array.
* val - the new value to be set. Note that this parameter has type void*,
* which means that a pointer of any type can be passed.
*/
void dynarray_set(struct dynarray* da, int idx, void* val) {
return;
}

In: Computer Science

2) You've been hired by Superfluous Stats to write a C++ console application that analyzes a...

2) You've been hired by Superfluous Stats to write a C++ console application that analyzes a string. Prompt for and read from the user a string that may contain spaces. Then prompt for and read from the user a single character. Print the following stats about the string and character inputs. Use formatted output manipulators (setw, left/right) to print the following rows about the string:

          ● The string value.

          ● The string length.

          ● The spot, if any, where the character is found within the string.

And the following rows about the character:

          ● The character value.

          ● Whether the character is an alphabetic character.

          ● Whether the character is a numeric character.

          ● Whether the character is a punctuation character.

And columns:

          ● A left-justified label.

          ● A right-justified value.

Define constants for the column widths. The output should look like this:

Welcome to Superfluous Stats

----------------------------

Enter a string: Detroit Michigan

Enter a character: r

String s

Value:                  Detroit Michigan

Length:                               16

Index:                                 3

Character c

Value:                                 r

Is alpha?                              2

Is digit?                              0

Is punctuation?                        0

End of Superfluous Stats

Note that you may get a value for true that is not 1. Do not use this sample input for the final run that is pasted below.

In: Computer Science

For the following function, what are the best types for the parameters (can be used for...

For the following function, what are the best types for the parameters (can be used for all parameters)? (best = will not cause errors, will compute what is intended.)

For example, if you select "string" that means that a call with 3 string values—add_and_mult("Hi", "bye", "llama") is a great choice.

def add_and_mult(num1, num2, num3):
    sub_val1 = num1 * 60
    sub_val2 = (sub_val1 + num2) * 60
    answer = sub_val2 + num3
    print("Wow! that's " + str(answer))

A. int

B. float

C. string

D. boolean

In: Computer Science

can you please look at the following code and fix it for me so that it...

can you please look at the following code and fix it for me so that it does not have any syntax errors. also can you tell me what was fixed

/**
* Driver program to demonstrate calling methods of Client class.
*
* @author Doyt Perry/Tina Comston
* @version Fall 2019
*/
public class ClientDemo
{
public static void main()
{
/**
* main method - makes this an executable program.
*/
// create a client with placeholder values
System.out.println("Client with default information");
// Create a client object using first constructor
Client client1 = new Client();
  
// Display information about the client
System.out.println(client1.toString());
  
System.out.println();
System.out.println("Create a client by providing information");
// client last name - Jameson
// client first name - Rebecca
// client age - 32
// client height - 65
// client weight - 130
Client client2 = new Client("Jameson", "Rebecca",
32, 65, 130);
  
// Display information about the client
System.out.println(client2.toString());

// Display the first name
System.out.println("original first name = " +
client2.getfirstname());
  
// set the first name to the value Rachel
client2.setFirstName("Rachel");
  
// Retrieve and dislplay the client first name
System.out.println("new first name = " +
client2.getFirstName());
  
// Display information about the client
System.out.println(client2.toString());

// set their weight to 180
client2.setWeight(180);
  
// Display information about the client
System.out.println(client2.toString());
}
}

In: Computer Science