Questions
Write in JAVA eclipse program (comment in every line): class for calculating an area of a...

Write in JAVA eclipse program (comment in every line):

class for calculating an area of a room. The program MUST ask for the length and the width of the room.

Make sure you write the methods to get the width and length and print the area.

In: Computer Science

Write a C++ program to simulate a service desk. This service desk should be able to...

Write a C++ program to simulate a service desk. This service desk should be able to service customers that can have one of three different priorities (high, medium, and low). The duration for any customer is a random number (between 5 minutes and 8 minutes).  You need to write a program that will do the following:

  1. Generate random 100 service requests.
  2. Each service request can be either high, medium, or low priority. (Your program should randomly allocate this priority to each service.)
  3. Each service request may need any time to be serviced between 5 and 8 minutes. (Your program should randomly allocate this time to each service.)
  4. Your program should simulate the case when you have one service station for all customers.
  5. Your program should simulate the case when you have two service stations for these 100 customers.
  6. For each case, output the following statistics:
    1. The number of requests for each priority along with the service time for each request
    2. The waiting time for each service request
    3. The average waiting time for service requests within each priority

Tips: Use a loop that will process 100 times, se each service request as an index for the queue, declare random numbers to generate priorities and service times, 5-8 for service, 1-3 for priority, generate 2 deques: one for service, 1 for priority, use push_front(high) and push_front(low) to add values to the deque, for medium priority use size()/2 to find the missle position of the deque using insert(name.insert(position, value).

In: Computer Science

Your order from store Your orders are 10 chips You purchased a total of 10 chips...

Your order from store
Your orders are 
10 chips
You purchased a total of 10 chips with a total price of $90
5 gums
You purchased a total of 5 gums with a total price of $30

Question: Please create a code to allow you to remove one or more of your orders (in python3 language)

In: Computer Science

**PLEASE ANSWER ALL QUESTIONS** Calliope is a forensics detective with a law enforcement agency. She discovers...

**PLEASE ANSWER ALL QUESTIONS**

Calliope is a forensics detective with a law enforcement agency. She discovers that an attacker who has just been caught was using a dead-drop method of controlling the bots in a botnet. Which of the following might have been a clue that the attacker was using this method?

a.

Finding devices that the attacker had hidden on multiple victims’ company networks

b.

Finding a directional antenna and Wi-Fi setup that allowed the bot herder to beam communications directly to the target computers

c.

Finding an e-mail account with multiple saved drafts that were never sent but contained instructions the bots were to follow

d.

Reading log files that contained constant encrypted communications from the attacker’s IP address to some of the identified bots

Belvais performing an audit of the e-mail server when she discovers that one of the accounts is sending a lot of e-mails all day that contain attachments. After a bit more research, she finds that the attachments contain extensive proprietary and confidential information. Which of the following should she consider implementing to prevent a reoccurrence?

a.

Buffer filtering

b.

DLP

c.

PoS

d.

Access point probe

Alika has just finished eradicating a piece of malware from a computer system. Which of the following might she do next as part of the validation process?

a.

Secure erase

b.

Patching

c.

Reconstruction

d.

Reimaging

Jaden has received an alert from a system that has identified potential malware on itself. Upon looking through the log files, he sees a list of error messages where an executable tried to write data to a range of memory addresses that did not exist for the system. Which of the following has most likely occurred?

a.

Space overflow

b.

Decimal overflow

c.

Buffer overflow

d.

Integer overflow

Victoria, a cybersecurity analyst, has just disconnected a computer from the network after finding that it was infected with malware. Which of the following is the next task that she should attempt to perform with the system?

a.

Containment

b.

Patching

c.

Eradication

d.

Validation

In: Computer Science

SQL is our language for relational databases - do you think it's an adequate "language" for...

SQL is our language for relational databases - do you think it's an adequate "language" for database creation and manipulation?

In: Computer Science

By using javaFX as the GUI, design and implement java based algorithms using appropriate data structures...

By using javaFX as the GUI, design and implement java based algorithms using appropriate data structures for the following problem:

Use depth-first search to find paths to all the vertices in a graph that are connected to a given start vertex s. A sample input file containing the number of vertices, number of edges and a list of edges called tinyCG.txt is provided for you to test your program.

In: Computer Science

Write a program that reverses a text file by using a stack. The user interface must...

Write a program that reverses a text file by using a stack. The user interface must consist of 2 list boxes and 3 buttons. The 3 buttons are: Read - reads the text file into list box 1. Reverse - reverses the items in list box 1 by pushing them onto stack 1, then popping them from stack 1 (in the reverse order) and adding them to list box 2. Write - writes the contents of list box 2 to a new text file. At first, only the Read button is enabled. After it is clicked, it is disabled and the Reverse button is enabled. After it is clicked, it is disabled and the Write button is enabled. After it is clicked, it is disabled. The name of the input text file is "input.txt". The input text file will contain no more than 100 lines of text. This fact is not needed by the program. It simply means that memory usage is not an issue. The name of the output text file is "output.txt". Notes: 1. The name of your main class should be ReverseFileViaStack. 2. Use the Java class library Stack class for your stack. 3. Use a border layout for your contents pane. 4. In the north region include the following title: Reverse a Text File via a Stack. 5. Use a panel in the center region to contain the 2 list boxes (side-by-side). 6. Place the 3 buttons in the south region. 7. A useful resource for this project is the week 5 video: Java GUI List Components

In: Computer Science

In Linux system, explain step by step what the following commands do: mkdir test cd test...

In Linux system, explain step by step what the following commands do:

mkdir test

cd test

cp /etc/fstab .

ls

ls -l

touch foo ./-l

ls

ls -l

Then execute the following command:

ls *

Explain the result. What is the problem?

Execute the following command:

rm *

Explain the result. What is the problem?

Modify the "rm *" command so that it works correctly. Explain your solution.

In: Computer Science

Given P(a,b,c,d)=∑(1,3,8,9,10,11,12,14,15). Determine P as a most simplified SOP Determine P’ as a most simplified SOP...

  • Given P(a,b,c,d)=∑(1,3,8,9,10,11,12,14,15).
    • Determine P as a most simplified SOP
    • Determine P’ as a most simplified SOP
  • Generate gate diagrams of P and P’ from the first bullet
  • Implement P’, by converting each of the gate diagrams from above to only 2-input Nand gates. Do realize that a Nand equivalent of invertor must be added to the output for P to create P’.
  • (its is one question)

In: Computer Science

You know now that the 2-4 tree allows 2,3, and 4-nodes that hold more than a...

You know now that the 2-4 tree allows 2,3, and 4-nodes that hold more than a single data element, 'squeezing' the tree to shorter heights, and the B tree is the generalized category of search tree that allows an arbitrary number of data elements in each node. The 2-4 tree is one specific type of B tree.

The red black tree is a binary search tree (only one data element per node, the data elements are maintained in order), but it adds a color attribute to each node that allows a way to force adjacent nodes (parent-child) to be of different colors. This means we can rely on the nodes to also be able to be divided into two 'categories' separated by edges.

Come up with an example of a situation in which the data can benefit from being stored in the 2-4, B tree or red black tree.

In: Computer Science

You can use the "cat" command to list the content of a file. For example: cat...

You can use the "cat" command to list the content of a file. For example:

cat /etc/fstab

lists the content of the file /etc/fstab in the terminal window that you are currently using.

If you use a redirection of the standard output of the "cat' command:

cat /etc/fstab > foo

then a file named "foo" is created in the local directory and the content of the file /etc/fstab is listed by the "cat" command into the file "foo", which then contains a copy of the content of the file/etc/fstab. In that case, no output is printed to the terminal.

Execute the following command:

cat /etc/fstab > /dev/tty

What is the result? Explain why (do a search in the Unix manual: man -f tty for some help).

In: Computer Science

Write a Java program that accepts a sequence of commands and print out the number of...

Write a Java program that accepts a sequence of commands and print out the number of successful insertions, the number of successful deletions, the number of successful searches (through the “find” command), the number of items remaining in the list after executing all commands and the final contents of the list.

Three commands that will be taken as inputs are “insert”, “delete” and “find”.

Input

Line 1: The number of transactions m on the list, where 1  m 200.

Line 2 to m+1: A string command (“insert”, “delete”, “find”) followed by an integer n (separated by a space).

  • “insert” means insert n into the list
  • “delete” means delete n from the list
  • “find” means find n in the list

Output

Line 1: Display 4 integers (each number is separated by a space) which are:

  • the number of successful insertions,
  • the number of successful deletions,
  • the number of successful search , and
  • the number of items remaining in the list

Line 2: The final contents of the list after executing all commands.

Sample Input

Sample Output

3

insert 1

delete 5

find 2

1 0 0 1

[ 1 ]

8

find 10

insert 3

insert 2

insert 1

delete 4

delete 3

insert 1

find 2

4 1 1 3

[ 1 1 2 ]

In: Computer Science

Write a function called 'make_triangle(char,n)' that uses a nested loop to return a string that forms...

Write a function called 'make_triangle(char,n)' that uses a nested loop to return a string that forms a triangle. The return string should contain: one instance of char on the first line, two instances of char on the second line, and so on up to n instances of char on line n. Then n-1 instances of char on line n+1, and so on until the triangle is complete. Sample runs of the function looks as follows (this function called from IDLE, please note the end of line character at the end of the return string):

>>> make_triangle("+",6)
'+\n++\n+++\n++++\n+++++\n++++++\n+++++\n++++\n+++\n++\n+\n'

>>> make_triangle('*',3)
'*\n**\n***\n**\n*\n'

From IDLE, we could as print out the actual triangle as follows:

>>> print(make_triangle("+",6))
+
++
+++
++++
+++++
++++++
+++++
++++
+++
++
+

>>> print(make_triangle('*',3))
*
**
***
**
*

In: Computer Science

The main method is where Java begins execution of your program. In this assignment, you will...


The main method is where Java begins execution of your program. In this assignment, you will coding other methods in addition to the main method. These additional methods will perform specific functions and, in most cases, return results. Write all your methods in a class named Homework6Methods.java
1 Write a public static method named getMaxOf2Ints that takes in 2 int arguments and returns the Maximum of the 2 values

2Write a public static method named getMinOf2Ints that takes in 2 int arguments and returns the Maximum of the 2 values

3Write a public static method named getMaxOf3Ints that takes in 3 int arguments and returns the Maximum of the 3 values

4Write a public static method named getMedianOf3Ints that takes in 3 int arguments and returns the Median Value of the 3 values

5Write a public static method named printMinOf3Ints that takes in 3 int arguments of type int and prints the minimum value of those 3 ints
Example: “The min is “ + minVal

6Write a public static method named getProdOfAllPositiveInts that takes in 1 int argument and returns the product of all the values between 1 and that number.
If the argument is NON-positive return 0



7Write a public static method named getProdOfAllNegativeInts that takes in 1 int argument and returns the product of all the values between -1 and that number.
If the argument is NON-negative return 0

8Write a public static method named isProdOfAllNegativeIntsNegative that takes in 1 int argument and returns true if the product of all the values between -1 and that number is negative, and false otherwise.

9Write a public static method named getCharAtIndex that takes in 2 arguments, a String s, and an int index. The method should return the char found at the index location of the string or if not found return a ‘?’

10Write a public static method named getCountOfCharInString that takes in 2 arguments, a String s, and a char c. The method should return an int representing the number of times the char was found within the string.

11Write a public static method named getStringReversed that takes in 1 argument of type String and returns the String in reverse order.

12Write a public static method named getStringTitleCased that takes in 1 argument of type String and capitalizes the first letter of each word in the String, then returns the title cased string.
Example:
Input: “the dog ate my homework!” Returns: “The Dog Ate My Homework!”
Input: “tHe Dog atE My HOMEwoRk!” Returns: “The Dog Ate My Homework!”
Input: “THE DOG ATE MY HOMEWORK!” Returns: “The Dog Ate My Homework!”

In: Computer Science

Topic of Discussion “The implementation of realistic time management plans can improve productivity and the quality...

Topic of Discussion

“The implementation of realistic time management plans can improve productivity and the quality of life”.

As a project manager, discuss the key steps for creating realistic and successful time management plans.

In: Computer Science