According to NIST 800-61 r2, Incident response teams should use which staffing model?
|
All Employees |
||
|
Partially outsourced and partially employees |
||
|
All Outsourced |
||
|
Any of the above |
In: Computer Science
Write a C++ program that :
1. Allow the user to enter the size of the matrix such as N. N must be an integer that is >= 2 and < 11.
2. Create an vector of size N x N.
3. Call a function to do the following : Populate the vector with N2 distinct random numbers. Display the created array.
4. Call a function to determines whether the numbers in n x n vector satisfy the perfect matrix property. Look at the sample run for the exact output
5. Repeat steps 1 - 4 until the user terminates the program.
The program needs a main and 2 functions
In: Computer Science
FOR JAVA: Need to write a code for the implementation of this public static method: findLongestPalindrome takes a Scanner scn as its parameter and returns a String. It returns the longest token from scn that is a palindrome (if one exists) or the empty string (otherwise). (Implementation note: You'll find your isPalindrome method helpful here. This method calls for an optimization loop.)
In: Computer Science
Explain the difference between Arrays and ArrayList. What are the limitation of arrays? How many primitive data types Java have? Please list them out and list the corresponding wrapper classes for each type. What is the different between String class and StringBuilder class?
In: Computer Science
C++, Java, Python. Assume we have two sequences of values S1 containing 1, 5, 3, 6, 7, 8 while S2 containing 2, 5, 6, 9, 7. We’d store these two sequences as sets and performance set intersection and set difference. Write C++, Java, Python codes to do that respectively. Compare and contrast the readability and writability.
In: Computer Science
Please use Java language! with as much as comment! thanks!
Write a program that displays a frame with a three labels and three textfields. The labels should be "width:", "height:", and "title:" and should each be followed by one textfield. The texfields should be initialized with default values (Example 400, 600, default title), but should be edited by the user. There should be a button (label it whatever you want, I don't care). If you click the button, a new frame should become visible that has the title and dimensions the user entered in the textfields on the first frame (or the default values, if the user did not enter anything).
Use JPanels and the EXIT_ON_CLOSE statement. Give the first panel some proper dimensions using the setSize method.
In: Computer Science
PSUEDOCODE: Using whatever looping mechanism makes sense to you, create an algorithm that will display timing for a stopwatch.
Keep the following in mind:
In: Computer Science
Write code that classifies a given amount of money (which you store in a variable named amount), specified in cents, as greater monetary units. Your code lists the monetary equivalent in dollars (100 ct), quarters (25 ct), dimes (10 ct), nickels (5 ct), and pennies (1 ct). Your program should report the maximum number of dollars that fit in the amount, then the maximum number of quarters that fit in the remainder after you subtract the dollars, then the maximum number of dimes that fit in the remainder after you subtract the dollars and quarters, and so on for nickels and pennies. The result is that you express the amount as the minimum number of coins needed.
Please show me how to do it in the jupyter notebook.
In: Computer Science
Given an alphabet Σ, what are the languages L over Σ for which L ∗ is finite? How many such languages exist?
In: Computer Science
Stack ADT
What would you say is the most important drawback of using the stack that should be considered before choosing it for use in a real application? Typed out please.
In: Computer Science
C++... How do I separate a C String, entered by a user, by commas? Say they enter Frog,Wolf,Spider... I want a array containing the elements {Frog, Wolf, Spider}
thanks
Here's my idea so far...
cout << "Enter the column names (c of them), each name seperated by a comma" << endl;
char colNames[100];
cin >> colNames;
for (int i = 0; i < 99; ++i){
if (colNames[i] == ','){
//parse the string, assign that string name to that column
}
}
cout << colNames << endl;
In: Computer Science
Create an Entity relationship diagram (ERD) conceptual model for this case.
VINEYARD HOLDINGS AND GRAPE VARIETIES
VVI’s vineyard sources its wine from ten plots of land in separate locations from two
acres to twenty acres. Each vineyard has its own unique name, such as Rattlesnake
Canyon, Red Fox, Theresa’s, etc. and is either owned by VVI or by an independent third
party. Each is managed by a single employee. No employee manages more than one
vineyard. The location and size, measured in acres, of each vineyard is recorded. Each
vineyard is dedicated to the growing of a single grape variety per vintage year. However,
over time a particular vineyard may be replanted to a different grape variety, depending
on market demand for particular types of wine. The winery maintains a record of these
plantings.
VVI currently grows six different grape varieties: Cabernet Sauvignon, Merlot,
Zinfandel, Pinot Noir, Chardonnay, and Sauvignon Blanc. Information that is specific for
each grape variety and must be recorded includes the juice conversion ratio, a measure of
how much juice, on average, can be extracted from a given weight of a grape variety. The
wine storage requirement, which is the type of storage container (typically either stainless
steel tank or oak barrel) used to hold the juice while it ferments into wine, is also
recorded for each grape variety, as is the wine aging requirement, which is the measure of
how long the wine produced from the juice should be stored before bottling. Certain
measures related to the grapes that vary with the specific vintage year harvest are also
recorded including the vineyard the grapes come from, the total amount (weight) of
grapes harvested, and the ripeness of the grapes (expressed in % sugar).
WINE PRODUCTS AND BOTTLES
Information on the wines created from the grapes must, of course, be recorded. Each
wine produced is given a unique identification number in addition to its name. Other
information recorded for each wine is its vintage year, category (e.g., dry red, dessert,
etc.), and percent alcohol, a legal requirement. Also recorded is the employee in charge of
making that wine. Wine makers may be responsible for more than one wine at a time.
The composition of a wine may be entirely from a single grape variety or may be a blend
of more than one variety. The proportion of juice from each grape variety for each wine
produced must be recorded. Several of the grape varieties are used in more than one
blended wine. None of VVI wines are vineyard specified; that is, the wines are labeled by
the grape varieties contained in the wines only, without reference to specific vineyard
plots.
The wines are sold in case lots. The winery refers to these case lots as products. A
product is a specific wine in a specific bottle size in a specific case quantity sold at a
specific price. Each product type is given a unique product identification number. VVI
does not sell partial cases, nor does it mix wines or bottle types in a single case.
The bottles used for the wines vary in capacity, shape, and glass color. Each bottle type is
assigned a unique bottle identification code. VVI maintains an inventory count of how
many of each bottle type is currently on hand in their warehouse. The winery prefers to
keep at least a month’s worth of bottle inventory on hand. The usual cost per bottle is also
recorded for each bottle type to aid in pricing the products and as a guide in calculating
expected future bottle order costs.
The bottles must be purchased from outside glass vendors. Each of these vendors is
assigned a unique identification number. In addition to this number, each vendor’s name,
address, and phone are recorded. Also recorded, for each vendor, is the name of the
principal contact (i.e., account representative) at the vendor that handles the VVI account.
Bottles are acquired from the vendors by placing orders. Some bottle types may be
ordered from more than one vendor. Each order involves only a single vendor but may
include more than one bottle type. Usually orders are filled completely by the vendors,
but occasionally an order must be filled with multiple shipments, due to a back-order
condition at the vendor. VVI maintains careful records of what quantities are ordered and
what quantities are received, as well as when the bottles are ordered and when they are
received, and the actual price charged for the bottles.
In: Computer Science
note: USE C++ WITH USER DEFINED FUNCTIONS AND RECURSIVE FUNCTION ONLY. No C++ library function is allowed.
The game of “Jump It” consists of a board with n positive
integers in a row, except for the first
column, which always contains zero. These numbers represent the
cost to enter each column.
Here is a sample game board where n is 6:
0 3 80 6 57 10
The object of the game is to move from the first column to the last
column with the lowest total
cost.
The number in each column represents the cost to enter that column.
You always start the game
in the first column and have two types of moves. You can either
move to the adjacent column or
jump over the adjacent column to land two columns over. The cost of
a game is the sum of the
costs of the visited columns.
In the board shown above, there are several ways to get to the end.
Starting in the first column,
our cost so far is 0. We could jump to 80, then jump to 57, and
then move to 10 for a total cost
of 80 + 57 + 10 = 147. However, a cheaper path would be to move to
3, jump to 6, then jump to
10, for a total cost of 3 + 6 + 10 = 19.
Write a recursive function that solves this problem and returns
the lowest cost of a game board
represented and passed as an array.
Note: your function shouldn’t output the actual sequence of
jumps, only the lowest cost of this
sequence.
IMPORTANT: Use only user defined functions. No C++ library function is allowed. Please write it in a simple and elementary way.
In: Computer Science
PYTHON
In this lab we will design a menu-based program. The program will allow users to decide if they want to convert a binary number to base 10 (decimal) or convert a decimal number to base 2 (binary). It should have four functions menu(), reverse(), base2(), and base10(). Each will be outlined in detail below. A rubric will be included at the bottom of this document.
Menu()
The goal of menu() is to be the function that orchestrates the flow of the program. menu() should be the first thing called and should do the following:
Base2()
This function should take a number from the user and convert it into its binary representation then print it to the user. You can use your code from Lab1.
Base10()
This function should prompt the user for a binary number represented by a string and calculate the decimal number. Base10() should do the following:
for i in range(0,len(st)):
sum+=(int(st[i])*(2**i))
print(sum)
Remember that len returns the number of characters in a string and we can access a character by using the string name and an index number. st[0] would return the first character of the string in variable st. If we think about the conversion, we take the number and multiple by 2 raised to the power of the position number. If we reverse the string, we can use the index number as this position number because the string is indexed left-to-right. Which is the opposite of number positions are right-to-left. Thus, I can be used as our exponent.
Reverse()
#Name: Reverse
#Input: String s
#Output: String r
#Description: This function takes a string as input and reverses that string
#returning it as output.
def reverse(s):
r=""
for i in s:
r=i+r
return r
|
20 pts. |
The Menu() function achieves the goals given above. |
|
20 pts. |
Base2() takes in an int from the user and accurately converts it to binary |
|
20 pts. |
Base10() takes in and accurately converts a binary number to a decimal. The binary number is entered by the user. |
|
20 pts. |
Reverse() is implemented and called correctly. |
|
20 pts. |
Comments-There should be a comment block at the top that contains:
There should also be a comment before each function explaining
See reverse above. |
In: Computer Science
In: Computer Science