Questions
In Statistics, a histogram is a graphical representation of data using bars of different heights. In...

In Statistics, a histogram is a graphical representation of data using bars of different heights. In a histogram, each bar groups numbers into ranges. Taller bars show that more data falls in that range. A histogram displays the shape and spread of continuous or discrete sample data.

In this project, you will write a program that creates a histogram that allows users to visually inspect the frequency distribution of a set of values.

REQUIREMENTS:

* Read from the data file the values in the range of 1-100 inclusive.

* Produce a histogram as shown in the expected output below to indicate how many input values fell in the range 1 to 10, 11 to 20, and so on.

EXPECTED OUTPUT:

run:

1-10 I*****

11-20 I******

21-30 I**

31-40 I*

41-50 I***********

51-60 I******

61-70 I********

71-80 I***

81-90 I****

91-100 I****

DATA FILE

51 68 42 61 23 50 79 9 12 9 67 85 64 97 41 13 66 47 54 2 46 48 11 52 79 48 73 48 51 15 44 97 19 48 53 13 58 47 95 2 1 65 84 28 89 99 70 67 84 36

In: Computer Science

Discuss the advantages and disadvantages of 2PL and Strick 2PL protocols. Beside the locking protocol, what...

Discuss the advantages and disadvantages of 2PL and Strick 2PL protocols. Beside the locking protocol, what is the additional requirement to ensure the transactional isolation property?

In: Computer Science

USING PYTHON ONLY Part 3a: Prime Number Finder Write a program that prompts the user to...

USING PYTHON ONLY

Part 3a: Prime Number Finder

Write a program that prompts the user to enter in a postive number. Only accept positive numbers - if the user supplies a negative number or zero you should re-prompt them.

Next, determine if the given number is a prime number. A prime number is a number that has no positive divisors other than 1 and itself. For example, 5 is prime because the only numbers that evenly divide into 5 are 1 and 5. 6, however, is not prime because 1, 2, 3 and 6 are all divisors of 6.

Here's a sample running of the program:

Enter a positive number to test: 5

2 is NOT a divisor of 5  ... continuing
3 is NOT a divisor of 5  ... continuing
4 is NOT a divisor of 5  ... continuing

5 is a prime number!

And here's another running:

Enter a positive number to test: 9

2 is NOT a divisor of 9  ... continuing
3 is a divisor of 9  ... stopping

9 is not a prime number.

Some notes on your program:

  • 1 is technically not a prime number.
  • Once you find a number that evenly divides into your test number you do not need to continue testing additional numbers - the number cannot be prime.

In: Computer Science

1.We sell music  to our members. Employees recommend titles by rating them from1 to 5 with 1...

1.We sell music  to our members. Employees recommend titles by rating them from1 to 5 with 1 being not very good to 5 being very good

What would your strategy be to write SQL code for the following query: "Show all the members and the sale dates of products they bought if they bought any products"

I would use a left outer join

I would not use a join because the data comes from one table

I would use an equality join to find matching records in two or more tables by matching primary and foreign keys

I would use a subquery

I would use a recursive join to join a table to itself

2.

We sell music  to our members. Employees recommend titles by rating them from1 to 5 with 1 being not very good to 5 being very good

What would your strategy be to write SQL code for the following query: "Show every artist and product we carry and the sale date of the product it it has ever been sold"

I would use a left outer join

I would not use a join because the data comes from one table

I would use a subquery

I would use an equality join to find matching records in two or more tables by matching primary and foreign keys

I would use a recursive join to join a table to itself

In: Computer Science

Create a ShoppingCart class in java that simulates the operation of a shopping cart. The ShoppingCart...

Create a ShoppingCart class in java that simulates the operation of a shopping cart. The ShoppingCart instance should contain a BagInterface implementation that will serve to hold the Items that will be added to the cart. Use the implementation of the Item object provided in Item.java. Note that the price is stored as the number of cents so it can be represented as an int (e.g., an Item worth $19.99 would have price = 1999).

Your shopping cart should support the following operations:

  •  Add an item

  •  Add multiple quantities of a given item (e.g., add 3 of Item __)

  •  Remove an unspecified item

  •  Remove a specified item

  •  Checkout – should "scan" each Item in the shopping cart (and display its

    information), sum up the total cost and display the total cost

  •  Check budget – Given a budget amount, check to see if the budget is large

    enough to pay for everything in the cart. If not, remove an Item from the shopping cart, one at a time, until under budget.

  • Write a driver program to test out your ShoppingCart implementation.

  1. Write a driver program to test out your ShoppingCart implementation.

    Note that your implementation should be as generalized as possible. In other words, you should be able to create a ShoppingCart instance using any of the bag implementations and have all of the methods still work.

    Also, think before you code. If you find yourself re-writing the substantive bag operations, you are doing it wrong.

    And of course, your code should be documented with header comments for each method and in-line comments as needed.

In: Computer Science

You are doing analysis do develop a system where a customer can place or cancel an...

You are doing analysis do develop a system where a customer can place or cancel an order, check the status of the order, and request a catalog. Once an order is placed a dispatcher and workers at the shipping company will ship the products.

1.Create a use case diagram to represent the requirements for this system

2.Develop a use case specification detailing the steps to place an order

3.Create an activity diagram for the placing an order process

4.List five (5) or more functional requirements for this system

a.Rewrite the functional requirements as user stories

b.Rewrite the functional requirements as features

In: Computer Science

(Make sure in Mips!!!) Use the correct “syscall” to create MIPS programs for the following. !!!...

(Make sure in Mips!!!) Use the correct “syscall” to create MIPS programs for the following.

!!! please use comments and ALWAYS use the correct syscall program code to end the program. !!!

1) Write a program in MIPS which asks the user to enter their favorite type of pie. The program should then print out "So you like _____ pie", where the blank line is replaced by the pie type entered.

ALSO: What annoying feature of syscall service 4 makes it impossible at this point to make the output appear on a single line???

(Make sure to comment and show screenshot if possible.)

In: Computer Science

What are some key differences between General Public License v2.0 and Mozilla Public License 2.0?

What are some key differences between General Public License v2.0 and Mozilla Public License 2.0?

In: Computer Science

With 3-digit rounding after each operation find the value of: a. 0.4 + 0.4 + …...

With 3-digit rounding after each operation find the value of:

a. 0.4 + 0.4 + … + 0.4 + 100 (where the 0.4 is repeated 100 times)

b. 100+0.4 + 0.4 + … + 0.4 (where the 0.4 is repeated 100 times)

c. Find the absolute and relative error in parts a and b.

In: Computer Science

Write an array method to carry out each of the following tasks for an array of...

Write an array method to carry out each of the following tasks for an array of integers. Note: you can think of each as a separate problem independent of the others.

  1. a) Swap the first and last elements in the array.

  2. b) Shi< all elements by one to the right and move the last element into the first

    posi>on. For example, 1 4 9 16 25 would be transformed into 25 1 4 9 16.

  3. c) Replace all even elements with 0.

  4. d) Replace each element except the first and last by the larger of its two neigh-

    bors.

  5. e) Return true if the array contains duplicate elements (which need not be adja-

    cent).

  6. JAVA

In: Computer Science

What are some key differences between General Public License v2.0 and Apache License 2.0 (Apache-2.0)?

What are some key differences between General Public License v2.0 and Apache License 2.0 (Apache-2.0)?

In: Computer Science

Please show that the code is working at the end(screen shot of the final result +...

Please show that the code is working at the end(screen shot of the final result + classes and interfaces) and use interfaces.

Your program should read from the standard input a sequence of integer values, with each value separated by a space. Your task is to:

  • Build a binary search tree using these values in the order they are entered.

  • Print 3 traversals: pre-, in-, and post-order.

  • Allow the user to insert/delete a value. Once a new tree is generated, print it in-order.

  • Find predecessor of a given value. The predecessor is the node that appears right before

    the given value in an in-order traversal.

  • Find successor of a given value. The successor is the node that appears right after the given

    value in an in-order traversal.

    In your BST implementation, the add and delete methods must be implemented using recursion. You will lose major points for using a non-recursive implementation.

    Note that no duplicates are allowed in this BST. Your program should use an interactive interface with the format shown below (the user inputs are underlined):

    % java Project3
    Please enter the initial sequence of values:
    51 29 68 90 36 40 22 59 44 99 77 60 27 83 15 75 3 Pre-order: X X X ... X
    In-order: X X X ... X
    Post-order: X X X ... X
    Command? H

In: Computer Science

IN C# In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers....

IN C#

In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or whether a credit card is scanned correctly by a scanner. Credit card numbers are generated following this validity check, commonly known as the Luhn check or the Mod 10 check, which can be described as follows (for illustration, consider the card number 4388576018402626): 1. Double every second digit from right to left. If doubling of a digit results in a two-digit number, add up the two digits to get a single-digit number. 2. Now add all single-digit numbers from Step 1. 4 + 4 + 8 + 2 + 3 + 1 + 7 + 8 = 37 3. Add all digits in the odd places from right to left in the card number. 6 + 6 + 0 + 8 + 0 + 7 + 8 + 3 = 38 4. Sum the results from Step 2 and Step 3. 37 + 38 = 75 5. If the result from Step 4 is divisible by 10, the card number is valid; otherwise, it is invalid. For example, the number 4388576018402626 is invalid, but the number 4388576018410707 is valid. Write a program that prompts the user to enter a credit card number as a long integer. Display whether the number is valid or invalid. Design your program to use the following methods: Use STRING as an input. Add methods

In: Computer Science

Write psuedocode to brute-force a simple password engine. Then, offer advice on making passwords more secure...

Write psuedocode to brute-force a simple password engine. Then, offer advice on making passwords more secure to brute-force attacks.

In: Computer Science

Write a program that accepts a number of minutes and converts it to days and hours....

Write a program that accepts a number of minutes and converts it to days and hours. For example, 6000 minutes represents 4 days and 4 hours. Be sure to provide proper exception handling for non-numeric values and for negative values.

Save the file as  MinuteConversionWithExceptionHandling.java

In: Computer Science