Questions
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

Do a walk-through of the following program segments and determine, in each case, the exact output:...

Do a walk-through of the following program segments and determine, in each case, the exact output:

a) int i, j;

for (i = 1; i <= 5; i++)

{

for (j = 1; j <= 5; j++)

cout << setw (3) << i;

cout << endl;

}

b) int i, j;

for (i = 1; i <= 5; i++)

{

for (j = (i + 1; j <= 5; j++)

cout << setw(5) << j;

cout << endl;

c) int i, j;

for (i = 1; i <= 5, i++)

{

for (j = 1; j <= i; j++)

cout << setw(3) << j;

cout << endl;

In: Computer Science

Java Programming: Scan a file and set up 3 different arrays from scanning through the .txt...

Java Programming:

Scan a file and set up 3 different arrays from scanning through the .txt file. you should have 2 string arrays and 1 integer array.

I need help knowing how to read the file so that it puts the correct information into an array. It is all separated by spaces.

.txt file:

S SABQ138 3
A AABQ205 2
S SABQ127 1
A AABQ313 2
S SABQ126 2
A AABQ302 2

In: Computer Science

Java guessing game: For this program you will use Linear Search. - Ask the user to...

Java guessing game:

For this program you will use Linear Search.

- Ask the user to choose between a number from 0 to 2000.

- The user will guess how long the linear search will take in nanoseconds,

- After the user puts in their answer, show the user the difference between the actual answer and their answer.

(Example: The user puts in 5 nanoseconds. The actual time is 11 nanoseconds. The program will show 6 nanoseconds.)

There should be a class for the program to do the Linear Search and a separate tester class for the user questions and answers.

In: Computer Science

Evaluate the different types pf Back-Up which can be performed on Windows Server (2016/2019) and develop...

Evaluate the different types pf Back-Up which can be performed on Windows Server (2016/2019) and develop a back-up strategy for your organization which is a Large Bank in UAE with a branch office in each Emirate.

In: Computer Science

<Using C++ programming.> <Prof said that you use the example given below.> Write a program to...

<Using C++ programming.>

<Prof said that you use the example given below.>


Write a program to find (A*B)*10 + (2*C+D) using class Matrix.

For member functions, use add() and mul().


Add()

-a,b,c are all m*n matrices.

-Add(a,b,c,m,n): cij = aij + bij

-Add(a,m,n,num): cij = aij + num


Mul()

-a is an m*n matrix, b is an n*p matrix, and c is an m*p matrix.

-mul(a,b,c,m,n): (Matrix Multiplication)

-mul(a,m,n,num): aij = aij * num

In: Computer Science

I want to know 'Linked link + queue' and 'Linked link Stack' code in C++ But...

I want to know 'Linked link + queue' and 'Linked link Stack' code in C++

But there is a condition. There shall be the following 'menu':

*****Menu*****

1. Insert into Stack 2. Insert into Queue

3. Delete from Stack 4. Delete from Queue

5. View Content in Stack 6. View Content in Queue

**********************************************

Let me give you a example.

>> 1 30 // Insert 30 into Stack

>>1 58// Insert 58 into Stack

>>1 26 // Insert 26 into Stack

>>3 // Delete from Stack

>>5 // View Content in Stack

Result: 58 30 ( Outputs in LIFO order)

Please help me. I am so curious.

In: Computer Science

Programming with Microsoft Visual Basic 2017: Discuss the ORDER BY clause in the SELECT statement and...

Programming with Microsoft Visual Basic 2017:

Discuss the ORDER BY clause in the SELECT statement and how that can help simplify the data retrieved by the query.

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.

For the above Scenario draw the following UML diagrams

Q1: Identify actors, use-cases also draw use-case diagram with all possible associations?

In: Computer Science