Questions
INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO? ****IMPORTANT**** PLEASE READ CAREFULLY...

INPUT FILE INTO ARRAY. CHECKING FOR COMMAS AND SUCH. HOW TO DO? ****IMPORTANT**** PLEASE READ CAREFULLY ****IMPORTANT****

***GOALS***

HOW TO CHECK FOR COMMAS, TILL THE END OF FILE. IT WILL CHECK THE LINE FOR THE APPRORIATE FORMAT IN THE TEXT FILE. IF THERE IS MISSING A COMMA, IT WILL IGNORE, IF THERE IS A WHITE SPACE, IT WILL CORRECT AND READ LINE, IF IT IS MISSING 1 OF THE 3 INFORMATION, IT WILL IGNORE.

Display candidates’ names using displayList() function
 Execute the getWinner(Candidate[]) function to get the candidate with the highest number of votes. Display his name along with number of votes.
 Execute the getLast(Candidate[]) function to get the candidate with the lowest number of votes. Display his name along with number of votes.
 Calculate pScore for each candidate
 Sort candidates by votes
 Display sorted list using displayList() function
 For three records with the highest pScore, use the roundScore function to round the pScore
 Display list again using displayList() function

void readFile(Candidate candidates[]) – reads the elections.txt file, fills the candidates[] array. Hint: use substr() and find() functions. Set Score to 0.


void List(Candidate candidates[]) – prints the array of Candidate structs. One candidate per one line, include all fields. Use setw() to display nice looking list.


void displayCandidate(Candidate candidates[]) – prints the complete information about the candidate

.
Candidate First(Candidate candidates[]) – returns single struct element: candidate with highest score


Candidate Last(Candidate candidates[]) – returns single struct element: candidate with lowest score


void Votes(Candidate candidates[]) – function sorts the candidates[] array by number of votes, the order in candidates[] array is replaced


void Scores(Candidate candidates[]) – calculates the percentage score for each candidate. Use the following formula: ??????=(CandidateVotes)/(sum of votes)*100%

Correct line for the reference: F=John,L=Smith,V=3342

The line errors that your program needs to detect, are as follows:

incorrect token / separator, example in line 5: F=Steven,L=JohnV=4429 --- (comma missing) – lines with this error need to be ignored

space in token, example in line 3: F=Hillary,X=Clinton, V=1622 --- lines with this error need to be read, error fixed, data included in your dataset

empty line, example in line 6 – empty lines need to be ignored

Example Textfile

F=Michael,L=John,V=3342

F=Danny,L=Red,V=2003

F=Hillary,L=Clinton, V=1588

F=Albert,L=Lee,V=5332

F=Steven,L=JohnV=4429

*IMPORTANT* How would I do the readFile function? It says to check if the commas are present, and that the program will correct the line if there is white spaces. How do i use the find() function? Please be DETAILED in explanations of each part of code. Beginner Coder. *IMPORTANT*

Code Skeleton We HAVE to follow. How Would i go about using this skeleton?YOU CANNOT CHANGE WHAT IS ALREADY THERE ON THE SKELETON, YOU MAY ADD EXTRA INFORMATION THOUGH:

#include <iostream>

#include <iomanip>

#include <string>

#include <stdlib.H>

#include <fstream>

using namespace std;

struct Candidate {
string Fname;
string Lname;
int votes;
double Score;
};

const int MAX_SIZE = 100;

void readFile(Candidate[]);

void List(Candidate[]);

void Votes(Candidate[]);

void displayCandidate(Candidate);

Candidate First(Candidate[]);

Candidate Last(Candidate[]);

void Scores(Candidate[]);

int main() {

}

void readFile(Candidate candidates[]) {

string line;

ifstream infile;

infile.open("elections.txt");

while (!infile.eof()) {

getline(infile,line);

// your code here

}

infile.close();

}

void List(Candidate candidates[]) {

}

void Votes(Candidate candidates[]) {

}

void displayCandidate(Candidate candidates) {

}

Candidate First(Candidate candidates[]) {

}

Candidate Last(Candidate candidates[]) {

}

void Scores(Candidate candidates[]) {

}

In: Computer Science

The great russian physicist Lev Landau developed a famous entry exam to test his students. This...

The great russian physicist Lev Landau developed a famous entry exam to test his students. This "Theoretical Minimum" contained everything he considered elementary for a young theoretical physicist. Despite its name, it was notoriously hard and comprehensive, and in Landau's time, only 43 students passed it.

I wonder if anyone can provide the list of topics, or even a copy of the exam?

(I'm sure I'd have no chance to pass, but I'd like to see it out of a sense of sportmanship ;-). Also, I think it would make quite a good curriculum of theoretical physics (at least pre 1960).)

In: Physics

A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1001...

A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1001 adults in the United States, "As a child, did you ever believe in Santa Claus, or not?" Of those surveyed, 84% said they had believed as a child. Consider the sample as an SRS. We want to estimate the proportion p of all adults in the United States who would answer that they had believed to the question "As a child, did you ever believe in Santa Claus, or not?" (a) Find a 90% confidence interval (± ± 0.0001) for p p based on this sample. The 90% confidence interval is from to (b) Find the margin of error (± ± 0.0001) for 90%. The margin of error is (c) Suppose we had an SRS of just 150 adults in the United States. What would be the confidence interval (± ± ) for 95% confidence? The 50% confidence interval is from to (d) How does decreasing the sample size change the confidence interval when the confidence level remains the same? Decreasing the sample size creates a less wide interval Decreasing the sample size creates a wider interval

In: Statistics and Probability

Santa Fe Retailing purchased merchandise “as is” (with no returns) from Mesa Wholesalers with credit terms...

Santa Fe Retailing purchased merchandise “as is” (with no returns) from Mesa Wholesalers with credit terms of 3/10, n/60 and an invoice price of $24,900. The merchandise had cost Mesa $16,982. Assume that both buyer and seller use a perpetual inventory system and the gross method.

1. Prepare entries that the buyer records for the (a) purchase, (b) cash payment within the discount period, and (c) cash payment after the discount period.
2. Prepare entries that the seller records for the (a) sale, (b) cash collection within the discount period, and (c) cash collection after the discount period.

Journal entry worksheet

Record Santa Fe Retailing purchased merchandise “as is” (with no returns) from Mesa Wholesalers with credit terms of 3/10, n/60 and an invoice price of $24,900.

Record the merchandise had cost Mesa $16,982.

Record cash received within discount period.

Record cash received after discount period.

Note: Enter debits before credits.

I need the answers.

Transaction General Journal Debit Credit
a-1

In: Accounting

A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1007...

A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1007 adults in the United States, "As a child, did you ever believe in Santa Claus, or not?" Of those surveyed, 84% said they had believed as a child. Consider the sample as an SRS. We want to estimate the proportion p of all adults in the United States who would answer that they had believed to the question "As a child, did you ever believe in Santa Claus, or not?"

(a) Find a 90% confidence interval (±±0.0001) for p based on this sample.

The 90% confidence interval is from __ to ___

b) Find the margin of error (±±0.0001) for 90%.

The margin error is ___

(c) Suppose we had an SRS of just 100 adults in the United States.

What would be the confidence interval (±±) for 95% confidence?

The 50 % confidence interval (+) is from __ to __

(d) How does decreasing the sample size change the confidence interval when the confidence level remains the same?

a. Decreasing the sample size creates a wider interval

b.Decreasing the sample size creates a less wide interval.

In: Math

Program: Java Write a Java program using good programming principles that will aggregate the values from...

Program: Java


Write a Java program using good programming principles that will aggregate the values from several input files to calculate relevant percentages and write the values to an output file.

You have been tasked with reading in values from multiple files that contains different pieces of information by semester. The Department of Education (DOE) would like the aggregate values of performance and demographic information by academic year. A school year begins at the fall semester and concludes at the end of the summer semester the following year. Fall 2019 - Summer 2020 is considered one academic year.

Input Files

  • Input files named Fall2019Analytics.txt, Spring2020Analytics.txt, and Summer2020Analytics.txt have been placed in Canvas.   Each have the same layout but differ by semesters.
  • Each file contains several pieces of data by program - total enrollment, enrollment by gender, completion by gender, enrollment by ethnicity, completion by ethnicity, among other pieces of data.  
  • The program should read in the values from these input files, aggregate the data, and write the information to an output file that will be sent to Tallahassee.
  • From there, the DOE will use this output file as input to aggregate the data from other schools within the state of Florida.
  • It is important that this file is formatted in the proper sequence that the DOE needs - otherwise the college will be heavily fined and may lose accreditation.


These input files contain the data for three programs on campus:

Program code 3624
Program code 5651
Program code 6635

Input file layout (all integer values) by semester:

  • program number
  • total number of students enrolled in the program
  • total number of student completers in the program
  • total number of female students enrolled in the program
  • total number of male students enrolled in the program
  • total number of unknown/not reported gender students enrolled in the program
  • total number of female student completers in the program
  • total number of male student completers in the program
  • total number of unknown/not reported student completers in the program
  • total number of Asian students enrolled in the program
  • total number of Black students enrolled in the program
  • total number of Hispanic students enrolled in the program
  • total number of Multiracial students enrolled in the program
  • total number of Native American students enrolled in the program
  • total number of Native Hawaiian students enrolled in the program
  • total number of Unknown/not reported ethnicity students enrolled in the program
  • total number of White students enrolled in the program
  • total number of Asian student completers in the program
  • total number of Black student completers in the program
  • total number of Hispanic student completers in the program
  • total number of Multiracial student completers in the program
  • total number of Native American student completers in the program
  • total number of Native Hawaiian student completers in the program
  • total number of Unknown ethnicity student completers in the program
  • total number of White students completer in the program


Notes

  • Each value within the file for a program is separated by one space.
  • Each program code is on its own line in each file. There are three lines per file.
  • Use an array or arrayList to hold the values within each file.
  • Each semester should be coded within their own class.


Calculations

The following values must be calculated:

For each semester:
   - the percentage of students completers (total number of student completers / total number of students enrolled)

For each individual program code:
   - grand totals for each category (enrolled, completers, gender, and ethnicity)

Aggregate for all semesters:

   - the total number of students enrolled
   - the total number of student completers
   - the total number by gender
   - the total number by each ethnicity
   - the percentage of student completers (total completers / total enrolled)
   - the percentage of female completers (total number of female completers / total number of female enrolled)
   - the percentage of male completers
   - the percentage of each ethnicity


Output


The output for this project will be two-fold.   The output will be displayed in a Message dialog box and an output file.

The Message Dialog boxes:

Each percentage calculated should be displayed in percentage format with one decimal place.

A sample format (the values are not accurate, this is only for formatting purposes):

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate total number of student enrolled:       5555
Aggregate total number of student completers: 4444

Aggregate percentage of students completing for the academic year: 81.2%

Percentage of students completing Fall 2019:             76.9%
Percentage of students completing Spring 2020:        85.3%
Percentage of students completing Summer 2020:     84.1%

On the next dialog screen, display the following:

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate values for:

Female student completers:     88.8%
Male student completers:                        88.7%
Unknown/not reported completers:    89.1%

Asian completers:    90.1%
Black completers:                                        90.2%
Hispanic completers:                                 90.3%
Multiracial completers:                             90.4%
Native American completers:      90.5%
Native Hawaiian completers:                  90.6%
Unknown/Not Reported completers:   90.7%
White completers:                                       90.8%

Fall2019Analytics.txt: 3624 3729 2946 1774 1445 510 1442 1087 417 627 1021 939 216 47 15 122 742 572 977 735 181 39 11 84 3475651 4074 3585 1956 1977 141 1782 1731 72 413 927 893 314 56 37 395 1039 387 912 803 273 49 30 327 8046635 2116 1837 609 1058 449 582 1031 224 341 402 363 146 89 74 297 404 303 377 321 113 76 57 270 320

Spring2020Analytics.txt: 3624 3496 3102 1579 1238 679 1486 1017 599 703 1137 842 224 32 21 103 434 688 1007 774 221 30 21 101 2605651 3942 3711 1421 2213 308 2148 1349 214 443 739 804 310 46 37 173 1390 439 727 799 216 46 36 162 12866635 2101 1979 797 1273 31 752 1039 188 601 739 426 173 21 15 3 123 592 701 399 162 18 13 2 92

Summer2020Analytics.txt: 3624 2021 1983 771 1137 113 717 1083 183 307 526 601 211 27 4 13 332 297 506 600 208 26 4 13 3295651 3013 2883 1267 1393 353 1240 1297 346 226 402 373 102 16 13 17 1864 214 401 369 96 15 13 17 17586635 1731 1546 663 817 251 612 799 135 107 392 649 81 30 21 71 380 103 384 621 80 30 20 70 238

In: Computer Science

Program: Java Write a Java program using good programming principles that will aggregate the values from...

Program: Java


Write a Java program using good programming principles that will aggregate the values from several input files to calculate relevant percentages and write the values to an output file.

You have been tasked with reading in values from multiple files that contains different pieces of information by semester. The Department of Education (DOE) would like the aggregate values of performance and demographic information by academic year. A school year begins at the fall semester and concludes at the end of the summer semester the following year. Fall 2019 - Summer 2020 is considered one academic year.

Input Files

  • Input files named Fall2019Analytics.txt, Spring2020Analytics.txt, and Summer2020Analytics.txt have been placed in Canvas.   Each have the same layout but differ by semesters.
  • Each file contains several pieces of data by program - total enrollment, enrollment by gender, completion by gender, enrollment by ethnicity, completion by ethnicity, among other pieces of data.  
  • The program should read in the values from these input files, aggregate the data, and write the information to an output file that will be sent to Tallahassee.
  • From there, the DOE will use this output file as input to aggregate the data from other schools within the state of Florida.
  • It is important that this file is formatted in the proper sequence that the DOE needs - otherwise the college will be heavily fined and may lose accreditation.


These input files contain the data for three programs on campus:

Program code 3624
Program code 5651
Program code 6635

Input file layout (all integer values) by semester:

  • program number
  • total number of students enrolled in the program
  • total number of student completers in the program
  • total number of female students enrolled in the program
  • total number of male students enrolled in the program
  • total number of unknown/not reported gender students enrolled in the program
  • total number of female student completers in the program
  • total number of male student completers in the program
  • total number of unknown/not reported student completers in the program
  • total number of Asian students enrolled in the program
  • total number of Black students enrolled in the program
  • total number of Hispanic students enrolled in the program
  • total number of Multiracial students enrolled in the program
  • total number of Native American students enrolled in the program
  • total number of Native Hawaiian students enrolled in the program
  • total number of Unknown/not reported ethnicity students enrolled in the program
  • total number of White students enrolled in the program
  • total number of Asian student completers in the program
  • total number of Black student completers in the program
  • total number of Hispanic student completers in the program
  • total number of Multiracial student completers in the program
  • total number of Native American student completers in the program
  • total number of Native Hawaiian student completers in the program
  • total number of Unknown ethnicity student completers in the program
  • total number of White students completer in the program


Notes

  • Each value within the file for a program is separated by one space.
  • Each program code is on its own line in each file. There are three lines per file.
  • Use an array or arrayList to hold the values within each file.
  • Each semester should be coded within their own class.


Calculations

The following values must be calculated:

For each semester:
   - the percentage of students completers (total number of student completers / total number of students enrolled)

For each individual program code:
   - grand totals for each category (enrolled, completers, gender, and ethnicity)

Aggregate for all semesters:

   - the total number of students enrolled
   - the total number of student completers
   - the total number by gender
   - the total number by each ethnicity
   - the percentage of student completers (total completers / total enrolled)
   - the percentage of female completers (total number of female completers / total number of female enrolled)
   - the percentage of male completers
   - the percentage of each ethnicity


Output


The output for this project will be two-fold.   The output will be displayed in a Message dialog box and an output file.

The Message Dialog boxes:

Each percentage calculated should be displayed in percentage format with one decimal place.

A sample format (the values are not accurate, this is only for formatting purposes):

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate total number of student enrolled:       5555
Aggregate total number of student completers: 4444

Aggregate percentage of students completing for the academic year: 81.2%

Percentage of students completing Fall 2019:             76.9%
Percentage of students completing Spring 2020:        85.3%
Percentage of students completing Summer 2020:     84.1%

On the next dialog screen, display the following:

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate values for:

Female student completers:     88.8%
Male student completers:                        88.7%
Unknown/not reported completers:    89.1%

Asian completers:    90.1%
Black completers:                                        90.2%
Hispanic completers:                                 90.3%
Multiracial completers:                             90.4%
Native American completers:      90.5%
Native Hawaiian completers:                  90.6%
Unknown/Not Reported completers:   90.7%
White completers:                                       90.8%

Fall2019Analytics.txt: 3624 3729 2946 1774 1445 510 1442 1087 417 627 1021 939 216 47 15 122 742 572 977 735 181 39 11 84 3475651 4074 3585 1956 1977 141 1782 1731 72 413 927 893 314 56 37 395 1039 387 912 803 273 49 30 327 8046635 2116 1837 609 1058 449 582 1031 224 341 402 363 146 89 74 297 404 303 377 321 113 76 57 270 320

Spring2020Analytics.txt: 3624 3496 3102 1579 1238 679 1486 1017 599 703 1137 842 224 32 21 103 434 688 1007 774 221 30 21 101 2605651 3942 3711 1421 2213 308 2148 1349 214 443 739 804 310 46 37 173 1390 439 727 799 216 46 36 162 12866635 2101 1979 797 1273 31 752 1039 188 601 739 426 173 21 15 3 123 592 701 399 162 18 13 2 92

Summer2020Analytics.txt: 3624 2021 1983 771 1137 113 717 1083 183 307 526 601 211 27 4 13 332 297 506 600 208 26 4 13 3295651 3013 2883 1267 1393 353 1240 1297 346 226 402 373 102 16 13 17 1864 214 401 369 96 15 13 17 17586635 1731 1546 663 817 251 612 799 135 107 392 649 81 30 21 71 380 103 384 621 80 30 20 70 238

In: Computer Science

Program: Java Write a Java program using good programming principles that will aggregate the values from...

Program: Java


Write a Java program using good programming principles that will aggregate the values from several input files to calculate relevant percentages and write the values to an output file.

You have been tasked with reading in values from multiple files that contains different pieces of information by semester. The Department of Education (DOE) would like the aggregate values of performance and demographic information by academic year. A school year begins at the fall semester and concludes at the end of the summer semester the following year. Fall 2019 - Summer 2020 is considered one academic year.

Input Files

  • Input files named Fall2019Analytics.txt, Spring2020Analytics.txt, and Summer2020Analytics.txt have been placed in Canvas.   Each have the same layout but differ by semesters.
  • Each file contains several pieces of data by program - total enrollment, enrollment by gender, completion by gender, enrollment by ethnicity, completion by ethnicity, among other pieces of data.  
  • The program should read in the values from these input files, aggregate the data, and write the information to an output file that will be sent to Tallahassee.
  • From there, the DOE will use this output file as input to aggregate the data from other schools within the state of Florida.
  • It is important that this file is formatted in the proper sequence that the DOE needs - otherwise the college will be heavily fined and may lose accreditation.


These input files contain the data for three programs on campus:

Program code 3624
Program code 5651
Program code 6635

Input file layout (all integer values) by semester:

  • program number
  • total number of students enrolled in the program
  • total number of student completers in the program
  • total number of female students enrolled in the program
  • total number of male students enrolled in the program
  • total number of unknown/not reported gender students enrolled in the program
  • total number of female student completers in the program
  • total number of male student completers in the program
  • total number of unknown/not reported student completers in the program
  • total number of Asian students enrolled in the program
  • total number of Black students enrolled in the program
  • total number of Hispanic students enrolled in the program
  • total number of Multiracial students enrolled in the program
  • total number of Native American students enrolled in the program
  • total number of Native Hawaiian students enrolled in the program
  • total number of Unknown/not reported ethnicity students enrolled in the program
  • total number of White students enrolled in the program
  • total number of Asian student completers in the program
  • total number of Black student completers in the program
  • total number of Hispanic student completers in the program
  • total number of Multiracial student completers in the program
  • total number of Native American student completers in the program
  • total number of Native Hawaiian student completers in the program
  • total number of Unknown ethnicity student completers in the program
  • total number of White students completer in the program


Notes

  • Each value within the file for a program is separated by one space.
  • Each program code is on its own line in each file. There are three lines per file.
  • Use an array or arrayList to hold the values within each file.
  • Each semester should be coded within their own class.


Calculations

The following values must be calculated:

For each semester:
   - the percentage of students completers (total number of student completers / total number of students enrolled)

For each individual program code:
   - grand totals for each category (enrolled, completers, gender, and ethnicity)

Aggregate for all semesters:

   - the total number of students enrolled
   - the total number of student completers
   - the total number by gender
   - the total number by each ethnicity
   - the percentage of student completers (total completers / total enrolled)
   - the percentage of female completers (total number of female completers / total number of female enrolled)
   - the percentage of male completers
   - the percentage of each ethnicity


Output


The output for this project will be two-fold.   The output will be displayed in a Message dialog box and an output file.

The Message Dialog boxes:

Each percentage calculated should be displayed in percentage format with one decimal place.

A sample format (the values are not accurate, this is only for formatting purposes):

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate total number of student enrolled:       5555
Aggregate total number of student completers: 4444

Aggregate percentage of students completing for the academic year: 81.2%

Percentage of students completing Fall 2019:             76.9%
Percentage of students completing Spring 2020:        85.3%
Percentage of students completing Summer 2020:     84.1%

On the next dialog screen, display the following:

Santa Fe College
Academic Year 2019 - 2020
Program codes: 3624, 5651, and 6635

Aggregate values for:

Female student completers:     88.8%
Male student completers:                        88.7%
Unknown/not reported completers:    89.1%

Asian completers:    90.1%
Black completers:                                        90.2%
Hispanic completers:                                 90.3%
Multiracial completers:                             90.4%
Native American completers:      90.5%
Native Hawaiian completers:                  90.6%
Unknown/Not Reported completers:   90.7%
White completers:                                       90.8%

Fall2019Analytics.txt: 3624 3729 2946 1774 1445 510 1442 1087 417 627 1021 939 216 47 15 122 742 572 977 735 181 39 11 84 3475651 4074 3585 1956 1977 141 1782 1731 72 413 927 893 314 56 37 395 1039 387 912 803 273 49 30 327 8046635 2116 1837 609 1058 449 582 1031 224 341 402 363 146 89 74 297 404 303 377 321 113 76 57 270 320

Spring2020Analytics.txt: 3624 3496 3102 1579 1238 679 1486 1017 599 703 1137 842 224 32 21 103 434 688 1007 774 221 30 21 101 2605651 3942 3711 1421 2213 308 2148 1349 214 443 739 804 310 46 37 173 1390 439 727 799 216 46 36 162 12866635 2101 1979 797 1273 31 752 1039 188 601 739 426 173 21 15 3 123 592 701 399 162 18 13 2 92

Summer2020Analytics.txt: 3624 2021 1983 771 1137 113 717 1083 183 307 526 601 211 27 4 13 332 297 506 600 208 26 4 13 3295651 3013 2883 1267 1393 353 1240 1297 346 226 402 373 102 16 13 17 1864 214 401 369 96 15 13 17 17586635 1731 1546 663 817 251 612 799 135 107 392 649 81 30 21 71 380 103 384 621 80 30 20 70 238

In: Computer Science

Java queue linked list /* * Complete the enqueue(E val) method * Complete the dequeue() method...

Java queue linked list

/*
* Complete the enqueue(E val) method
* Complete the dequeue() method
* Complete the peek() method
* No other methods/variables should be added/modified
*/
public class A3Queue {
   /*
   * Grading:
   * Correctly adds an item to the queue - 1pt
   */
   public void enqueue(E val) {
       /*
       * Add a node to the list
       */
   }
   /*
   * Grading:
   * Correctly removes an item from the queue - 1pt
   * Handles special cases - 0.5pt
   */
   public E dequeue() {
       /*
       * Remove a node from the list and return it
       */
       return null;
   }
   /*
   * Grading:
   * Correctly shows an item from the queue - 1pt
   * Handles special cases - 0.5pt
   */
   public E peek() {
       /*
       * Show a node from the list
       */
       return null;
   }
  
   private Node front, end;
   private int length;
   public A3Queue() {
       front = end = null;
       length = 0;
   }
   private class Node {
       E value;
       Node next, prev;
       public Node(E v) {
           value = v;
           next = prev = null;
       }
   }
}

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

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


public class A3Driver {
  
   public static void main(String[] args) {
      
       A3DoubleLL list = new A3DoubleLL<>();
       for(int i = 1; i < 10; i++) {
           list.add(i);
       }
       System.out.println("Before Swap");
       System.out.println(list.printList());
       System.out.println(list.printListRev());
       list.swap(4);
       System.out.println("After Swap");
       System.out.println(list.printList() + ":1,2,3,4,6,5,7,8,9,");
       System.out.println(list.printListRev() + ":9,8,7,6,5,4,3,2,1,");
       System.out.println();
      
       System.out.println("Hot Potatoe");
       A3CircleLL hotPotato = new A3CircleLL();
       hotPotato.playGame(5, 3);
       System.out.println("Correct:");
       System.out.println("Removed Player 4\nRemoved Player 3\nRemoved Player 5\nRemoved Player 2\nWinning player is 1");
       System.out.println();
      
       A3Queue queue = new A3Queue<>();
       queue.enqueue(5);
       queue.enqueue(20);
       queue.enqueue(15);
       System.out.println(queue.peek()+":5");
       System.out.println(queue.dequeue()+":5");
       queue.enqueue(25);
       System.out.println(queue.dequeue()+":20");
       System.out.println(queue.dequeue()+":15");

   }
}

In: Computer Science

Description A large percentage of drugs (>60%) are based on natural products that have been isolated...

Description A large percentage of drugs (>60%) are based on natural products that have been isolated from nature. For this assignment, pick a drug that is a natural product or is based on the structure of a natural product. The compound is required to have at least 4 chiral carbons. Students must choose a unique compound. Post the structure of the drug. (1 point) List four functional groups that are in the molecule. (2 points) Identify the chiral carbons and configuration (R or S) for each carbon. (2 points) Describe what the drug is used to treat. (1 point) List the source of the natural product. (2 points) List an interesting fact or why you picked this compound. (1 point) Include reference(s). (1 point)

In: Chemistry