what are cloud computing security concerns and their countermeasures
In: Computer Science
Explain and demonstrate a Linked List by adding following items into a Linked List: 10, 30, 15, 25 (show your work, you may write on paper and upload if you prefer)
In: Computer Science
I. Describe the differences between discretionary access control model and mandatory access control model
II. File permissions in Linux can be also represented in digits from 0-7 for the owner, group and others with reading as the most significant bit (E.g., the value 6 represents the permission right rw- for a file). Suppose a file in Linux has the permission as the digits 764.
• What does this permission right indicate for the owner/user, group and others?
• What is the letter representation of this permission right?
In: Computer Science
develop a recursive function to compute LCS (x,y)
In: Computer Science
i'm getting an infinite loop on this code: can you explain what I should do?
public class TriviaLinkedList {
private TriviaNode head;
private int items;
public TriviaLinkedList(TriviaNode head, int items) {
this.head = head;
this.items = items;
}
public TriviaNode getHead() {
return head;
}
public void setHead(TriviaNode head) {
this.head = head;
}
public int getItems() {
return items;
}
public void setItems(int items) {
this.items = items;
}
public String toString() {
return "head=" + head + ", items=" + items;
}
public void insertList(TriviaNode node){
if(head == null){
head = node;
}
else {
TriviaNode node1 = head;
head = node1;
head.next = node1;
}
this.items++;
}
public void deleteList(int id){
TriviaNode first = head;
TriviaNode second = head;
while(first!=null) {
if(first.getGame().getId() == id) {
if(first == head) {
head = first.next;
}
else if(first.next != null) {
second.next = first.next;
}
else {
second.next = null;
this.items--;
System.out.println("Game: "+id+" was deleted");
return;
}
second = first;
first = first.next;
}
System.out.println("Unfortunately Game: "+id+" was not found");
}
}
}
In: Computer Science
| Question 1 Afariwa farm operates a large farm on which cow are raised. The farm manager Kofi Manu determined that for the cow to grow in the desired fashion, they need at least minimum amounts of four nutrients. Kofi Manu is considering three different grains to feed the cow. The table below lists the number of units of each nutrient in each kilogram of grain, the minimum daily requirements of each nutrient for each cow, and the cost of each grain. The manager believes that as long as a cow receives the minimum daily amount of each nutrient, it will be healthy and produce a standard amount of meat. The manager wants to raise the cow at minimum cost.
b) Use solver to find optimal solution and sensitivity report. c) Management have asked you to determine the optimal solution. Write your answer in a form of a report to be submitted to the management. (d) Advice the management about objective function value corresponding to your answer in (b). |
In: Computer Science
Research the System Stability Index (SSI). Write a brief summary of its purpose and why it might be a useful tool for a server admin.
Research the netstat command-line tool. Write a brief summary of its usage, options, and why it might be a useful tool for a server admin
In: Computer Science
In: Computer Science
Given a stack S and an element x, write a recursive algorithm that returns True if x is in S, or False otherwise. Note that your algorithm should not change the content in S. What is the time complexity of your algorithm?
In: Computer Science
Write a loop that sets newScores to oldScores shifted once left, with element 0 copied to the end. Ex: If oldScores = {10, 20, 30, 40}, then newScores = {20, 30, 40, 10}.
--------------Code Below-----------
#include <iostream>
using namespace std;
int main() {
const int SCORES_SIZE = 4;
int oldScores[SCORES_SIZE];
int newScores[SCORES_SIZE];
int i;
for (i = 0; i < SCORES_SIZE; ++i) {
cin >> oldScores[i];
}
/* Your solution goes here */
for (i = 0; i < SCORES_SIZE; ++i) {
cout << newScores[i] << " ";
}
cout << endl;
return 0;
}
In: Computer Science
Given a positive integer n, write a recursive algorithm that returns the number of the digits in n. For example, if the given number n is 12345, the algorithm should return 5. What is the time complexity of your algorithm?
In: Computer Science
Fill in the code only using pointer variables
#include
using namespace
std; int main() {
int longside; // holds longside (length)
int wideside; // holds wideside(width)
int total; // holds total (area)
int *longsidePointer = nullpointer; // int pointer which will be set to point to length
int *widthPointer = nullpointer; // int pointer which will be set to point to width
cout << "Please input the longside of the rectangle" << endl;
cin >> longside;
cout << "Please input the wideside of the rectangle" << endl;
cin >> wideside;
// Fill in code to make longsidePointer point to longside(length) (hold its address)
// Fill in code to make widesidePointer point to wideside(width) (hold its address)
total = // Fill in code to find the total(area) by using only the pointer variables
cout << "The total is " << total << endl;
if (// Fill in the condition longside(length) > wideside(width) by using only the pointer variables)
cout << "The longside is greater than the wideside" << endl;
else if (// Fill in the condition of wideside(width) > longside(length) by using only the pointer variables)
cout << "The wideside is greater than the longside" << endl;
else
cout << "The wideside and longside are the same" << endl;
return 0;
}
}
In: Computer Science
The user will input a dollar amount as a floating point number; read it from input using a Scanner and the .nextDouble() method. Convert the number of dollars into a number of whole (integer) cents, e.g., $1.29 = 129 cents. Determine and output the optimal number of quarters, dimes, nickels, and pennies used to make that number of cents.
Ex: if the input is
1.18
The output should be
4 1 1 3
for 4 quarters, 1 dime, 1 nickel, 3 pennies.
Hints
(STARTING CODE)
import java.util.Scanner;
public class Change {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
/* Type your code here. */
}
}
In: Computer Science
Given a stack S and an element x, write a recursive algorithm that returns True if x is in S, or False otherwise. Note that your algorithm should not change the content in S. What is the time complexity of your algorithm?
In: Computer Science
I ALREADY HAVE THE CORRECT ANSWERS. CAN YOU EXPLAIN TO ME HOW AND/OR WHY THESE ARE THE ANSWERS? THANK YOU :)
int a(int &x, int y) { x = y; y = x + 1; return y;
}
int b(int &x, int y) { y = x + 1; x = y; return y;
}
void c(int x, int y) { if (x > 2) return; cout << y; c(x + 1, y - 1);
}
int main() {
int x[2][3] = {{1, 2, 3}, {4, 5, 6}};
int y[3] = {7, 8, 9};
cout << x[1][1] << endl; // line (a)
y[0] = a(y[0], y[1]);
cout << y[0] << y[1] << endl; // line (b)
cout << b(x[0][2], x[1][2]) << endl; // line (c)
cout << x[0][2] << x[1][2] << endl; // line (d)
c(0, 4); cout << endl; // line (e)
}
(a) What is the output from the instruction beginning on line (a)?
Answer: 5
(b) What is the output from the instruction beginning on line (b)?
Answer: 98
(c) What is the output from the instruction beginning on line (c)?
Answer: 4
(d) What is the output from the instruction beginning on line (d)?
Answer: 46
(e) What is the output from the instruction beginning on line (e)?
Answer: 432
In: Computer Science