1) What are firewalls and intrusion detection systems?
2)Why are encryption applications an important security tool?
3)What kind of budgeting does your job use? What are the pain points that management feels because of this? Where are you seeing the benefit, or the problems, that result, and would another budgeting model work better?
In: Computer Science
Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "Too small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline. Example output for ounces = 7:
42 seconds
#include <stdio.h>
void PrintPopcornTime(int bagOunces) {
}
int main(void) {
int userOunces;
scanf("%d", &userOunces);
PrintPopcornTime(userOunces);
return 0;
}
2. Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline. Example output with input 2:
1: Lather and rinse. 2: Lather and rinse. Done.
Hint: Declare and use a loop variable.
#include <stdio.h>
/* Your solution goes here */
int main(void) {
int userCycles;
scanf("%d", &userCycles);
PrintShampooInstructions(userCycles);
return 0;
}
In: Computer Science
please write above 800 -1000 words
What is your
definition of AI? Please explain.
What is your opinion of AI, is the technology currently available?
Why or why not?
Please note at least four AI technologies, explain if they are
truly AI or something else. Thoroughly explain your answer.
How is AI perceived as different in various industries and
locations? Please explain.
In: Computer Science
#include<stdio.h>
#include<stdlib.h>
struct listNode{
int data;
struct listNode *nextptr;
};
typedef struct listNode node;
void insert(node*);
void showList(node*);
void printListBackwards(node *);
int main(void)
{
node *list1;
printf("\n Create a sorted list..");
printf("\n Enter values for the first list (-999 to end):");
list1=(node*)malloc(sizeof(node*)); //Allocate memory for the list
node
insert(list1); //insert values by calling the function insert
showList(list1); //display values entered by user
printf("\n After recursively reversing the list is :\n");
printListBackwards(list1); //print the values in reverse order
using the function
return (0);
}
void insert(node *list)
{
printf("\n Enter data :");
scanf("%d",&list->data);
if(list->data ==-999) //end data entry if -999
{
(list->nextptr);
}
else
{
list->nextptr = (node *)malloc(sizeof(node));
insert(list->nextptr);
}
}
void showList(node *list)
{
node *p;
for (p=list;p->nextptr !=NULL;p=p->nextptr) //loop until the
end of list and print values
printf("%d",p->data);
if(list->nextptr ==NULL) //if the list does not have nodes
{
printf("\n The list is empty!");
}
}
void printListBackwards(node *list)
{ if(list->nextptr ==NULL) //if the end of list is
encountered
return;
else //if there are nodes in the list,use the function recursively
to print the list
{
printListBackwards(list->nextptr);
printf("%d",list->data);
}
}
can you provide a pseudocode for this program
In: Computer Science
Write a program that prompts the user to enter a 3 x 3 matrix of double values and tests whether it is a positive Markov matrix. There will be two methods which will be called from the main method: public static double [] [] createArray() 1. Creates a 3 by 3 two dimensional array of doubles 2. Prompts the user for values as shown in the sample run 3. Stores the numbers in the array in the order entered 4. Returns the array to the main method public boolean isMarkovMatrix(double [][] matrix) 1. Returns false if any value in the array is negative 2. Prints the sum of each column in the array 3. Returns false if any the sum of any of the columns is not equal to 1.0 4. Otherwise, it returns true. Sample Program running: Enter a 3 x 3 matrix by row 0.15 0.875 0.375 0.55 0.005 0.225 0.30 0.12 0.4 The sum of the columns 1.0 1.0 1.0 It is a Markov matrix Enter a 3 x 3 matrix by row -0.2 0.875 0.375 0.75 0.005 0.225 0.45 0.12 0.4 The sum of the columns 1.0 1.0 1.0 It is not a Markov matrix A response in Eclipse Java would be much appreciated. Thank you in advance
In: Computer Science
Based on the review of the materials for this week, compare the risks associated with internal versus external security threats. What are your thoughts on the question of whether internal or external threats pose the biggest problems for organizations? Support your answer with logical commentary and at least one practical example
In: Computer Science
Write a Java program that outputs the output below
Student Name: Andrew Johnson
Course: Biology 101
Quiz Average and percent weight (separated by a space):
87 15
Project Average and percent weight (separated by a space):
92 25
Exam Average and percent weight(separated by a space): 85
40
Final Exam and percent weight (separated by a space):
83 20
Final Grade in Biology 101 for Andrew Johnson is 86.7
The largest average was 92
The smallest average was 83
Thank you for using my grade program!!
In: Computer Science
PYTHON: Im writing a program to make a simple calculator that can add, subtract, multiply, divide using functions. It needs to ask for the two numbers from the user and will ask the user for their choice of arithmetic operation
1- subtract
2- add
3- divide
4- multiply
In: Computer Science
Complete the program to read in values from a text file. The values will be the scores on several assignments by the students in a class. Each row of values represents a specific student's scores. Each column represents the scores of all students on a specific assignment. So a specific value is a specific student's score on a specific assignment. The first two values in the text file will give the number of students (number of rows) and the number of assignments (number of columns), respectively.
For example, if the file contains:
3
4
9 6 10 5
2 2 0 0
10 10 9 10
then it represents the scores for 3 students on 4 assignments as follows:
Assignment 1 | Assignment 2 | Assignment 3 | Assignment 4 | |
Student 1 | 9 | 6 | 10 | 5 |
Student 2 | 2 | 2 | 0 | 0 |
Student 3 | 10 | 10 | 9 | 10 |
The program should:
1) Read in the first two values to get the number of students and number of assignments. Create a two-dimensional array of integers to store all the scores using these dimensions.
2) Read in all the scores into the 2-D array.
3) Print the whole array, row by row on separate lines, using Arrays.toString() on each row of the array
3) Print the average of the scores on each assignment. For example, if the data is given in the above example, the output would be:
Array of scores:
[9, 6, 10, 5]
[2, 2, 0, 0]
[10, 10, 9, 10]
Average score of each assignment:
Assignment #1 Average = 7.0
Assignment #2 Average = 6.0
Assignment #3 Average = 6.333333333333333
Assignment #4 Average = 5.0
Starter Code:
import java.util.Scanner;
import java.io.File; //needed to open the file
import java.io.FileNotFoundException; //needed to declare possible
error when opening file
import java.util.Arrays; //for the Arrays.toString() method
public class Scores {
public static void main(String[] args) throws FileNotFoundException
{
//create a Scanner to get input from the keyboard to ask the user
for the file name
Scanner keyboard = new Scanner(System.in);
System.out.println("What is the name of the file containing the
scores?");
//create another Scanner to read from the file
String fileName = keyboard.nextLine();
Scanner fileScan = new Scanner(new File(fileName));
//TODO: read in the values for the number of students and number of
assignments using the Scanner on the file
//TODO: create a 2-D to store all the scores and read them all in
using the Scanner on the file
System.out.println("Array of scores:");
//TODO: print the entire array, row by row, using
Arrays.toString()
System.out.println("Average score of each assignment:");
//TODO: compute and print the average on each assignment
In: Computer Science
Your task is to create a Java application that converts a specified amount of one currency into another currency for a user. The application must meet the following requirements:
1. Upon execution, the application shall display a brief welcome message to the user to let her know she is running the currency converter application.
2. The application shall allow a user to convert amounts between any two of the following currencies: United States Dollars (USD), British Pounds (GBP), Swiss Francs (CHF), and Indian Rupees (INR).
3. The application shall prompt the user for the following input: the currency she wishes to convert from (“source currency”); the amount of currency to be converted (“requested amount”) as either a decimal or a whole number (e.g., 21.45, 1.748484, or 34); and the currency she wishes to convert to (“result currency”).
4. The application shall limit the amount of the currency to be converted to no more than 1,000,000 (one million) units of that currency; if the user attempts to enter an amount larger than this number, the application should return a message alerting the user that she has exceeded the maximum amount, and prompt her to enter another amount.
5. The application shall handle incorrect user input (e.g., if the user inputs a character or string for the “requested amount” value) and prompt the user for correct input.
6. The application shall prevent the user from attempting to convert to a “result currency” that is the same as the “source currency” (e.g., the user should be prevented from converting United States Dollars to United States Dollars).
7. The application shall output the following information: the amount of the “result currency” that is equivalent to the “requested amount” in the “source currency”; this amount shall be returned as a decimal figure rounded to two decimal places (e.g., 67.49).
8. The application shall allow the user to exit the program at any time by accepting input of an exit character (for example “Q” for quit) to terminate the program.
9. After the user has successfully converted a currency, the application shall prompt the user to either perform another conversion or terminate the program.
10. Upon program termination, the application shall display an exit message to the user.
Program Data Your program should use the following data for currency conversions.
USD GBP CHF INR
USD 1.000000 1.227902 1.012514 0.013950
GBP 0.814349 1.000000 0.824820 0.011365
CHF 0.987370 1.212602 1.000000 0.013777
INR 71.687245 88.022221 72.582298 1.000000
In: Computer Science
1. Design a FA for the language L = {w : na(w) ≤ 4}.
2. Design a FA that accepts all strings that contain the substring aba.
3. Design a FA for the language L = {ai baj : i, j ≥ 0, i + j is odd}
4. Design a FA for the language L = {bnam : n ≤ 2, m ≥ 3}
In: Computer Science
Please write code in java and comment. Thanks. I would appreciate that.
Fitness Task:
public interface Fitness
Anaerobic Task:
(10pts) Anaerobic is a Fitness and we cannot give the actual implementation for the methods muscleTargeted() as we don't know the actual Anaerobic exercise. The descripton() method returns the string Anaerobic means "without oxygen.". Note that Anaerobic is a good candidate to be abstract class.
Define class yoga which are Anaerobic fitness exercises. Use the following table to define the classes. The classes also have:
Exercise Type | Muscle affected |
---|---|
Yoga | Triceps,Biceps |
public class Profile
Assume the weight is in kgs, height in meters and gender is enum data type called Gender. In addition, this class must contain:
public class DailyExercise
public class WeeklyExercise
In: Computer Science
(Python)####But, what if we need just a sequence without
brackets, i.e., we want to have
####1, 2, 3, 4,... and not [1, 2, 3, 4, 5, ...]?
####We can do this:
##print(*accum, sep=", ") ## *accum 'unpacks' the list accum.
Ask for the left and the right range bounds with input:
##
##leftB = int(input('Enter the left bound: '))
##rightB = int(input('Enter the right bound: '))
## and if (rightB - leftB) is odd then print the list of the
numbers in this range,
## if (rightB - leftB) is even then print just sequence (no
brackets []) of the numbers in this range.
##
In: Computer Science
Processor/CPU Management
I. Five processes, J1, J2, J3, J4 and J5. arrive in the Ready Queue in sequence, one second apart. Each job takes 1 millisecond to load into memory. Each job will take 10, 2, 3, 1, 5 seconds to run respectively. Questions
A. Create a Google Sheet where each column represents a Job and reach row represents a second..
B. Show the state of the Ready Queue in the 7th second, the 11th second and the 20th second using the First Come, First Served, Shortest Job Next, Shortest Remaining Time First, amd Round Robin with time quantum of 2 seconds.
C. Which one is most efficient? Discuss advantage and disadvantage. Double spaced, one pag
In: Computer Science
Consider the three transactions T1, T2 and T3, and the schedules S1, S2, S3 and S4 given below. Which of the schedules is (conflict) serializable? The subscript for each database operation in a schedule denotes the transaction number for that operation. For each schedule, show all conflicts, draw the precedence graph, determine and write down if it is serializable or not, and the equivalent serial schedules if exist.
T1: r1(x); w1(x);
T2: r2(x);
T3: r3(x); w3(x);
S1: r1(x); r3(x); w1(x); r2(x); w3(x);
S2: r1(x); r3(x); w3(x); w1(x); r2(x);
S3: r3(x); r2(x); w3(x); r1(x); w1(x);
S4: r3(x); r2(x); r1(x); w3(x); w1(x);
In: Computer Science