Questions
REGARDING RISK ASSESSMENT What are the control measures currently in use to protect against network threats?...

REGARDING RISK ASSESSMENT

What are the control measures currently in use to protect against network threats? What are the network-related vulnerabilities found by the risk assessment team?

PLEASE MAKE COPY PASTE AVAILABLE

MUST BE 250 WORDS

In: Computer Science

Need Advise, As a Student in Business Analyst and Data mining what steps should i take...

Need Advise, As a Student in Business Analyst and Data mining what steps should i take as a student to make myself more competitive for a current job market in the U.S.

Thanks.

In: Computer Science

I'm very confused on how to complete this code. There are 5 total classes. I have...

I'm very confused on how to complete this code. There are 5 total classes. I have some written but it isn't quite working and the Band class especially is confusing me. I posted the entire thing since the band and manager class refer to the other classes' constructors and thought it would be helpful to post those as well.

Person class is a base class:

Private variables

String firstname, String lastname, int age

Constructor has the parameters String firstname, String lastname, int age.

Add Getter and setter methods for all of the member variables.

Instrument:

It has private member variables: an int year, a String make, int yearIntroduced, String model, String type.

String type must be one of the valid values ‘guitar’, ‘drum’, ‘bass’, ‘keyboard’, ‘wind’, ‘bass’, ‘keyboard’. You must check the valid value in the constructor to be one of these values or print out an error that "Wrong type of instrument:" with the type that is given as a parameter in the constructor.

Constructor has the parameters String make, String model, String type, int yearIntroduced and an int year. You can check the validity of the type by one of three methods,

  • an if then else statement
  • a case statement
  • an array which contains all the valid values and you search whether the type is one of these values, etc. The last one is more challenging but you will learn more about arrays.

Methods:

toString() prints the values of the Instruments as follows

"Instrument type guitar with make Gibson with model Les Paul in year 2019 was first introduced in 1962".

Musician

A musician is a Person. It has additional member variables a list of Instruments.

It has two Constructors.

1. First constructor has has String firstname, String last name, int age, and Instruments[] instruments.

2. Second constructor has String firstname, String last name, int age. It sets a default array with 5 elements as instruments for the musician which are initially empty.

Consider the additional member variable you need to keep track the number of instruments and add it to the class.

Methods:

getInstruments() method returns the list of instruments the musician plays. What is the type that this method return?  

addInstrument(Instrument ins) adds an instrument to the list of instruments that the musician plays. If the caller adds another instrument beyond 5 elements, it prints an error.

“The musician can only play at most 5 instruments”. Here 5 is the size of the array. If the array size is a different integer, print that integer.

setInstrument(Instrument[] instruments) sets the instruments that a musician plays to an array given by the caller of the method.

Band

This class has String name, a list of Musicians, and a Manager manager as variable.

It has two constructors

1. String name and a list of Musicians

2. String name, a list of Musicians and a Manager

Methods:

setManager(Manager m) sets the manager of the band.

getManager() returns the manager of the band (what should this return?)

calculateMax() returns the Musician which plays the largest number of instruments.

getName returns the name of the Band.

setName sets with the name of the Band.

Manager:

is a type of Person.

It has an additional variable bands, which is list of Bands( a Band array).

Constructor 1. must have String firstname, String lastname, int age. It sets up the bands variable to be an array of 5 Bands.

Methods:

addBand() takes a Band parameter and adds it to the contents of the bands variable.

getBands() returns a list of bands.

Test cases:

  • Must instrument all the constructors
  • Must instrument all the methods.
  • Create an instrument with the values make:”gibson” type:”failedguitar” year:2019, yearIntroduced: 1965, model:”les paul” This must write an error.
  • Create a musician who plays 5 instruments. Create an additional valid instrument. Add the instrument to the musician. It should not add and print an error. See the definition for the format of the error.

Tips and Tricks:

  • Please attempt Instrument and Person objects first, then Musician! Then attempt Band, and Manager in this order.
  • Keep track of the size of the array in Instruments assigned to a musician. For example, if you create a default array with 5 elements, there are no instruments assigned yet. Every time you add an Instrument, you have to add it to the NEXT empty spot in the array. In order to do this, use a private class variable numInstruments.
  • The instruments may be "set" by a setter method externally for the musician. In this case, the array size is fixed by the parameter as you are replacing the default array created. In the body of the array method, find the number of the instruments by the length of the array. For example, if a person plays only three instruments and a setInstruments method was used, it is not possible to extend it beyond capacity. Consequent addInstrument method must return the error.
  • All the variables are private. Don't redeclare the variables in the subclasses AGAIN! To construct a subclass, use the superclass's super method with the exact number of parameters for the super class. For example, Musician's constructor can call Person's constructor by using super but the signature of the call must match the signature of the super class' constructor method.

In: Computer Science

question1: students' scores: mark: 81 john: 99 smith: 66 Meggie: 100 terry: 20 William: 65 a....

question1:

students' scores:

mark: 81

john: 99

smith: 66

Meggie: 100

terry: 20

William: 65

a. Modify the student's score program so that it reads the exam scores into a queue and prints the queue.

–Next, filter out any exams where the student got a score of 100.

–Then perform your previous code of reversing and printing the remaining students.

b. What if we want to further process the exams after printing?

In: Computer Science

QUESTION 1) Which of the following statements is correct? Group of answer choices: a) Logistic regression...

QUESTION 1)

Which of the following statements is correct?

Group of answer choices:

a) Logistic regression extends the idea of linear regression to the situation where the OUTCOME variable is categorical

b) Logistic regression extends the idea of linear regression to the situation where a PREDICTOR variable is categorical

c) Linear regression extends the idea of logistic regression to the situation where a PREDICTOR variable is categorical

d) Linear regression extends the idea of logistic regression to the situation where the OUTCOME variable is categorical

QUESTION 2)

Which statement is correct with regard to describing the odds of belonging to class 1 in a binary classification model?

Group of answer choices:

a) The ratio of the probability of belonging to class 1 to the probability of belonging to class 0

b) The probability of belonging to class 1

c) The ratio of the probability of belonging to class 0 to the probability of belonging to class 1

d) The probability of belonging to class 0

QUESTION 3)

What is the range for the value of Log Odds, or as it's called the logit?

Group of answer choices:

a) -  to +

b) 0 to +

c) 0 to 1

d) -1 to +1

QUESTION 4)

What is the interpretation of “log odds = 0” in a binary classification model?

Group of answer choices:

a) The probability of belonging to class 1 is zero

b) The probability of belonging to class 1 is undeterminable

c) The probability of belonging to class 1 is almost zero

d) The probability of belonging to class 1 is 0.5

QUESTION 5)

Which of the following statements is NOT a difference between Linear and Logistic Regression?

Group of answer choices:

a) Linear regression is more suitable for explanatory purpose, while logistic regression is more suitable for predictive purpose

b) In linear regression, the relationship between Y and the beta coefficients is non-linear. Whereas in logistic regression, the relationship between Y and the beta coefficients is linear.

c) Linear regression is more suitable for predictive purpose, while logistic regression is more suitable for explanatory purpose

d) In linear regression, the relationship between Y and the beta coefficients is linear. Whereas in logistic regression, the relationship between Y and the beta coefficients is non-linear.

Thank you so much for the help! (Data Analytics)

In: Computer Science

REGARDING RISK ASSESSMENT What’s the recommendation by the risk assessment team? What are the final decisions...

REGARDING RISK ASSESSMENT

What’s the recommendation by the risk assessment team? What are the final decisions made by HGA management? Justify their decisions based on cost benefit analysis.

PLEASE MAKE COPY PASTE AVAILABLE

MUST BE 250 WORDS

In: Computer Science

Write the following Python script: Imagine you live in a world without modules in Python! No...

Write the following Python script:

Imagine you live in a world without modules in Python! No numpy! No scipy! Write a Python script that defines a function called mat_mult() that takes two lists of lists as parameters and, when possible, returns a list of lists representing the matrix product of the two inputs. Your function should make sure the lists are of the appropriate size first - if not, your program should print “Invalid sizes” and return None. Note: it is actually tricky to make a useful list of zeros. For instance, if you need to start with a 5 row, 6 column double list of 0, you might be tempted to try:

'''

thing = [ [ 0 ] ∗ 6 ] ∗ 5

'''

and if you look at it in the console window, it would appear to be a 5 by 6 list of lists containing all zeros! However - try the following and see what happens:

'''

thing [ 2 ] [ 5 ]

thing

'''

Notice that the item in index 5 of every row has changed, not just the row with index 2! Given the difficulty, I will give you the line of code that will create a list of lists that is num_rows by num_cols:

'''

ans = [ [ 0 for col in range ( num_cols ) ] for row in range ( num_rows ) ]

'''

In: Computer Science

Subject: Computer Graphics. 1. Explain how the projection process works; explain the various terms 2. Derive...

Subject: Computer Graphics.

1. Explain how the projection process works; explain the various terms

2. Derive the Npar Transformation matrix for parallel projection.

In: Computer Science

JAVA (1) Create two files to submit: Payroll.java - Class definition PayrollClient.java - Contains main() method...

JAVA

(1) Create two files to submit:

  • Payroll.java - Class definition
  • PayrollClient.java - Contains main() method

Build the Payroll class with the following specifications:

  • 4 private fields
    • String name - Initialized in default constructor to "John Doe"
    • int ID - Initialized in default constructor to 9999
    • doulbe payRate - Initialized in default constructor to 15.0
    • doulbe hrWorked - Initialized in default constructor to 40
  • 2 constructors (public)
    • Default constructor
    • A constructor that accepts the employee’s name, ID, and pay rate as arguments. These values should be assigned to the object’s name, ID, and payRate fields.
  • 7 public member methods (mutators, accessors, and other) (8 pts)
    • getName()
    • getID()
    • setPayRate() & getPayRate()
    • setHrWorked() & getHrWorked()
    • A method named grossPay that returns employee’s gross pay (=hrWorked * payRate)

(2) In main(), create two Payroll objects: one use the info inputted by the user, and the other use the default constructor, and print the info for each employee (2 pts)

Ex:

Enter the name, ID, pay rate, and hours worked of an employee:
Linda Smith
1234
20.5
35


Employee Records: 
Name            ID           Pay Rate      Hrs Worked     Gross Pay 
Linda Smith     1234         $20.50/hr     35.0          $717.50
John Doe        9999         $15.00/hr     40.0          $600.00

In: Computer Science

Please use Python 21. Rock, Paper, Scissors Game Write a program that let's the user play...

Please use Python

21. Rock, Paper, Scissors Game Write a program that let's the user play the game of rock, paper, scissors against the computer. The program should work as follows: 1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computers choice yet.) 2. The user enters his or her choice of “rock,” “paper,” or “scissors” at the keyboard. 3. The computer’s choice is displayed. 4. A winner is selected according to the following rules: - If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) - If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) - If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock) - If both players make the same choice, the game must be played again to determine the winner.

Here is what I have but I keep getting an error.

import random

def generateRandomNumber():
randomNumber = random.randint(1, 3)
return randomNumber

def getComputerChoice( randomNumber ):
if randomNumber == 1:
computerChoice = "rock"
elif randomNumber == 2:
computerChoice = "paper"
elif randomNumber == 3:
computerChoice = "scissors"
  
return computerChoice

def getUserChoice():
userChoice = input("please enter your choice:")
return userChoice

def determineWinner( userChoice, computerChoice):
rockMessage = "The rock smashes the scissors"
scissorMessage = "Scissors cuts paper"
paperMessage = "Paper wraps rock"
winner = "no winner"
message = ""
  
if computerChoice == "rock" and userChoice == "scissors":
winner = "Computer"
message = rockMessage
elif computerChoice == "scissors" and userChoice == "rock":
winner = "You"
message = rockMessage
  
if computerChoice == "scissors" and userChoice == "paper":
winner = "Computer"
message = scissorMessage
elif computerChoice == "paper" and userChoice == "scissors":
winner = "You"
message = scissorMessage
  
if computerChoice == "paper" and userChoice == "rock":
winner = "Computer"
message = paperMessage
elif computerChoice == "rock" and userChoice == "paper":
winner = "You"
message = paperMessage
  
return winner, message

def startAgain():
randomNumber = generateRandomNumber()
computerChoice = getComputerChoice( randomNumber)
userChoice = getuserChoice()
print( "The computer chose", computerChoice)
winner, message = determineWinner( computerChoice, userChoice )
  
if winner != "no winner":
print( winner, "won(", message, ")" )
  
return winner

def main():
randomNumber = generateRandomNumber()
computerChoice = getComputerChoice( randomNumber)
userChoice = getuserChoice()
print( "The computer chose", computerChoice)
winner, message = determineWinner( computerChoice, userChoice )
  
if winner != "no winner":
print( winner, "won(", message, ")" )
  
while winner == "no winner":
winner = startAgain()
main()

NameError                                 Traceback (most recent call last)
<ipython-input-2-a1b2d5e39fa7> in <module>
     73     while winner=="no winner":
     74         winner = startAgain()
---> 75 main()

<ipython-input-2-a1b2d5e39fa7> in main()
     64     randomNumber = generateRandomNumber()
     65     computerChoice = getComputerChoice( randomNumber)
---> 66     userChoice = getuserChoice()
     67     print( "The computer chose", computerChoice)
     68     winner, message = determineWinner( computerChoice, userChoice )

NameError: name 'getuserChoice' is not defined

In: Computer Science

: Q19: In a broad sense, why is the STUXNET virus important?

: Q19: In a broad sense, why is the STUXNET virus important?

In: Computer Science

Make a C++ program that outputs these following numbers: 10 5 9 10 8 15 7...

Make a C++ program that outputs these following numbers: 10 5 9 10 8 15 7 20 6 25

Please do not use functions. Only use while loop.

Thank you :)

In: Computer Science

Write a simple Java code to make a Binary Tree for the following tree: Don’t use...

Write a simple Java code to make a Binary Tree for the following tree: Don’t use serializable interface implantation

/** Class to encapsulate a tree node. */

protected static class Node implements Serializable {

In: Computer Science

Write a complete Java program that does the following: Open an input file named data.txt that...

Write a complete Java program that does the following:

  • Open an input file named data.txt that consists of a series of unknown number of integers. If data.txt does not exist, give an appropriate error message and terminate the program.
  • Define a constant MAX of value 100 and create an array of size MAX to hold items from the input file. Make sure your program will not generate ArrayIndexOutOfBounds exception.
  • Open an output file named result.txt and write the array elements in reverse order to result.txt. Make sure you write only the array elements that contain valid data items to the output file.

In: Computer Science

Java program to print all the powers of 2 below a certain number. Calculate sum, accept...

Java program to print all the powers of 2 below a certain number. Calculate sum, accept upper limit and make sure sum variable is long type.  

Run-

Enter the upper limit: 100

5 + 8 + 9 + 11 + 20 + 32 + 30 = 115

In: Computer Science