Questions
1.Understand how to interpret values, such as lambda, gamma, etc. 2.When is Phi appropriate? 3.When Cramer’s...

1.Understand how to interpret values, such as lambda, gamma, etc.

2.When is Phi appropriate?

3.When Cramer’s V appropriate?

4.What values can phi take on?

5.What if the table is larger than 2x2?

In: Math

What is the difference between the color-blind perspective on race and blatant bigotry? How does the...

What is the difference between the color-blind perspective on race and blatant bigotry? How does the color-blind ideology lead to racism evasiveness? Why is it often so difficult to recognize and address racial discrimination in the United States today? v

In: Psychology

2. Discuss the concepts of emotional expressions and relationships in early development (1-2 paragraphs) 6. Discuss...

2. Discuss the concepts of emotional expressions and relationships in early development (1-2 paragraphs)
6. Discuss the process of brain development in early childhood. How ford the concept of nature v. Nurture relate to this issue? (1-2 paragraphs)

In: Psychology

You have 875 mL of an 0.39 M acetic acid solution. What volume (V) of 1.70...

You have 875 mL of an 0.39 M acetic acid solution. What volume (V) of 1.70 M NaOH solution must you add in order to prepare an acetate buffer of pH = 4.36? (The pKa of acetic acid is 4.76.)

In: Chemistry

What is the potential of a cell made up of Zn|Zn2+ and Cu|Cu2+ half-cells at 25o...

What is the potential of a cell made up of Zn|Zn2+ and Cu|Cu2+ half-cells at 25o C if [Zn2+] = 0.25 M and [Cu2+] = 0.15 M?

(Answer should be E = +1.09 V but I need to know how to get to that)

In: Chemistry

You are provided with the files "Song.java" and "SongList.java". You are required complete the methods in...

You are provided with the files "Song.java" and "SongList.java". You are required complete the methods in the latter file to implement the sorted circular linked list. The list is sorted according to the title of each song in alphabetical order. You need to write these methods: add(String artist, String title) – This method takes an artist and a title and adds a Song node with these values into the list. The list must still be sorted in ascending order by song title. You do not need to handle duplicates – you can assume that we never insert the same song for more than once. This method takes an artist and a title and remove a Song node that matches the artist and the title from the list. If remove is successful, return true. If no such node exists, return false. buildList(String artist) – This method takes an artist and searches in the list for all the song nodes associated with this artist. It then adds all these nodes into a new sorted circular linked list and returns it as a SongList object. Do not alter the original song list in this method.

public class Song
{
// instance variables
private String m_artist;
private String m_title;
private Song m_link;

// constructor
public Song(String artist, String title)
{
m_artist = artist;
m_title = title;
m_link = null;
}

// getters and setters
public void setArtist(String artist)
{
m_artist = artist;
}

public String getArtist()
{
return m_artist;
}

public void setTitle(String title)
{
m_title = title;
}

public String getTitle()
{
return m_title;
}
  
public void setLink(Song link)
{
m_link = link;
}

public Song getLink()
{
return m_link;
}
}

public class SongList
{
// instance variables
private Song m_last;
private int m_numElements;

// constructor
// Do not make any changes to this method!
public SongList()
{
m_last = null;
m_numElements = 0;
}

// check whether the list is empty
// Do not make any changes to this method!
boolean isEmpty()
{
if (m_last == null)
return true;
else
return false;
}

// return the size of the list (# of Song nodes)
// Do not make any changes to this method!
public int size()
{
return m_numElements;
}

// add a new Song to the circular linked list with the given artist and
// title, keeping the list sorted by *song title*.
public void add(String artist, String title)
{
// TODO: implement this method
}

// remove a Song associated with the given artist and title from the list,
// keeping the list sorted by *song title*.
public boolean remove(String artist, String title)
{
find(artist);
if(found)
{
if (Songlist == Songlist.getLink())
list = null;
else if (previous.getLink() == Songlist)
previous.setLink(m_last.getLink());
numElements--;
}
  
return found;

}
  
  
// build and return a circular linked list that contains all songs from the
// given artist
public SongList buildList(String artist)
{
// TODO: implement this method
}
  
// return a string representation of the list
// Do not make any changes to this method!
public String toString()
{   
String listContent = "";
Song current = m_last;
  
if (m_last != null)
do
{
current = current.getLink();
listContent += " [" + current.getArtist() + " - " + current.getTitle() + "]\n";

} while (current != m_last);

return listContent;
}
}

In: Computer Science

In C, write a program that will simulate the operations of the following Round-Robin Interactive scheduling...

In C, write a program that will simulate the operations of the following Round-Robin Interactive scheduling algorithm.

It should implement threads for the algorithm plus the main thread using a linked list to represent the list of jobs available to run. Each node will represent a Job with the following information:

  • int ProcessID
  • int time
    • time needed to finish executing

The thread representing the scheduler algorithm should continue running until all jobs end. This is simulated using the time variable in each node; the program thread will iterate through the linked list jobs until the list is empty. In each iteration, you will subtract a quantum amount from each job to simulate the processing time executing on a CPU. If a node time variable is less than or equal to zero, this will simulate that a process has completed, and it is time to remove this job/node from the list.

Main thread:

  • Ask the user to specify a value to be used as the quantum.
    • request the user to input the number of jobs, and then proceed to fill the information in each job node; each data item will be stored in a separate node.
    • Start the RoundRobin Thread and wait till all jobs finish.

RoundRobin thread:

  • The thread will simulate the Round Robin algorithm.
    • Displays data in the list in the order they were inserted.
    • Each iteration of the algorithm, the thread should deduct the quantum amount from each job.
    • If a job time reaches zero, remove this job from the linked list and continue to iterate the list.
    • When there are no more jobs in the list, exit the thread.

In: Computer Science

Linked Lists Problem 1 Implement a program that reads the following ages (type int) from text...

Linked Lists

Problem 1
Implement a program that reads the following ages (type int) from text file ages.txt and stores
them in a linked list:
16 18 22 24 15 31 27 19 13
Implement the class LinkedList along with any applicable member functions (e.g. void
insert(int num)).
Perform the following actions on the list (if applicable, use recursion):
1. Display the data in the list
2. Insert 18 at the front of the list
3. Insert 23 at the end of the list
4. Insert 25 after the number 24
5. Compute the average age
6. Sort the ages in ascending order
7. Determine how many people are 18 or older

Problem 2
Implement a program that reads the following data (two strings, one double) from text file
balances.txt and stores it in a linked list:
John Miller 2508.13
Carolyn Spacer 188.54
Mark Lee 1816.82
Sophia Brown 3200.68
Jim Gomez 12068.34
Carlos Mendoza 783.41
Erica Robertson 2000.67
Implement the class LinkedList along with any applicable member functions (e.g. void
moveToEnd(string fullName)).
Perform the following actions on the list:
1. Display the data in the list
2. Remove the person with the lowest balance
3. Display the name and balance of the person with the most money
4. Display the average balance of people with a balance of $2,000 or more
5. Find Sophia Brown and move her to the end of the list (use multipurpose helper
functions to make this easier)

In: Computer Science

int main() {    footBallPlayerType bigGiants[MAX];    int numberOfPlayers;    int choice;    string name;   ...

int main()
{
   footBallPlayerType bigGiants[MAX];
   int numberOfPlayers;
   int choice;
   string name;
   int playerNum;
   int numOfTouchDowns;
   int numOfcatches;
   int numOfPassingYards;
   int numOfReceivingYards;
   int numOfRushingYards;
   int ret;
   int num = 0;
   ifstream inFile;
   ofstream outFile;
   ret = openFile(inFile);
   if (ret)
       getData(inFile, bigGiants, numberOfPlayers);
   else
       return 1;
   /// replace with the proper call to getData
   do
   {
       showMenu();
       cin >> choice;
       cout << endl;
       switch (choice)
       {
       case 1:
           cout << "Enter player's name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           printPlayerData(bigGiants, num, playerNum);
           break;
       case 2:
           printData(bigGiants, num);
           break;
       case 3:
           cout << "Enter player name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           cout << "Enter number of touch downs to be added: ";
           cin >> numOfTouchDowns;
           cout << endl;
           /// replace with call to update TouchDowns from group 1
           break;
       case 4:
           cout << "Enter player name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           cout << "Enter number of catches to be added: ";
           cin >> numOfcatches;
           cout << endl;
           break;
       case 5:
           cout << "Enter player name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           cout << "Enter number of passing yards to be added: ";
           cin >> numOfPassingYards;
           cout << endl;
           /// replace with call to updatePassingYards from group 3
           break;
       case 6:
           cout << "Enter player name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           cout << "Enter number of receiving yards to be added: ";
           cin >> numOfReceivingYards;
           cout << endl;
           /// replace with call to update Receiving Yards from group 4
           break;
       case 7:
           cout << "Enter player name: ";
           cin >> name;
           cout << endl;
           playerNum = searchData(bigGiants, num, name);
           cout << "Enter number of rushing yards to be added: ";
           cin >> numOfRushingYards;
           cout << endl;
           /// replace with call to update Rushing Yards from group 5
           break;
       case 99:
           break;
       default:
           cout << "Invalid selection." << endl;
       }
   } while (choice != 99);
   char response;
   cout << "Would you like to save data: (y,Y/n,N) ";
   cin >> response;
   cout << endl;
   if (response == 'y' || response == 'Y')
       saveData(outFile, bigGiants, num);
   inFile.close();
   outFile.close();
   return 0;
}
/// If file cannot be opened, a 1 is returned.
/// Parameter: ifstream
int openFile(ifstream& in) {
   string filename;
   cout << "Please enter football data file name: ";
   cin >> filename;
   in.open(filename.c_str());
   if (!in)
   {
       cout << filename << " input file does not exist. Program terminates!" << endl;
       return 1;
   }
   return 0;
}
/// Function requests file name from the user and opens file.
/// Post condition: If no error encountered, file is opened.
/// If file cannot be opened, a 0 is returned.
/// Parameter: ofstream
int openOutFile(ofstream& out) {
   string filename;
   cout << "Please enter the name of the output file: ";
   cin >> filename;
   out.open(filename.c_str());
   if (!out)
   {
       return 0;
   }
   return 1;
}
void showMenu()
{
   cout << "Select one of the following options:" << endl;
   cout << "1: To print a player's data" << endl;
   cout << "2: To print the entire data" << endl;
   cout << "3: To update a player's touch downs" << endl;
   cout << "4: To update a player's number of catches" << endl;
   cout << "5: To update a player's passing yards" << endl;
   cout << "6: To update a player's receiving yards" << endl;
   cout << "7: To update a player's rushing yards" << endl;
   cout << "99: To quit the program" << endl;
}
/// Reads data into the structure array
/// Precondition: ifstream is open, howMany initialized to 0
/// Postcondition: the structure array contains data from the input file
/// the howMany parameter contains the number of rows read
/// Parameters: ifstream, structure array, int file read counter
void getData(ifstream& inf, footBallPlayerType list[], int& howMany)
{
   howMany = 0;
   while (inf)
   {
       inf >> list[howMany].name >> list[howMany].position >> list[howMany].touchDowns >> list[howMany].catches >> list[howMany].passingYards >> list[howMany].receivingYards >> list[howMany].rushingYards;
       howMany++;
   }
}

/// Prints statistics for a selected player
/// Precondition: structure array contains data, length contains number of
void printPlayerData(footBallPlayerType list[], int length, int playerNum)
{
   if (0 <= playerNum && playerNum < length)
       cout << "Name: " << list[playerNum].name
       << " Position: " << list[playerNum].position << endl
       << "Touch Downs: " << list[playerNum].touchDowns
       << "; Number of Catches: " << list[playerNum].catches << endl
       << "Passing Yards: " << list[playerNum].passingYards
       << "; Receiving Yards: " << list[playerNum].receivingYards
       << "; Rushing Yards: " << list[playerNum].rushingYards << endl << endl;
   else
       cout << "Invalid player number." << endl << endl;
}
void printData(footBallPlayerType list[], int length)
{
   cout << left << setw(15) << "Name"
       << setw(14) << "Position"
       << setw(12) << "Touch Downs"
       << setw(9) << "Catches"
       << setw(12) << "Pass Yards"
       << setw(10) << "Rec Yards"
       << setw(12) << "Rush Yards" << endl;
   for (int i = 0; i < length; i++)
       cout << left << setw(15) << list[i].name
       << setw(14) << list[i].position
       << right << setw(6) << list[i].touchDowns
       << setw(9) << list[i].catches
       << setw(12) << list[i].passingYards
       << setw(10) << list[i].receivingYards
       << setw(12) << list[i].rushingYards << endl;
   cout << endl << endl;
}
/// Saves updated data to file name entered by user
/// Precondition: structure array contains data, length of array is filled
/// Postcondition: If requested file is opened, updated data is written to the
/// Parameters: ofstream, structure array, int length of array
void saveData(ofstream& outF, footBallPlayerType list[], int length)
{
   int ret;
   ret = openOutFile(outF);
   if (!ret) {
       cout << "Output file did not open...data will not be output to a file. " << endl;
       return;
   }
   for (int i = 0; i < length; i++)
       outF << list[i].name
       << " " << list[i].position
       << " " << list[i].touchDowns
       << " " << list[i].catches
       << " " << list[i].passingYards
       << " " << list[i].receivingYards
       << " " << list[i].rushingYards << endl;
}
/// Finds a football player by name
int searchData(footBallPlayerType list[], int length, string n)
{
   for (int i = 0; i < length; i++)
       if (list[i].name == n)
           return i;
   return -1;
}

I need help with my errors

The header file below

#include <iostream>#include <fstream>#include <string>#include <iomanip>using namespace std;struct footBallPlayerType{ string name; string position; int touchDowns; int catches; int passingYards; int receivingYards; int rushingYards;};const int MAX = 30;int openFile(ifstream&);int openOutFile(ofstream& out);void showMenu();void getData(ifstream& inf, footBallPlayerType list[], int& length);void printPlayerData(footBallPlayerType list[], int length, int playerNum);void printData(footBallPlayerType list[], int length);void saveData(ofstream&

In: Computer Science

I have answered sections A/B. Can you double check my answers for C/D, then solve E/F....

I have answered sections A/B. Can you double check my answers for C/D, then solve E/F. In total, I need the correct answers for C, D. E. F. Thank you! The question is below...

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Dr. Pepper wants to examine if a training program has an effect on weekly exercise. College students exercise an average of 2.2 days a week with a standard deviation of 1.7 days. Dr. Pepper's sample of 27 students exercise an average of 2.3 days a week. What can be concluded with an α of 0.10?

a) What is the appropriate test statistic?
-- z-test

b)
Population:
--- college students
Sample:
--individuals exposed to the training program

c) Obtain/compute the appropriate values to make a decision about H0.
(Hint: Make sure to write down the null and alternative hypotheses to help solve the problem.)
critical value =  1.645; test statistic = 0.3056
Decision:  --Fail to reject H0

d) If appropriate, compute the CI. If not appropriate, input "na" for both spaces below.
[ 1.7618 ,  2.8382]

e) Compute the corresponding effect size(s) and indicate magnitude(s).
If not appropriate, input and select "na" below.
d = __________ ;      *(choose one)1. na 2. trivial effect 3. small effect 4. medium effect 5. large effect
r2 =___________ ;      *(choose one)1. na 2. trivial effect 3. small effect 4. medium effect 5. large effect

f) Make an interpretation based on the results.

1) Individuals that went through the training program did significantly more exercise than college students.

2) Individuals that went through the training program did significantly less exercise than college students.    

3) The training program has no significant effect on weekly exercise.

In: Statistics and Probability