Questions
In this assignment you will use pointers and structures to create Single and double link list....

In this assignment you will use pointers and structures to create Single and double link list. Write a menu driven program with the menu options:
1. Insert in Linked List
      1. Insert in Single linked list
             1. Insert at front(head)
             2. Insert at Index
             3. Insert at end(tail)
      2. Insert in double linked list
             1. Insert at front(head)
             2. Insert at Index
             3. Insert at end(tail)
2. Print
      1. Print linked list
      2. Print double linked list in reverse order after           calculating the cube of each element.
3. Delete in both linked list
       1. deletion at front(head)
       2. deletion at Index
       3. deletion at end(tail)
4. Return maximum data from single/double linked list
5. Count the number of nodes in linked list
6. Find the sum of all node
7. Check if elements stored in Linked list make a Palindrome. (like 1221, 3333, 2442)
8. Return Minimum data from single/ double linked list
9. Exit

Note ::: Program should be implemented in C++ with, pointers and functions   Each menu option should be implemented in separate function. Try to terminate insertion in linked list according to user’s choice.

In: Computer Science

This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array...

This LinkedListUtil class tests various usages of the LinkedList class. The single param is 
an array of string. You will create a linked list with the string elements and return the 
linked list with all but the 1st two elements removed.

Note: In this question use a for or while loop instead of the suggested iterator. You should also ignore CodeCheck’s error message about a missing class (LinkedListUtil.class). Your code still needs to pass all test cases.

EDIT: For clarifcation you want to remove all besides the first 2 elements. So only the first 2 elements should be returned

LinkedListUtil.java

import java.util.LinkedList;
import java.util.ListIterator;

/**
This LinkedListUtil class tests various usages of the LinkedList class
*/
public class LinkedListUtil
{
/**
Constructs a LinkedListUtil.
@param list is the initialized list
*/
public LinkedListUtil(LinkedList list)
{
this.list = list;
}

/**
deletes all but the first two linked list enries
*/
public void processList()
{
// TODO: create a list iterator and remove all but the first two elements
}


private LinkedList list;

// this method is used to check your work
public static LinkedList check(String[] values)
   {  
LinkedList list = new LinkedList();
for (String s : values)
       list.addLast(s);

LinkedListUtil tester = new LinkedListUtil(list);
tester.processList();
return list;
}

}

In: Computer Science

This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array...

This LinkedListUtil class tests various usages of the LinkedList class. The single param is 
an array of string. You will create a linked list with the string elements and return the 
linked list with all but the 1st two elements removed.

Note: In this question use a for or while loop instead of the suggested iterator. You should also ignore CodeCheck’s error message about a missing class (LinkedListUtil.class). Your code still needs to pass all test cases.

EDIT: you want to remove all besides the first 2 elements. So only the first 2 elements should be returned

LinkedListUtil.java

import java.util.LinkedList;
import java.util.ListIterator;

/**
This LinkedListUtil class tests various usages of the LinkedList class
*/
public class LinkedListUtil
{
/**
Constructs a LinkedListUtil.
@param list is the initialized list
*/
public LinkedListUtil(LinkedList list)
{
this.list = list;
}

/**
deletes all but the first two linked list enries
*/
public void processList()
{
// TODO: create a list iterator and remove all but the first two elements
}


private LinkedList list;

// this method is used to check your work
public static LinkedList check(String[] values)
   {  
LinkedList list = new LinkedList();
for (String s : values)
       list.addLast(s);

LinkedListUtil tester = new LinkedListUtil(list);
tester.processList();
return list;
}

}

In: Computer Science

This year several students complained that students in one section received much higher marks than those...

This year several students complained that students in one section received much higher marks than those in other sections of the same course. The Department chair recorded student grades across the sections in an effort to determine if there was a relationship between grades achieved an instructor. Can the chair infer that the grade achieved was independent of the instructor for each class at a 5% level of significance?

Instructor

PA

ML

OK

ST

total

Grade Achieved

A

8

14

9

4

35

B

13

8

11

10

42

C

10

4

6

12

32

D

6

5

5

10

26

F

3

3

5

4

15

Total

40

34

36

40

150

In: Statistics and Probability

Understanding how the American university culture affects students requires analyzing the cultural norms that students bring...

Understanding how the American university culture affects students requires analyzing the cultural norms that students bring to college and how these norms interact with the norms institutionalized in university settings. Cultural models of self—implicit understandings of oneself in relation to others and the social context—are one important source of these individual and institutional norms (Cross & Madson, 1997; Markus & Kitayama, 2010). Research conducted in a variety of cultural contexts has identified two common models of self that provide culture-specific norms for how to think, feel, and act (Markus & Kitayama, 1991). The independent model of self assumes that the normatively appropriate person should influence the context, be separate or distinct from other people, and act freely based on personal motives, goals, and preferences (Markus & Kitayama, 2003). In contrast, the interdependent model of self assumes that the normatively appropriate person should adjust to the conditions of the context, be connected to others, and respond to the needs, preferences, and interests of others. The independent and interdependent models both constitute sets of social norms, each providing a different guide or blueprint for how people should relate to others and to the social world (Adams, Anderson, & Adonu, 2004).

1. The above passage indicates two different sets of social norms. What are they?

2. Compare and contrast each set of social norms with the axiology of economics.

3. Which set of social norms is less similar to that axiology?

4. What would that predict the success of first-generation college students who study economics?

In: Economics

Are medical students more motivated than law students? A randomly selected group of each were administered...

Are medical students more motivated than law students? A randomly selected group of each were administered a survey of attitudes toward Life, which measures motivation for upward mobility. The scores are summarized below. The researchers suggest that there are occupational differences in mean testosterone level. Medical doctors and university professors are two of the occupational groups for which means and standard deviations are recorded and listed in the following table.

Group Sample size Mean StDev
Medical n1=8n1=8 x¯1=82.66x¯1=82.66 s1=5.73s1=5.73
Law n2=12n2=12 x¯2=79.92x¯2=79.92 s2=14.47s2=14.47

Let us denote:

  • μ1:μ1: population mean testosterone among medical doctors,
  • μ2:μ2: population mean testosterone among university professors,
  • σ1:σ1: population standard deviation of testosterone among medical doctors,
  • σ2:σ2: population standard deviation of testosterone among university professors.

If the researcher is interested to know whether the mean testosterone level among medical doctors is higher than that among university professors, what are the appropriate hypotheses he should test?
H0:x¯1=x¯2H0:x¯1=x¯2 against Ha:x¯1<x¯2Ha:x¯1<x¯2 .
H0:μ1=μ2H0:μ1=μ2 against Ha:μ1≠μ2Ha:μ1≠μ2 .
H0:x¯1=x¯2H0:x¯1=x¯2 against Ha:x¯1>x¯2Ha:x¯1>x¯2 .
H0:μ1=μ2H0:μ1=μ2 against Ha:μ1<μ2Ha:μ1<μ2 .
H0:x¯1=x¯2H0:x¯1=x¯2 against Ha:x¯1≠x¯2Ha:x¯1≠x¯2 .
H0:μ1=μ2H0:μ1=μ2 against Ha:μ1>μ2Ha:μ1>μ2 .

Case 1: Assume that the population standard deviations are unequal, i.e. σ1≠σ2σ1≠σ2 .
What is the standard error of the difference in sample mean x¯1−x¯2x¯1−x¯2 ? i.e. s.e.(x¯1−x¯2)=s.e.(x¯1−x¯2)= [answer to 4 decimal places]

Rejection region: We reject H0H0 at 5% level of significance if:
|t|>2.13|t|>2.13 .
t>1.75t>1.75 .
t<−1.75t<−1.75 .
t<−2.13t<−2.13 .
t>2.13t>2.13 .
None of the above.

The value of the test-statistic is: Answer to 3 decimal places.

If α=0.05α=0.05 , and the p-value is 0.2820, what will be your conclusion?
There is not enough information to conclude.
Reject H0H0 .
Do not reject H0H0 .

Case 2: Now assume that the population standard deviations are equal, i.e. σ1=σ2σ1=σ2 .
Compute the pooled standard deviation, 8pooled [answer to 4 decimal places]

Rejection region: We reject H0H0 at 5% level of significance if:
t<−1.73t<−1.73 .
t<−2.10t<−2.10 .
t>1.73t>1.73 .
t>2.10t>2.10 .
|t|>2.10|t|>2.10 .
None of the above.

The value of the test-statistic is: Answer to 3 decimal places.

If α=0.05α=0.05 , , and the p-value is 0.3095, what will be your conclusion?
Reject H0H0 .
Do not reject H0H0 .
There is not enough information to conclude.

In: Statistics and Probability

A student set out to see if female students spend more time studying than male students....

A student set out to see if female students spend more time studying than male students. He randomly surveyed 30 females and 30 males and asked them how much time they spend studying, on average, per day. The data is obtained is shown below.

H0: mean study time for females = mean study time for males

H1: mean study time for females > mean study time for males

  1. Which hypothesis should be supported?

# of hours spent studying

female counts

male counts

1

6

10

2

7

6

3

7

7

4

2

5

5

3

1

6

3

0

7

2

1

In: Statistics and Probability

A professor sees students during regular office hours. Time spent with students follow an exponential distribution...

A professor sees students during regular office hours. Time spent with students follow an
exponential distribution with mean of 20 minutes.
a. Write the p.d.f of X, E(X) and Var(X). ( 2 marks)
b. Find the probability that a given student spends less than 0.4 hours with the professor.
(1mark)
c. Find the probability that a given student spends more than 0.25 hours with the professor.
(1mark)
d. Find the probability that a given student spends between 0.20 and 0.5 hours with the
professor. (1mark)
e. Find the probability that a given student spends at least 0.75 hours with the professor.
(1mark)
B) If X is N (9,0.25?
2
), find:
(a) P(X> 9), (b) P( 9−? < ? < 9 + ?), (c) P(9−2? < ? < 9 + 3?), (d) P( X< 9 + 4?)

In: Statistics and Probability

A student set out to see if female students spend more time studying than male students....

A student set out to see if female students spend more time studying than male students. He randomly surveyed 30 females and 30 males and asked them how much time they spend studying, on average, per day. The data is obtained is shown below.

H0: mean study time for females = mean study time for males

H1: mean study time for females > mean study time for males

  1. What type of test should we use to analyze this data and why?

  2. Are there any assumptions that we must make about the two populations (female students / male students) before we proceed?

  3. Analyze the data with the appropriate test using a 10% significance level. State the p-value and compare it to alpha.

  4. Which hypothesis should be supported?

  5. Could you have made an error in your decision? If so, what? And what could have caused you to make an error?

# of hours spent studying

female counts

male counts

1

6

10

2

7

6

3

7

7

4

2

5

5

3

1

6

3

0

7

2

1

In: Statistics and Probability

Two random samples of 40 students were drawn independently from two populations of students. Assume their...

Two random samples of 40 students were drawn independently from two populations of students. Assume their aptitude tests are normally distributed (total points = 100). The following statistics regarding their scores in an aptitude test were obtained: xbar1= 76, s1 = 8, xbar2 = 72, and s2 = 6.5.
Test at the 5% significance level to determine whether we can infer that the two population means differ. (Note: You cannot necessarily assume that the populations have the same variances).

Please Solve manually.

In: Statistics and Probability