Questions
Write a program that reads a file line by line, and reads each line’s tokens to...

Write a program that reads a file line by line, and reads each line’s tokens to create a Student object that gets inserted into an ArrayList that holds Student objects.  Each line from the file to read will contain two strings for first and last name, and three floats for three test grades.  After reading the file and filling the ArrayList with Student objects, sort the ArrayList and output the contents of the ArrayList so that the students with the highest average are listed on top.

The Student class should have instance data for first and last name, and a float array to hold three test grades.  Create getters and setters for first and last name.  Create one getter and one setter for inserting tests into the array.  Don’t forget to verify that the quiz grades are within a range that makes sense before you insert them into the array.  Also, verify that you do not go outside the index range of the array when inserting quizzes.  Create a method to calculate and return test average. Also, override the toString method and the equals method to something that make sense. Also, implement the Comparable interface on the Student class so that when you compare Student objects by comparing the student's test average. If the average is the same when comparing, then compare the last names. If the last names are the same, then compare the first names.

Here is the file that the program should read:

Text File:

Frank Hanford 78.5 65.9 98.2
John Blake 93.1 85.9 89.1
Alex Sanders 87.1 56.9 67.2
Jane Hope 72.1 85.1 77.9
Donald Davidson 85.1 72.1 77.9
Alan Davidson 77.9 72.1 85.1
Perkins Jenkins 87.5 75.9 90.1
Barbara Thompson 90.1 89.9 99.7
Michael Jones 78.1 69.9 81.2

In: Computer Science

Pick one area where you think Blockchain Technology could be proposed as a solution and briefly...

Pick one area where you think Blockchain Technology could be proposed as a solution and briefly explain your proposed solution. Your final document should include an Abstract and a Conclusion

In: Computer Science

4) Interest (Show all of your work!) Find the interest rate required for an investment of...

4) Interest (Show all of your work!) Find the interest rate required for an investment of $10,000 to grow to $15,000 in 5 years if the interest is compounded as follows:

a) Annually

b) Quarterly

5) Inflation (Show all of your work!) Assuming annual compounding, find the time it would take for the general level of prices, in the economy, to double at the following annual inflation rates:

a) 3%

b) 8%

6) Time to Double (Show all of your work!) With an interest rate of 6% and monthly compounding, how long will it take for an investment to double in value?

In: Finance

Can you tell me about DNA extraction. Everything you know, what is the purpose and applications...

Can you tell me about DNA extraction. Everything you know, what is the purpose and applications of it, what are the advantages and disadvantages. And please write the function of each chemical:

  • RBC lysis buffer
  • PBS
  • Trizol

Thank you in advance! I am forever grateful for your help.

In: Biology

The Lucas Numbers are a sequence very similar to the Fibonacci Sequence, the only difference being...

The Lucas Numbers are a sequence very similar to the Fibonacci Sequence, the only difference being that the Lucas Numbers start with L0 = 2 and L1 = 1 as opposed to Fibonacci’s F0 = 0 and F1 = 1. Concretely, they are defined by L0 = 2, L1 = 1, and Ln := Ln−1 + Ln−2 for n > 1. Write a function in C++ that takes an integer argument N and returns the sum of the first N + 1 even Lucas Numbers.

In: Computer Science

Write an R function max.streak(p) that gives the length of the maximum "streak" of either all...

Write an R function max.streak(p) that gives the length of the maximum "streak" of either all heads or all tails in 100 flips of a (possibly biased) coin whose probabilty of showing heads is pp.

Use your function to determine the expected length (rounded to the nearest integer) of the maximum streak seen in 100 flips of a coin when the probability of seeing "heads" is 0.700.70.

As a check of your work, note that the expected length of the maximum streak seen in 100 flips of a fair coin should be very close to 7.

In: Math

Write a C code to let the main thread create N child threads, where each created...

Write a C code to let the main thread create N child threads, where each created thread will randomly generate an integer between 0 to 10 and put it into a global array variable. After that, the main thread will calculate the sum of all the generated integers. N should be input as a command line argument.

Complete the following C code by filling all “???”s in the code sketch. NOTE: when you compile the code, you need to add the parameter “-lpthread” to “gcc”, e.g., “gcc YourCode.c -lpthread”

// include the header file that allows us to use pthread
#include <???>
#include <stdio.h>
// include the header file that allows us to use dynamic memory management 
#include <???>
// define a pointer to point to an array to hold the randomly generated integers
int *a;

// define the function used to create a thread
???runner(???param);

int main(int argc, char *argv[])
{
        if (argc != 2)
        {
                fprintf(stderr, "usage: %s <integer value>\n", argv[0]);
                return -1;
        }

        int N = atoi(argv[1]);

        if (N<=0)
        {
                fprintf(stderr, "%d must be > 0\n", N);
                return -1;
        } 

        // define an array to hold the threads to be created
        ???              workers[N]; 

        // define a set of thread attributes for creating threads
???                     attr;

        // define a variable later used for “for” loop
int i;

        // use dynamic memory management to create an array to hold the integers
        a = ???                                         ;

        // seed the random number generator
        srandom((unsigned)time(NULL));

        // initialize the default thread attributes
        ???





        // use “for” loop to create the threads, where the index of the created thread in workers
// array should be passed to the thread as the parameter
        ???





        // use “for” loop to wait for all the threads to exit
        ???




        // calculate the sum
        int sum = 0;

        for (i=0; i<N; i++) sum += a[i];

        printf("sum = %d\n", sum);

        // free the dynamically created array
        ???

}

// The created thread will start its execution from this function
???             runner(???              param)
{
        // get the index of the thread in workers array and put it to “thread_index”
        int thread_index = ???                          ;       

        // randomly generate an integer between 0 to 10
        a[thread_index] = random()%11;  

        // print the information on the screen
        printf("Thread %d generates integer %d ...\n", thread_index, a[thread_index]);

        // terminate the thread
        ???



}

In: Computer Science

Identify an example of a health communication intervention that has addressed the needs of vulnerable or...

Identify an example of a health communication intervention that has addressed the needs of vulnerable or underserved groups in your community. What has been the impact of this intervention among these groups? What suggestions would you make for improvement?

In: Operations Management

Please create a C++ program that will ask a high school group that is made of...

Please create a C++ program that will ask a high school group that is made of 5 to 17 students to sell candies for a fund raiser. There are small boxes that sell for $7 and large ones that sell for $13. The cost for each box is $4 (small box) and $6 (large box). Please ask the instructor how many students ended up participating in the sales drive (must be between 5 and 17). The instructor must input each student’s First name that sold items and enter the number of each box sold each (small or large). Calculate the total profit for each student and at the end of the program, print how many students participated and the total boxes sold for each (small and large) and finally generate how much profit the group made.

In: Computer Science

O and W, each of whom is married, purchase a parcel of investment property as jointtenants...

O and W, each of whom is married, purchase a parcel of investment property as jointtenants in a state in which survivorship is presumed among joint tenants. Title is taken inthis manner. This is not a community property state.A. Upon the death of either tenant, who would acquire the interest of the deceased tenant? Could this be defeated by will?B.What rights, if any, would a widow of the deceased tenant have in the property?

no the i vestment is not in india

In: Finance

Determine all possible two-stage compound gear combinations that will give an approximation to the Naperian base...

Determine all possible two-stage compound gear combinations that will give an approximation to the Naperian base 2.71828. Limit tooth numbers to between 18 and 80. Determine the arrangement that gives the smallest error.

Could you use mathcad since my professor is suggesting it with the code?

In: Mechanical Engineering

In python, write a program that asked the user to enter the monthly costs for the...

In python, write a program that asked the user to enter the monthly costs for the following expenses incurred from operating his automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should display total monthly cost and annual cost. Also, should contain main and calcExpenses functions, calcExpenses should only calculate the expenses and everything else should happen in the main function.

In: Computer Science

Please comment, exactly how this program works? #include <stdio.h> int main() { int i,j; int a[1000];...

Please comment, exactly how this program works?

#include <stdio.h>

int main()
{
int i,j;
int a[1000];

for(i=0;i<1000;i++)
a[i]=1;
  
for(i=2;i<1000;i++)
{
if(a[i]==1){
for(j=i+1;j<1000;j++)
{if(j%(i)==0)
a[j]=0;
}
}
}
printf("print numbers are:\n");
for(i=2;i<=1000;i++)
if(a[i]==1)
printf("%d, ",i);
}

In: Computer Science

You are interested in arranging financing to purchase a new car from Bloomington Cars, Inc. The...

You are interested in arranging financing to purchase a new car from Bloomington Cars, Inc. The car that you want has a sticker price of $42,000, an instant rebate of $3,500, a fair market value of $39,000, and a great sound system. The salesperson, while smoothing over his comb-over, taps his pinky ring on the hood of the car and tells you, “You picked the best car we have. I can also kick in a free Bloomington Cars coffee mug.” Since you love the car, you hop up and down and say, “Sold! I’ll take it.” You sign a loan contract for 60 monthly payments based on a rate of 7.3% per year and drive home with your new car and coffee mug, listening to that great sound system. (Your market rate of return for the risks you pose for a car loan is 5.5%.)

What is your monthly payment (rounded to two places)?

Group of answer choices

$802.25

$777.78

$767.81

$707.98

None of the above

Flag this Question

Question 21 pts

How much value did you destroy in pursuit of that great sound system and your free coffee mug (rounded to two places)?

Group of answer choices

$499.86

$1,197.03

$3,000.06

$2,324.09

None of the above

Flag this Question

Question 31 pts

What would have been a “fair” monthly payment (rounded to two places)?

Group of answer choices

$744.95

$837.61

$735.39

$767.43

None of the above

Flag this Question

Question 41 pts

Based on Questions #1 and #3, how much are you overpaying each month (rounded to two places)?

Group of answer choices

$26.82

$17.46

$8.24

$32.87

None of the above

Flag this Question

Question 51 pts

If you come to your senses in 12 months and realize what a bad deal you negotiated and would like to pay off this bad loan, how much do you owe (rounded to two places)?

Group of answer choices

$36,854.88

$33,014.89

$8,859.51

$31,878.28

None of the above

Flag this Question

Question 61 pts

How much interest will you pay in the first year of the loan (rounded to two places)?

Group of answer choices

$9,213.72

$2,592.00

$6,621.72

$3,452.28

None of the above

In: Finance

You eat at your office cafeteria every day during lunch time. However, you think it needs...

You eat at your office cafeteria every day during lunch time. However, you think it needs some improvements.

Write a letter to the manager of the cafeteria. In your letter about 350 words,

  • explain what you like about the cafeteria
  • describe the two (2) problems you experienced at the cafeteria and explain and example;
  • suggest two (2) ways how the problems can be resolved and explain an example.

\

In: Operations Management