.Create, test, and validate an XHTML document that describes an ordered list with the following contents: The highest level should be the names of your parents, with your mother first. Under each parent, you must have a nested, ordered list of the brothers and sisters of your parents, in order by age, eldest first. Each of the nested lists in turn must have nested lists that list the children of your uncles and aunts (your cousins)—under the proper parents, of course. Regardless of how many aunts, uncles, and cousins you actually have, there must be at least three list items in each sublist below each of your parents and below each of your aunts and uncles.
In: Computer Science
We wonder if caffeine facilitates the learning of nonsense syllables. We randomly assign participants to one of two groups. People in the experimental group drink 2 cups of coffee and then learn a list of nonsense syllables. People in the control group drink 2 cups of plain water and then learn the same list. We record the number of trials required to perfectly learn the list for each participant. Did participants who drank the coffee learn the list faster than participants who drank the water? Be sure to interpret your answer completely, including a graph if appropriate.
| Experimental Coffee | Control water |
|---|---|
| 7 | 9 |
| 9 | 12 |
| 7 | 15 |
| 11 | 17 |
| 10 | 14 |
In: Statistics and Probability
Using pthread_create(), pthread_join(), and pthread_exit(), write a C or C++ program running on VirtualBox Debian VM shell to sort a list of signed integers in nondecreasing order using the sorting algorithm of your own choice from a text file containing the integers.
The input data should be stored in a file named p2data.txt
Sort a list of signed integers in nondecreasing order using three threads, among which two of them are sorting threads responsible for sorting each of the two sublists, while the third thread (i.e. the merging thread) is responsible for merging the two sorted sublists into a single sorted list. You may assume that the total number of integers in the list is less than or equal to 20.
In: Computer Science
Write a C program that creates and prints out a linked list of strings.
• Define your link structure so that every node can store a string of up to 255 characters.
• Implement the function insert_dictionary_order that receives a word (of type char*) and inserts is into the right position.
• Implement the print_list function that prints the list.
• In the main function, prompt the user to enter strings (strings are separated by white-spaces, such as space character, tab, or newline).
• Read and insert every string into the link list until you reach a single dot “.” or EOF.
• Print the list. Use scanf to read strings. Use strcpy() for copying strings.
Here is a sample text input:
This is a sample text. The file is terminated by a single dot: .
In: Computer Science
Task 4
The class Polynomials is a collection of polynomials of either
implementation stored in an instance of the
generic library class List.
class Polynomials
{
private List<Polynomial> L;
// Creates an empty list L of polynomials
public Polynomials ( )
{ … } (1 mark)
// Retrieves the polynomial stored at position i in L
public Polynomial Retrieve (int i) (1 mark)
{ … }
// Inserts polynomial p into L
public void Insert (Polynomial p) (1 mark)
{ … }
// Deletes the polynomial at index i
public void Delete (int i) (1 mark)
{ … }
// Returns the number of polynomials in L
public int Size ( )
{ … } (1 mark)
// Prints out the list of polynomials
public void Print ( )
{ … }
}
In: Computer Science
The class Polynomials is a collection of polynomials of either
implementation stored in an instance of the
generic library class List.
class Polynomials
{
private List L;
// Creates an empty list L of polynomials
public Polynomials ( )
{ … } (1 mark)
// Retrieves the polynomial stored at position i in L
public Polynomial Retrieve (int i) (1 mark)
{ … }
// Inserts polynomial p into L
public void Insert (Polynomial p) (1 mark)
{ … }
// Deletes the polynomial at index i
public void Delete (int i) (1 mark)
{ … }
// Returns the number of polynomials in L
public int Size ( )
{ … } (1 mark)
// Prints out the list of polynomials
public void Print ( )
{ … }
Please use C# to answer
In: Computer Science
*In C++ Please! This problem uses the concept of linked list
What is a C++ structure? Store product-id, product-name, and price per unit in a C++ structure. Use a C++ class with a member variable of that structure and provide read and write member functions for the product details.
Suppose the product names are stored in alphabetical order, Write the C++ insert function to insert a new product ‘tooth brush’ in that linked list.
Suppose the product names are stored in alphabetical order, Write the C++ delete function to remove product ‘tooth brush’ in that linked list.
Suppose the product names are stored in alphabetical order, Write the C++ count function to display the number of products in that linked list
In: Computer Science
In racket
Assume that the elements of a list are indexed starting with 1. Write a function alts that takes a list of integers xs and returns a pair of lists, the first of which has all the odd-indexed elements (in the same relative order as in xs) and the second of which has all the even-indexed elements (in the same relative order as in xs).
Output should be
(alts (list 7 5 4 6 9 2 8 3)) '((7 4 9 8)5 6 2 3)
(alts (list 5 4 6 9 2 8 3)) '((5 6 2 3) 4 9 8)
Any help would be appreciated, we're not allowed to use cond
In: Computer Science
PLEASE COMPLETE BOTH PARTS (LANGUAGE: C++ if necessary)
Part I
For the following example, determine the number of comparisons that will take place during a search using both searching algorithms (Linear search and binary search). Also, list each comparison for each algorithm(Linear and binary). The number being searched for is 13.
List = {1,3,5,9,10,11,15,17,19,23,24,25,29,31,33,37,38,39,43,45,47,51,52,53,57,59,61}
Part 2
For the following example, determine the number of swaps that will take place during a sort using both sorting algorithms (bubble and selection sort). Also, list each swap for each algorithm (bubble and selection)
List = {23, 10, 3, -5, 2, 7, 0, 20, 15, 17, 9, 11, 4, 1}
In: Computer Science
C#
Create a console application named that creates a list of shapes, uses serialization to save it to the filesystem using XML, and then deserializes it back:
// create a list of Shapes to serialize
var listOfShapes = new List<Shape>
{
new Circle { Colour = "Red", Radius = 2.5 },
new Rectangle { Colour = "Blue", Height = 20.0, Width =
10.0 },
new Circle { Colour = "Green", Radius = 8 },
new Circle { Colour = "Purple", Radius = 12.3
},
new Rectangle { Colour = "Blue", Height = 45.0, Width =
18.0 }
};
Shapes should have a read-only property named Area so that when you deserialize, you can output a list of shapes, including their areas, as shown here:
List<Shape> loadedShapesXml =
serializerXml.Deserialize(fileXml)
as List<Shape>;
foreach (Shape item in loadedShapesXml) {
WriteLine($"{item.GetType().Name} is {item.Colour} and has
an
area of {item.Area}");
}
This is what your output should look like when you run the application:
Loading shapes from XML:
Circle is Red and has an area of
19.6349540849362
Rectangle is Blue and has an area of 200
Circle is Green and has an area of
201.061929829747
Circle is Purple and has an area of
475.2915525616
Rectangle is Blue and has an area of 810
In: Computer Science