Questions
Programming Exercise 1 Write a function that will have a list as an input, the task...

  1. Programming Exercise 1

Write a function that will have a list as an input, the task of the function is to check if all the elements in the list are unique,( i.e. no repetition of any value has occurred in the list), then the function returns true otherwise it returns false. Your program should include a main method that call the method to test it.

  1. Algorithm Analysis

For the function you implemented in part 1, please calculate T(n), which represents the running time of your algorithm in terms of n. Where n is the length of the list. Then find the order of magnitude of your algorithm (Big O).

  1. Algorithms Comparison

Please find another algorithm that solves part 1, write the code, calculate T(n) and find Big O. Then compare the efficiency with the algorithm from part1 to determine the more efficient one.

In: Computer Science

Consider the following relational schema: Salerep(sales_rep_ID, name, address, commission, rate) Customer(customer_number, name, address, balance, credit_limit, sales_rep_ID)...

Consider the following relational schema:

Salerep(sales_rep_ID, name, address, commission, rate)

Customer(customer_number, name, address, balance, credit_limit, sales_rep_ID)

Part(part_number, part_description, on_hand, class, warehouse, price)

Orders(order_number, order_date, customer_number)

Orderlilne(order_number, part_number, number_order)

Write SQL statements for the following queries:

a) Produce a list showing part_number, part_description, on_hand, and price sorted by part_description.

b) List customer’s name followed by order_number, part_description, and number_order.

c) List names of customers who have ordered the most expensive item(Hint: Use a nested SQL query to determine thehighest price.)

d) List the names of the sale_reps who have sold the most number of part “123”.(Hint: Use a nested SQL query for the FROM clause)

In: Computer Science

Could I please get explainations and working out as to how to get to the answers....

Could I please get explainations and working out as to how to get to the answers.

Note that  is where part of the answer goes.

1.

Write a statement that removes the first occurrence of item 10 (if any) from an ArrayList of Integer objects, data.

data.remove(  );

2.

Complete the following function that returns true if ArrayList list contains any positive (more than 0) item, false otherwise.

public static  containsPositive(ArrayList list) {

for(int i=0; i < list.size(); i++) {

if(    ) {

 ; }

}  ; }

3.

Consider the following list:

ArrayList list = new ArrayList(Arrays.asList(10, 70, 20, 90, 30, 80, 50, 40, 60));

Complete the following code that gives the following output:

20 90 30 80 50 40 60

 <interger> iter = list.listIterator(  );

while(iter.  ) {

System.out.println(  +" ");

}

In: Computer Science

Write a class IgnoreCaseComparator that implements Comparator<Character>. If it were used as the argument to List.sort(),...

Write a class IgnoreCaseComparator that implements Comparator<Character>. If it were used as the argument to List.sort(), it would sort the list ignoring case. This behavior is different from using the natural ordering of characters, where uppercase characters come before lowercase characters.

Note that this question is not asking you to sort a list -- just to write the comparator!

For example, if the unsorted list were [b, C, A, d], then the list would be [A, b, C, d] after sorting using this comparator. (If you had sorted using the natural ordering of characters, the result would instead have been[A, C, b, d].)

You may find a utility method of Character, such as Character.toLowerCase(), helpful.

You may assume that Comparator and Character are imported. You may not import other classes.

In: Computer Science

On a multiple choice test with 18 questions, each question has four possible answers, one of...

On a multiple choice test with 18 questions, each question has four possible answers, one of which is correct. For students who guess at all answers, find the variance for the number of correct answers.

In: Statistics and Probability

Find the 80% confidence interval for the standard deviation of the ages of seniors at Oak...

Find the 80% confidence interval for the standard deviation of the ages of seniors at Oak Park College if a random sample of 21 students has a standard deviation of 2.3 years. Assume the variable is normally distributed.

In: Statistics and Probability

Suppose we conduct a study with 100 participants to estimate how many hours students sleep and...

Suppose we conduct a study with 100 participants to estimate how many hours students sleep and find an average of 8 and a confidence interval that ranges from 5 to 11. What is the margin of error?

In: Statistics and Probability

Which of these variables are discrete and which are continuous? The number of freshman enrolled at...

  1. Which of these variables are discrete and which are continuous?
    1. The number of freshman enrolled at University.
    1. The time a student spends in Starbucks.
    1. The number of students who are in chapel
    1. The temperature inside the Rec Center
    1. GPA of an athlete at LCU

In: Statistics and Probability

For a particular event, 340 tickets were sold for a total of $7600. If students paid...

For a particular event, 340 tickets were sold for a total of $7600. If students paid $10 per ticket and nonstudents paid $40 per ticket, how many student tickets were sold?

In: Accounting

Assume that a hypothesis test of the given claim will be conducted. Identify the type I...

Assume that a hypothesis test of the given claim will be conducted. Identify the type I ( α ) error.

The principal of a school claims that the percentage of students at his school that come from a single-parent home is 6%.

In: Statistics and Probability