Questions
Input No. of triangle : 5 Area of triangle 1: 12.00 Area of triangle 2: 14.14...

Input

No. of triangle : 5

Area of triangle 1: 12.00
Area of triangle 2: 14.14
Area of triangle 3: 14.00
Area of triangle 4: 7.31
Area of triangle 5: 17.32
Area of triangle 6: 14.14

Output:
Triangle 5 has the largest area: 17.32

If i have to save those area (input) into array form. How can i compare and find out which triangle with the largest area.

In: Computer Science

Write a python program that uses a conditional loop to ask the user for distance and...

Write a python program that uses a conditional loop to ask the user for distance and gallons and calculates the MPG. The program should store data in a text file as shown below: Distance Gallons MPG 225 17 13.24 1374 64 21.47 2514 79 31.82

In: Computer Science

True or False. Explain Briefly. (9). If L1 and L2 are not in D, then L1...

True or False. Explain Briefly.

(9). If L1 and L2 are not in D, then L1 - L2 cannot be regular.

(10). If L1 and L2 are not in D, then L1 union L2 cannot be in D.

(11). Every infinite language has a subset that is not in D.

(12). If not H were in D then every SD language would be in D.

In: Computer Science

Question 1) Identify the type of bad smells and refactor the given code. 1. Code 1:...

Question 1) Identify the type of bad smells and refactor the given code.

1. Code 1:

public double sumSquaresArea ( L1, L2 )

{

area1 = smallSquareArea(L1);

area2 = bigSquareArea(L2);

return area1+area2

}

public double smallSquareArea ( L1)

{

area = L1 * L1;

return area;

}

public double bigSquareArea ( L2 )

{

area = L2 * L2;

return area;

}

2. Code 2:

class Student

{

private string name;

public void getStudentMarks ( );

}

class Course_Marks

{

private int course_id;

private string semester;

public void getStudentMarks ( );

}

3. Code 3:

public void accountInfo(string account_title, string account_number, string account_type)

{

// Generate Monthly Statement

if(account_type == “Current”)

{

// do something

}

else if (account_type == “Saving”)

{

// do something

}

else

{

//do something

}

  

//Account information

System.out.println(“***** Account Information *****”);

System.out.println(“Account_Title : ” , account_title);

System.out.println(“Account Number : ” , account_number);

System.out.println(“Account_Type : ” , account_type);

System.out.println(“Monthly Statement : ”, monthly_statement );

}

In: Computer Science

This should be written in C++. Create a class with the name "Student". private data members...

This should be written in C++.

Create a class with the name "Student".

private data members of the Student class should include:

int - rollno (roll number or id number of student)

string - name (name of student)

int - alg, datastruct, architect, proglang (hold scores out of 100 for these 4 classes)

float - per (average score of 4 classes above)

char - grade (letter grade based on per.. example 90 is an A)

public member functions of the Student class should include:

getdata() (function to accept data from user

showdata() (function to show data on screen

Create a constructor that initializes all int to 0, float to 0.0, char to ' ', name = "NoName".

Prompt the user for a valid class size.

Prompt the user for student data.

Store students in a vector.

Display student data including students average score and letter grade.

The following is an example:

Enter size of class: 0
Invalid class size

Enter size of class: 1

Enter the roll number of student: 45
Enter The Name of student: Trish Duce
Enter the grade in Algorithms out of 100: 88
Enter the grade in Data Structures out of 100: 94
Enter the grade in Architecture out of 100: 98
Enter the grade in Programming Languages out of 100: 92

Roll number of student: 45
Name of student: Trish Duce
Grade in Algorithms: 88
Grade in Data Structures: 94
Grade in Architecture: 98
Grade in Programming Languages: 92
Percentage of student is: 93
Grade of student is: A

In: Computer Science

What was the earliest and what was the latest time of the day we sold a...

What was the earliest and what was the latest time of the day we sold a product on 14.04.2015? Use column A from tab Data and explain how you got to your result

Please Tell me the steps on how this would be solved using Excel. Note that this is not the full excel data but just a small sample.

date_sign_up customer_id product_name marketing_channel City
4/17/2015 13:11 71041 Classic - 3 meals per week for 2 people Search Engine Marketing San Diego
4/14/2015 11:32 103289 Classic - 3 meals per week for 2 people Newsletters (internal) Los Angeles
4/14/2015 9:53 107746 Classic - 3 meals per week for 2 people Newsletters (internal) Los Angeles
4/14/2015 16:08 157441 Classic - 3 meals per week for 4 people Newsletters (internal) San Francisco
4/18/2015 8:04 158646 Classic - 3 meals per week for 2 people Newsletters (internal) San Diego
4/18/2015 15:41 178843 3 Meals (vegetarian) for 2 people TV / Radio Advertising Miami
4/15/2015 9:45 179297 Classic - 3 meals per week for 2 people Newsletters (internal) Philadelphia
4/15/2015 8:21 182439 3 Meals (vegetarian) for 2 people Newsletters (internal) San Francisco
4/17/2015 6:57 186180 Classic - 3 meals per week for 2 people Partnership Marketing San Diego
4/19/2015 20:39 190396 Classic - 3 meals per week for 2 people TV / Radio Advertising Miami
4/14/2015 10:26 194229 Classic - 3 meals per week for 2 people Search Engine Marketing Los Angeles
4/13/2015 20:17 194353 Classic - 3 meals per week for 2 people Search Engine Marketing Washington
4/15/2015 14:43 200286 Classic - 3 meals per week for 2 people Search Engine Marketing Philadelphia
4/16/2015 7:35 201307 Classic - 3 meals per week for 2 people TV / Radio Advertising 1San Diego
4/15/2015 6:54 203319 Classic - 3 meals per week for 2 people Newsletters (internal) San Francisco
4/14/2015 8:35 205233 Classic - 3 meals per week for 2 people TV / Radio Advertising Los Angeles
4/13/2015 12:08 205322 Classic - 3 meals per week for 2 people Newsletters (internal) Chicago
4/16/2015 5:04 205611 Classic - 3 meals per week for 2 people TV / Radio Advertising San Diego
4/15/2015 12:17 208066 3 Meals (vegetarian) for 4 people Newsletters (internal) Philadelphia

In: Computer Science

The purpose of this assignment is to allow you to understand scenarios and customer experiences in...

The purpose of this assignment is to allow you to understand scenarios and customer experiences in which AI and RPA can be used. You might need to do some additional research on specific technologies related to AI to complete the assignment.

First, select a current process that you face in your daily life. It might be something you face in your work, or at school, or in your personal life. For this process, complete the following:

1. Select a current process that you face in your daily life. It might be something you face in your work, or at school, or in your personal life. Use one or two paragraphs of text to explain the context for the process.

2. Create a simple process diagram describing this process. You can simply use boxes and arrows to identify the steps. Highlight which of those steps could be sources of “pain points” (that is, frustrate people interacting with the processes) and explain why. You will need to upload a file for this prompt.

3. Create a new version of the process where RPA and AI could be used to decrease (or even eliminate) the pain points. Your new process model should highlight the steps in which RPA and/or AI are used. For each use of RPA or AI technologies explain what that technology does and how you are using that specific technology. For each use of RPA or AI technologies explain how that technology would decrease (or even eliminate) the pain point.

In: Computer Science

Which four File Preference actions can you perform via GPOs?

Which four File Preference actions can you perform via GPOs?

In: Computer Science

Explain the differences between identification, authentication, and authorization.

Explain the differences between identification, authentication, and authorization.

In: Computer Science

I'm working with using recursion to find the sum and the min of these two arrays...

I'm working with using recursion to find the sum and the min of these two arrays respectively. So far what I have gives the correct answers when they run, however when I use a test code on them they fail because they cannot handle out of bounds points, for example if int[] sumMe = { } or if the position is set to the last number "89" in the array. I kinda know what I'm supposed to tell it but not how to properly implement it, if you could help be adjust the code to catch these out of bounds instances I'd very much appreciate it.
I'll put the failed messages for each of these under the test code I put down in case it helps.


public class test {
    public static void main(String[] args) {
        int[] sumMe = { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 };
        System.out.printf("Array Sum: %d\n", arraySum(sumMe, 0));


        int[] minMe = { 0, 1, 1, 2, 3, 5, 8, -42, 13, 21, 34, 55, 89 };
        System.out.printf("Array Min: %d\n", arrayMin(minMe, 0));
    }
    public static long arraySum(int[] data, int position) {
        if (position <= data.length && position >= 0) {
            if (data.length - 1 == position) {
                return data[position];
            }
            else {
                return data[position] + arraySum(data, position + 1);
            }
        }
        return 0;
    }

    public static int arrayMin(int[] data, int position) {
        int min;
        int i;
        min = data[position];
        for (i = 0; i < data.length; i++) {
            if (min > data[i]) {
                min = data[i];
                arrayMin(data, i++);
            }
        }
        return min;
    }
}

Failed test in arrayMin:

java.lang.AssertionError: ArrayMin must be able to handle position of
Expected :89
Actual :1

Failed test in arraySum:

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0

In: Computer Science

Case Study] (30 Marks) Showman House is a large event management company of New York. The...

Case Study]
Showman House is a large event management company of New York. The company organizes various types of events throughout the year. The events types include fashion shows, celebrity shows, chat shows, musical extravaganza, exhibitions, fairs, and charity shows.
Showman House organizes events of different types. The details of the various event types are stored in the Event Types file. This file contains data about the event type codes and the corresponding event types. Any attendee who wishes to organize an event needs to provide details about the nature of the event he wants to organize. Along with providing event details, he also makes the payment for the event. The payment for an event is made in instalments, according to the fee plan, which is stored in the Fee Schedules file. The Fee Schedules file maintains details such as fee schedule id, event id, fee description, and fee amount. An attendee needs to pay all the instalments of the payment, on or before the start date of the event.
All details related to an event such as event code, event name, event type code, location of the event, start date, end date, event description, number of people, and the staffing required for the event are stored in the Events file. The payment details that include payment amount, payment date, payment method id, and payment method description are also stored in the Events file. The details of an attendee such as attendee id, attendee name, and address are stored in the Attendees file.
Any event at Showman House is managed by an employee. The employee details such as employee id, first name, last name, title, and phone are stored in the Employees file.
The management of Showman House realize that it is difficult to maintain so much data manually. Therefore, they have decided to computerize the entire system of event management.
Blue Moon Computers have been assigned the task to computerize the system. The project team needs to perform the following tasks:
a. Identify the attributes of the various entities involved. The attributes should completely define the
entities.
b. Identify the primary and foreign keys in the tables.
c. Draw a diagram to show the relationships between various tables.

In: Computer Science

A10 – Overloaded Hospital "Overloaded Hospital", page 371, Number 15 Write a program that computes and...

A10 – Overloaded Hospital

"Overloaded Hospital", page 371, Number 15

Write a program that computes and displays the charges for a patient;s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered by the user:

The number of days spent is the hospital
The daily rate
Hospital medication charges
Charges for the hospital services (lab test, etc.)
The program should as for the following if the patient was an out-patient:

Charges for the hospital services (lab tests, etc.)
Hospital medication charges
The program should/will use two overloaded functions (defined in this chapter!) to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other functions accepts arguments for the out-patient information. Both functions should return the total charges and of course you will print these tot he screen.

Input Validation: Do not accept negative numbers for any data.

Please do not copy and paste someone elses code. It would really be awesome if someone explained the code to me.

In: Computer Science

In python 1.4. Write To a Text File Create a function that writes to a text...

In python

1.4. Write To a Text File Create a function that writes to a text file whatever data the user enters via keyboard. The user will first be asked to give the filename. Keep asking the user to enter data until they type Return without entering text. If the text file already exists then the data entered by the user is appended to the existing text file. The file you will write to will be named write_to_text_file.txt. Function name: create_text_file() Parameters/arguments: a filename Returns: 1 if a new text file was created, 0 if an existing text file was appended to

In: Computer Science

Point out the security risks involved in allowing fragmented packets to pass through a firewall, and...

Point out the security risks involved in allowing fragmented packets to pass through a firewall, and note how to mitigate this threat by preventing fragmented packets altogether.

In: Computer Science

SecDevOps - Over the past 5–10 years there has been a shift in product and service...

SecDevOps - Over the past 5–10 years there has been a shift in product and service development to use more agile methodologies to provide more continuous delivery.

QUESTION 1:

Considering the article below: Comment on at least two (2) security concerns with a DevOps model and how these concerns can be alleviated with a strong implementation of SecDevOps considerations.

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

Agility has become an unavoidable necessity in a fast-moving technology environment, but achieving it can be a challenge for organizations and their development teams. The DevOps philosophy provides a road map; following it is not always as easy.

Even more crucial than the need to transform the development process is the need to protect against ever more sophisticated threats and attacks. But some organizations are finding that agility and security can go hand in hand. SecDevOps is an approach to development that puts security right at the heart of DevOps by making it integral to the development cycle.

SecDevOps: Bridging the Gap Between Security and Agility

According to CIO Insight, organizations such as the endowment-based Dana Foundation have found the SecDevOps approach to be an effective way to bring security into DevOps. The result is faster development cycles and more robust security.

The Dana Foundation is primarily engaged in two fields: web activities related to grant management and publishing and outreach operations, including an annual brain awareness week. James Rutt, the company’s chief information officer (CIO), told CIO Insight that the organization was primarily concerned with “code quality and code security,” with a particular focus on protecting against known code vulnerabilities listed in the Open Web Application Security Project (OWASP) Top 10, such as cross-site scripting and forgery.

The SecDevOps approach helped the company speed up its development process while reducing code vulnerabilities by 40 to 50 percent. This impressive performance shows why and how security and agility can form a perfect partnership.

Building Security Into the DevOps Cycle

Experts have been preaching for years that security needs to be built in, not bolted on after the fact. But the combination of conventional, prolonged development cycles with a fluid security environment has made built-in security almost impossible to achieve. After all, if new versions of a software package were only released every couple of years, the security environment would be radically transformed between two successive versions. Developers had no choice but to bolt on new security features.

In the world of DevOps, the software development cycle has become dramatically faster — so much faster, in fact, that code development can now match the pace of new security challenges. Developers are no longer focused on fixing existing code to handle new security threats. Instead, they are constantly building new code as part of the DevOps cycle, which means that new security features can be built in as part of the overall development process. This is exactly what the security community has been preaching all along.

SecDevOps is not a magic trick, but a natural, organic way to approach new security needs in the context of ongoing code development. This is very good news for organizations that are shifting into the DevOps era.

In: Computer Science