Questions
Write a Python program that asks the user to enter the monthly costs for the following...

Write a Python program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile:

  1. Loan payment
  2. Insurance
  3. Gas
  4. Oil
  5. Tires
  6. Maintenance

Write a function that takes these six items as arguments and computes the total cost of these expenses.

Write a main program that asks the user for these six items and calls your function.

Print total monthly cost and the total annual cost for these expenses.

Your function should not have any input statements or print statements (except for debugging print statements).

In: Computer Science

Explain the crypto-economy concept of blockchain? Explain how cryptographic hash function is applied to protect the...

Explain the crypto-economy concept of blockchain? Explain how cryptographic hash function is applied to protect the integrity of blockchain transactions and to detect double-spending attack. State the property of the hash function that is relevant for each application.

In: Computer Science

Question is based on AWS Fortinet 7000 What is application ID in an application firewall and...

Question is based on AWS Fortinet 7000

What is application ID in an application firewall and how is it used? What does a firewall signature mean?

In: Computer Science

Complete the code that inserts elements into a list. The list should always be in an...

Complete the code that inserts elements into a list. The list should always be in an ordered state.

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

#include <stdio.h>
#include <stdlib.h>

/* list of nodes, each with a single integer */
struct element {
struct element *next;
int value;
};

/* protypes for functions defined after main */
struct element *elementalloc(void);
struct element *listinitialize();
struct element *insertelement(struct element *, int);
void printlist(struct element *);

/* main
* Creates an ordered list
* Elements added to the list must be inserted maintaining the list
* in an ordered state
*/
int main() {
struct element *listhead = NULL;
listhead = listinitialize();
for (int i = 3; i < 100; i+=11){
listhead = insertnewelement(listhead, i);
}
printlist(listhead);
}

/* allocate memory for a new list element */
struct element *elementalloc(void) {
return (struct element *)malloc(sizeof(struct element));
}

/* simple list initialization function */
struct element *listinitialize() {
const int numbers[7] = {4, 9, 13, 18, 27, 49, 60};
struct element *newlist = NULL;
struct element *tail = NULL;
struct element *temp = NULL;
for (int i = 0; i < 7; i++) {
if (newlist == NULL) {
newlist = elementalloc();
newlist->next = NULL;
newlist->value = numbers[i];
tail = newlist;
} else {
temp = elementalloc();
temp->value = numbers[i];
temp->next = NULL;
tail->next = temp;
tail = tail->next;
}
}
return newlist;
}

/* function to insert elements into an ordered list */
struct element *insertnewelement(struct element *listhead, int x) {
struct element *newelement;
newelement = elementalloc();

struct element *iter = listhead;
while( ) {

}

return listhead;
}

/* print the list and the respective memory locations in list order */
void printlist(struct element *listhead)
{
while (listhead != NULL) {
printf("Memory: %p contains value: %d\n", listhead, listhead->value);
listhead = listhead->next;
}
}

In: Computer Science

"Social engineering attacks are not only becoming more common against enterprises and SMBs, but they're also...

"Social engineering attacks are not only becoming more common against enterprises and SMBs, but they're also increasingly sophisticated. With hackers devising ever-more clever methods for fooling employees and individuals into handing over valuable company data, enterprises must use due diligence in an effort to stay two steps ahead of cybercriminals." Digital Guardian (Links to an external site.) Read the article "Social Engineering Attacks: Common Techniques & How to Prevent an Attack (Links to an external site.)" on the Digital Guardian web site. Summarize the advice given by the practitioners included in the article to recommend the process or procedure you would use to prevent the social engineering attacks you included in the Discussion of this lesson.

In: Computer Science

in java (just a line of code will do) Your program will read in the text...

in java (just a line of code will do)

Your program will read in the text file, word by word. You are to ignore leading and trailing punctuation and capitalization (i.e., "Castle", "castle?", and "CASTLE" are all equivalent to castle). Convert all words to lower case on input, or you can use case-insensitive comparisons - your choice. You will be putting the words into several implementations of linked lists and comparing the results. If, after trimming punctuation, a "word" consists of no letters, then discard the word. Such a case might arise if your word-reading strategy assumes that every word is delimited by spaces, in which case, a dash would constitute a "word", but would not contain any letters, so it would be discarded (for example, "comparisons - your choice" should be three words, though your space-delimited parser might identify "-" as a fourth "word", but the “-“ should be discarded).

In: Computer Science

How can I make sure (test) a reverse program that returns the same array with the...

How can I make sure (test) a reverse program that returns the same array with the same values as you entered before, but just in reverse order?

Example of the program im talking about:

void reverseArray(int arr[], int start, int end)

{

    int temp;

    while (start < end)

    {

        temp = arr[start];   

        arr[start] = arr[end];

        arr[end] = temp;

        start++;

        end--;

    }   

}  

In: Computer Science

1. The Context Diagram is one of the first diagrams to be generated in an SDLC....

1. The Context Diagram is one of the first diagrams to be generated in an SDLC.
      If the External Entities are not correctly identified when developing the Context Diagram,
      explain the effect on the Event Table and the Use Case Diagram.
     Explain also how the Context Diagram and Event Table could be tested to ensure accuracy

2. Subject is System Analysis and Design

In: Computer Science

PROBLEM 3: Given the following relational database table: Patients(ID, name, symptom, days_in_hospital) The following insertions are...

PROBLEM 3: Given the following relational database table: Patients(ID, name, symptom, days_in_hospital) The following insertions are performed on the table Patients: Insert record <20, Johnson, cough, 3> Insert record <10, Black, fever, 5> Insert record <30, Miller, fever, 10> Insert record <70, Brown, fatigue, 2> Insert record <60, Grant, headache, 4> Insert record <50, Miller, nausea, 15> Insert record <90, Brown, cough, 8 > Assume each block in the Patients file can store up to 2 patient records. Do the following: 1. Assuming that Patients is organized as a heap file, show the contents of the file after the last insertion. 2. Assuming that Patients is organized as a sequential file with days_in_hospital as the ordering field, show the contents (i.e. the data values as well as the associated block/bucket/record addresses) of the file after the last insertion. 3. Assuming that Patients is organized as an index-sequential file on the search key days_in_hospital and assuming that the primary index, the secondary index on ID, and the secondary index on name have been created, show the contents of Patients, the primary index, and the two secondary indices after the last insertion. 4. Given the index-sequential file organization as described in (3), explain step-by-step how the DBMS would conduct search on this file organization to answer the following SQL query: select name from Patients where ID between 30 and 60

In: Computer Science

A computer manufacturer offers the possibility of purchasing computers via the Internet. The customer can select...

A computer manufacturer offers the possibility of purchasing computers via the Internet. The customer can select a computer on the manufacture’s web page. The computers are classified into servers, desktops and portables. The customer can select a standard configuration or can build a desired configuration online. The configurable components are presented as pick lists of available options. For each new configuration, the system can calculate price. To place an order, the customer must fill out the shipment and payment information. Acceptable payment methods are credit cards and checks. Once the order has been entered, the system sends a confirmation e-mail message to the customer with details of the order. While waiting for the arrival of the computer, the customer can check the order status online at any time. The back end order processing consists of the steps needed to verify the customer’s credentials and payment method, to request the ordered configuration from the warehouse, to print an invoice, and to request the warehouse to ship the computer to the customer. Consider the following extended requirements: The customer uses the manufacturer’s online shopping web page to view the standard configuration of the chosen server, desktop or portable computer. The customer chooses to view the details of the configuration, perhaps with the intention of buying it as it or to build a more suitable configuration. The price for each configuration can be computed at the customer’s request. The customer may choose to order the computer online or may request that the salesperson contact him/her to explain order details, negotiate the price, etc. before the order is actually place. To place the order, the customer must fill out an online form with shipment and invoice address, and with payment details (credit card or cheque). After the customer’s order has been entered into the system, the salesperson sends and electronic request to the warehouse with details of the ordered configuration. The details of the transaction, including an order number and customer account number, are e-mailed to the customer, so that the customer can check the status of the order online. The warehouse obtains the invoice from the salesperson and ships the computer to the customer.

Question: For the above Scenario draw the UML diagrams

Q1: Draw Class diagram and make possible assumptions?

In: Computer Science

Translate the following steps into a Java program Get the monthly_fees Get the minutes Get the...

Translate the following steps into a Java program

Get the monthly_fees
Get the minutes
Get the rate
If minutes is less than or equal to 1000 then
bill = monthly_fees
Otherwise if minutes is between 1000 and 2000 (not including 1000)
bill = (minutes - 1000)*rate + monthly_fees
Otherwise
bill = (minutes - 1000)*rate * 1.5 + monthly_fees
Display “The bill is ” + bill
Display “Thank you for using our program”

In: Computer Science

1) A C++ identifier is a name that identify. Click below identifier and type what could...

1) A C++ identifier is a name that identify. Click below identifier and type what could an identifier be identifying? ( just explain it in words from C++)

2) Click below each of the following type after Declaration, type the statement that declares a variable capable of storing a value of the specified type.   

  1. A non-negative integer.                                                                                                                         

Declaration:

  1. A short integer

Declaration:

  1. A Boolean value

Declaration:

In: Computer Science

Please explain NIDS in a little more depth. Also, who poses a threat to a business's...

Please explain NIDS in a little more depth. Also, who poses a threat to a business's physical and environmental security? Which do you think would be a bigger threat, people inside or outside of the organization? Why?


(Please Text format, no pictures or hand written).

In: Computer Science

What data type will Python pick for the following variable? radio = '101.5' A. integer (i.e....

What data type will Python pick for the following variable?

radio = '101.5'

A.

integer (i.e. int)

B.

string (i.e. str)

C.

floating point number (i.e. float)

D.

list

Which of the following Python statements changes the first element of a tuple my_tuple to 17?

A.

my_tuple[0] = 17

B.

my_tuple[0] == 17

C.

both (A) and (B)

D.

none of the above

Suppose there are two sections of CSC121 and each section has 10 students. Their midterm exam scores are stored in two lists score_list1 and score_list2. Which of the following Python program fragments displays all these midterm exam scores?

A.
combined_list = [score_list1, score_list2]
for element in combined_list:
    for score in element:
        print (score)
B.
combined_list = score_list1 + score_list2
for element in combined_list:
    print (element)
C.

both (A) and (B)

D.

none of the above

def main():

    age = float(input('Enter age: '))

    # insert statement here to call the buffet_price function

    print('Please pay $', price)

def buffet_price(age):

    if age >= 60 or age <= 10:

        price = 9

    else:

        price = 12

    return price

main()

Which of the following statements should be used to call the buffet_price function?

A.

buffet_price(price, age)

B.

buffet_price(age, price)

C.

price = buffet_price(age)

D.

age = buffet_price(price)

In: Computer Science

The SOC has noticed an unusual volume of traffic coming from an open wi-fi guest Network...

The SOC has noticed an unusual volume of traffic coming from an open wi-fi guest Network that appears correlated with a border Network slow down. The network team is unable to capture traffic, but logs from Network Services are available.

  • No users have authenticated recently there was a guest networks captive portal

  • DDoS mitigation systems are not alerting

  • DNS resolver logs show some very long domain names

Which of the following is the best step for security analysis to take next?

  1. Block all outbound traffic from the guest Network at the border firewall

  2. verify the passphrase on the guest network has not been changed

  3. search antivirus logs for evidence of compromise company device

  4. review access point logs to identify potential a zombie services

In: Computer Science