Questions
Describe how you would develop object-oriented features of Java for the Quiz program developed in the...

Describe how you would develop object-oriented features of Java for the Quiz program developed in the Programming Assignments. In particular, describe how the program could use each of the following: class variables, instance variables, inheritance, polymorphism, abstract classes, "this", "super", interfaces, and event listeners.

In: Computer Science

Write a template class that implements an extended queue. Ex: ExtendedQueue int_queue; ExtendedQueue double_queue; ExtendedQueue char_queue;...

Write a template class that implements an extended queue. Ex: ExtendedQueue int_queue; ExtendedQueue double_queue; ExtendedQueue char_queue; –Write a program to test this template class. you have to use inheritance so you will create classes . one for node one for queue one for extended queue inherited for queue.

In: Computer Science

Huffman Coding Huffman coding is a lossless data compression algorithm. The idea is to assign variable-...

Huffman Coding

Huffman coding is a lossless data compression algorithm. The idea is to assign variable- length codes to input characters; lengths of the assigned codes are based on the frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest code.

The variable-length codes assigned to input characters are Prefix Codes, means the codes (bit sequences) are assigned in such a way that the code assigned to one character is not prefix of code assigned to any other character. This is how Huffman Coding makes sure that there is no ambiguity when decoding the generated bit stream.

In this project, you will be using a priority queue and a binary tree of your design to implement a file compression/uncompression algorithm called "Huffman Coding".
Your program will read a text file and compress it using your implementation of the Huffman coding algorithm found in the explanation. The compressed text will be written to a file. That compressed file will be then be read back by your program and uncompressed. The uncompressed text will then be written to a third file. The uncompressed text file should of course match the original text file.

Summary of Processing

  • Read the specified file and count the frequency of all characters in the file.

  • Create the Huffman coding tree based on the frequencies.

  • Create the table of encodings for each character from the Huffman coding tree.

  • Encode the file and output the encoded/compressed file.

  • Read the encoded/compressed file you just created, decode it and output the

    decoded file.

In: Computer Science

Do you think social network platforms companies (twitter, facebook and etc) should monitor, control, and censor...

Do you think social network platforms companies (twitter, facebook and etc) should monitor, control, and censor hate speech? Please explain the issue and offer solutions.  

In: Computer Science

Design and UI Patterns Object models and relational models do not always work very well together....

Design and UI Patterns

Object models and relational models do not always work very well together. Databases represent data in a tabular form, whereas object-oriented languages represent data based on a graph of objects. There are a few common mismatch problems that can exist with association, aggregation, inheritance, and composition, and data navigation.

  • Given these potential problems, how you would use object-relational mapping to address at least two of these problems?

In: Computer Science

Reg # 14 X 9 A1 240 B1 380 C1 300 D1 150 E1 105 A2...

Reg #

14

X

9

A1

240

B1

380

C1

300

D1

150

E1

105

A2

340

B2

260

C2

400

D2

190

E2

195

1

Write a MIPS Assembly program function to calculate the factorial of an input number. Analyze the program for the number X (calculated above) and compute the Execution time in a pipelined MIPS at 2.4GHz.

MIPS Assembly

In: Computer Science

1) Write an INSERT statement that adds this row to the Invoices table: i nvoice_id: The...

1) Write an INSERT statement that adds this row to the Invoices table: i

nvoice_id: The next automatically generated ID

vendor_id : 32

invoice_number: AX-014-027

invoice_date: 8/1/2014

invoice_total: $434.58

payment_total: $0.0

credit_total: $0.0

terms_id: 2

invoice_due_date: 8/31/2014

payment_date: null

Write this statement without using a column list.: Use DEFAULT to insert the automatically generated ID.

2) Write an INSERT statement that adds these rows to the Invoice_line_Items table:

invoice_sequence: 1 2

account_number: 160 527

line_item_amount: $180.23 $254.35

line_item_description: Hard drive Exchange Server update

Set the invoice_id of these two rows to the invoice ID that was generated by MySQL for the invoice you added in question 1

3) Write an UPDATE statement that modifies the invoice you added in question 1. This statement should change the credit_total column so its 10% of the invoice_total column, and it should change the payment_total column so that the sum of the payment_total and credit_total are equal to the invoice_total column.

4) Write a DELETE statement that deletes the row that you added to the Invoices table in question 1. When you execute this statement, it will produce an error since the invoice has related rows in the Invoice_Line_Items table. To fix that, precede the DELETE statement with another DELETE statement that deletes the line items for this invoice. (Remember that to code two or more statements in a script, you must end each statement with a semicolon.

In: Computer Science

Suppose your business had an e-commerce web site where it sold goods and accepted credit card...

Suppose your business had an e-commerce web site where it sold goods and accepted credit card payments. Discuss the major security threats to this web site and their potential impact. What can be done to minimize these threats?

In: Computer Science

Asks a user to enter n values, then calculates and returns the minimum, maximum, total, and...

Asks a user to enter n values, then calculates and returns
the minimum, maximum, total, and average of those values.
Use: minimum, maximum, total, average = statistics(n)
-------------------------------------------------------
Parameters:
n - number of values to process (int > 0)
Returns:
minimum - smallest of n values (float)
maximum - largest of n values (float)
total - total of n values (float)
average - average of n values (float)
---------------------------------------

In: Computer Science

Problem 10 Write down the running time function, T(n), of the program below. def prob10(L): s...

Problem 10 Write down the running time function, T(n), of the program below.

def prob10(L):
    s = 0
    for x in L:
        for y in L:
            if x+y % 10 == 0:
                print(x, y, x+y)
                s = s + x*y
    return s

ANSWER:

T(n) = ...

***Big-O, Omega, Theta complexity of functions, Running time equations of iterative functions & recursive functions,  Substitution method & Master theorem

Please answer within these topics.***

In: Computer Science

Create a program that determines the name of the person with the highest or lowest number...

Create a program that determines the name of the person with the highest or lowest number of votes. The data will be in two arrays. The first array is of type String and has the following names in it: Mike Muldune Justin Meiber Clark Kent Ana Karina The second array is of type integer and has the following numbers in it: 2324, 2425, 3344 and 2526. Ask the user to enter a 1 for highest and 2 for lowest. If the user enters a 1, print the name of the person with the highest number of votes and the number of votes received. It the user enters a 2, print the name of the person with the lowest number of votes and the number of votes received.

In: Computer Science

Write the following questions as queries in Relational Algebra. Use only the operators discussed in class...

Write the following questions as queries in Relational Algebra. Use only the operators discussed in class (select, project, Cartesian product, join, union, intersection, set difference and renaming —in particular, no outer joins or aggregations). Type your answers. If you can’t find Greek letters in your word processor, you can simply write out the operator, all uppercase (i.e. ’SELECT’). Please use renaming consistently, as indicated in the handout. Before starting, make sure you understand the schema of the database. If you are in doubt about it, please ask the instructor.

Assume a database with schema:

ACTOR(name,age,address,nationality)

MOVIE(title,year,genre,budget,director-name,studio)

APPEARS(name,title,salary)

Write the following questions in Relational Algebra:

1. List the titles and budgets of movies where actor Keanu Reeves appeared in 1999.

2. List the names and ages of actors who have appeared in a comedy produced by Studio ’MGM’.

3. List the names of directors who have directed a drama or a comedy.

4. List the names of directors who have directed a drama and a comedy.

5. List pairs of actors who have appeared together in a movie (note: the schema of your answer should be (name1,name2), where both name1 and name2 are names of actors.

In: Computer Science

For example My IP address 128. 0. 0. 1 My IP address 53. 20. 62. 201...

For example

My IP address 128. 0. 0. 1

My IP address 53. 20. 62. 201

My IP address 77. 122. 180. 76

My IP address 54. 33. 11. 11

My IP address 33. 33. 2. 11

My IP address 202. 29. 205. 69

My IP address 215. 18. 15. 185

My IP address 56. 66. 33. 30

How do you write a regular expression that covers all IP addresses and display all list using a loop in Python

In: Computer Science

Write the method: public static String removeSubstring(String s1, String s2) Method removeSubstring(String s1, String s2) Must...

Write the method: public static String removeSubstring(String s1, String s2) Method removeSubstring(String s1, String s2)

Must do 3 things:
1. Take two parameters, the original String (String s1) and the substring (String s2) that is to be removed;
2. Create a new String that consists of the original String data less all occurrences of the substring data;
3. Return the new String.

Note:
1. The data to be removed is each occurrence of the complete substring, not individual characters of the substring. For example, if the original String is “hello” and the substring is “el”, the String to be returned is “hlo” and not “ho”.
2. The second, third and fourth examples include spaces, so the substring also includes a space that is to be removed.

PLEASE HELP ME UNDERSTAND HOW TO COMPLETE THIS CODE BELOW:

public class RemoveSubstring
{
   public static void main(String [] args)
   {

   String testString1 = "173167176531317";
   String subStr1 = "17";
  
   String testString2 = "I am not happy";
   String subStr2 = "not ";
  
   String testString3 = "I am not happy and not glad";
   String subStr3 = "not ";
  
   String testString4 = "neither this nor that works!";
   String subStr4 = "neither this nor ";
  
   System.out.println("The string " + testString1 + " without " + subStr1 + " is: " + removeSubstring(testString1, subStr1));
   System.out.println("The string " + testString2 + " without " + subStr2 + " is: " + removeSubstring(testString2, subStr2));
   System.out.println("The string " + testString3 + " without " + subStr3 + " is: " + removeSubstring(testString3, subStr3));
   System.out.println("The string " + testString4 + " without " + subStr4 + " is: " + removeSubstring(testString4, subStr4));

   }

   public static String removeSubstring(String s1, String s2)
   {
  
return("PLEASE HELP ME UNDERSTAND HOW THIS WORKS OR WHERE TO LEARN MORE I AM LOST HERE THANK YOU");
   }

}

In: Computer Science

2. Explain why it is important to develop an effective data governance program What industries can...

2. Explain why it is important to develop an effective data governance program

What industries can you think of that might have strict data governance regulations in place?

What are the advantages of good data governance?

What are the characteristics of weak or non-existent data governance?

3. How can virtualization reduce IT costs while improving performance?

4. Discuss your own experiences with virtualization. Do you have any?

5. How does virtualization lead us to cloud computing?

6. Do you see Cloud as a form of outsourcing, or is it more than that?

7. what is your understanding of the 3 main delivery models?

8. What aspects of any of the 3 main delivery models do you utilize personally, or through

work?

9. What disadvantages can you see with cloud computing?

In: Computer Science