Questions
Number assigned is #5 The classmate I chose have the number #10 The answers should be...

Number assigned is #5

The classmate I chose have the number #10

The answers should be written as this one below:

*Just fill the table

A

B   

Cin

I1   

I0

Output

Cout   

Function Performed

Assignment directions:

Part 1.

The Arithmetic/Logic Unit (figure 2.11 of your handout as posted in Blackboard) [in your course note] we discussed in Section I E of the Module 2 a simple ALU capable of performing only four functions namely:

1) A AND B;
2) A OR B;
3) NOT B;
4) A plus B plus the Carry-in

Now, show your understanding of that simple ALU by giving the following for a set of inputs based on the 6 bit binary representation of your # in Class Members (see table below with your names in it). Note: For this exercise, you will be using the 5 least significant bits (LSB) based on your number!

1) the OUTPUT and CARRY OUT outputs


2) the type of calculation (AND, OR, NOT, or plus)


where the 5-bit inputs represent A, B, Carry-in, I1, and I0 respectively.


For example: "#35. Deborah Askew" has a binary value of 100011 but using the 5 least significant bits (colored in red) with A = 0, B = 0, Carry-in (Cin) = 0, I1 = 1, and I0 = 1.

In this example, for Deborah Askew, since I1 = 1, and I0 = 1, then the ALU will be performing ADDITION (SUMMING). It will be performing addition on the data inputs seen on A, B, and Cin: where A = 0, B = 0, and Cin = 0.

Hence, 0 + 0 + 0 implies Output = 0 and Carry-Out = 0

Number

Student Name

X

A

B

Cin

I1

I0

Output

Cout

Function Performed

35

Deborah

Askew

1

0

0

0

1

1

0

0

ADDITION

Here is another example for Ingram James whose number is #40.

Six-digit binary is: 101000

Using the 5 LSB, 01000, we have A = 0, B = 1, Carry-in (Cin) = 0, I1 = 0, and I0 = 0.

Since I1 = 0 and I0 = 0, then the ALU will be performing the AND function on the inputs A and B.

So, A AND B implies Cout = 0 and Output = 0.

Number

Student Name

X

A

B

Cin

I1

I0

Output

Cout

Function Performed

40

Ingram

James

1

0

1

0

0

0

0

0

AND

Now, you will be doing a similar analysis as above two examples for your unique number as given to you in the data table below.

Be sure to include your class number and the 6-bit representation in your response first but again, you must use the five LSB for your interpretation!

_ _ _ _ _ _

Part 2

Now pick another classmate's number randomly in the data table provided below and repeat part 1 steps for the number picked.

______________

Part 3

Now research the Internet and other sources to find other functions that the typical modern day ALU can perform. The ALU we discussed in class can perform only four functions that include AND, OR, NOT B, and ADDITION.

Your response to this part should provide information about the following:

  1. The additional functions identified (Do not include Functions already discussed in class or course notes)!
  2. The computer that the ALU is used on;
  3. The source of your information (citation).

In: Computer Science

Hello sir can you plz change my below code like change names , function name and...

Hello sir can you plz change my below code like change names , function name and add comments so it wont look same but run same.

#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
#include<time.h>
struct patient {
int id;
int age;
bool annualClaim;
int plan;
char name[30];
char contactNum[15];
char address[50];
};
#define MAX_LENGTH 500
struct patient patients[100];
int patientCount = 0;
struct claim {
int id;
int claimedYear;
int amountClaimed;
int remaininigAmount;
};
struct claim claims[100];
void subscribe()
{
system("cls");
patients[patientCount].id = patientCount + 1;
printf("Enter age: ");
scanf("%d", & patients[patientCount].age);
printf("\n\n%-25sHealth Insurence Plan\n\n", " ");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", " ", "Plan 120(RM)", "Plan 150(RM)", "Plan 200(RM)");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20d|%-20d|%-20d|\n", "Monthly Premium", 120, 150, 200);
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20d|%-20d|%-20d|\n", "Annual Claim Limit", 120000, 150000, 200000);
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20d|%-20d|%-20d|\n", "Lifetime Claim Limit", 600000, 750000, 1000000);
printf("-----------------------------------------------------------------------------------------------\n");
printf("\n\n%-25sAge Group and Health Insurence Plan\n\n", " ");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-25s%-30s\n", "Types of Claim", " ", "Eligibility Amount");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", " ", "Plan 120(RM)", "Plan 150(RM)", "Plan 200(RM)");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", "Room Charges", "120/day", "150/day", "200/day");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", "Intensive Care Unit", "250/day", "400/day", "700/day");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", "Hospital Supplies and Services", " ", " ", " ");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-60s|\n", "Surgical Fees", "As charged Sbject to approval by ZeeMediLife");
printf("-----------------------------------------------------------------------------------------------\n");
printf("|%-30s|%-20s|%-20s|%-20s|\n", "Other Fees", " ", " ", " ");
printf("-----------------------------------------------------------------------------------------------\n\n");
int ch;
do {
printf("Select a Claim Limit Type\n1-Annual Claim Limit 2-Lifetime Claim Limit: ");
scanf("%d", & ch);
} while (ch < 1 || ch > 2);
if (ch == 1)
patients[patientCount].annualClaim = true;
else
patients[patientCount].annualClaim = false;
do {
printf("Select a plan\n1-Plan120 2-Plan150 3-Plan200: ");
scanf("%d", & ch);
} while (ch < 1 || ch > 3);
patients[patientCount].plan = ch;
printf("Enter Name: ");
scanf("%s", & patients[patientCount].name);
printf("Contact Number: ");
scanf("%s", & patients[patientCount].contactNum);
printf("Enter Address: ");
scanf("%s", & patients[patientCount].address);
FILE * fp;
fp = fopen("patients.txt", "a");
fprintf(fp, "%d,%s,%d,%d,%d,%s,%s\n", patients[patientCount].id, patients[patientCount].name, patients[patientCount].age, patients[patientCount].annualClaim, patients[patientCount].plan, patients[patientCount].contactNum, patients[patientCount].address);
fclose(fp);
time_t s;
struct tm * currentTime;
s = time(NULL);
currentTime = localtime( & s);
claims[patientCount].id = patients[patientCount].id;
claims[patientCount].amountClaimed = 0;
claims[patientCount].claimedYear = currentTime -> tm_hour + 1900;
if (patients[patientCount].annualClaim == true)
{
if (patients[patientCount].plan == 1)
claims[patientCount].remaininigAmount = 120000;
else if (patients[patientCount].plan == 2)
claims[patientCount].remaininigAmount = 150000;
else
claims[patientCount].remaininigAmount = 200000;
} else
{
if (patients[patientCount].plan == 1)
claims[patientCount].remaininigAmount = 600000;
else if (patients[patientCount].plan == 2)
claims[patientCount].remaininigAmount = 750000;
else
claims[patientCount].remaininigAmount = 1000000;
}
patientCount++;
fp = fopen("claims.txt", "a");
if (fp == NULL)
printf("File Dont exist");
fprintf(fp, "%d,%d,%d,%d\n", claims[patientCount].id, claims[patientCount].claimedYear, claims[patientCount].amountClaimed, claims[patientCount].remaininigAmount);
fclose(fp);
system("pause");
}
void claimProcess()
{
int id;
bool found = false;
system("cls");
printf("Enter patient ID for which you want to claim insurrence: ");
scanf("%d", & id);
int i;
for (i = 0; i < patientCount; i++)
{
if (patients[i].id == id)
{
found = true;
break;
}
}
if (found == false)
{
printf("subscriber not found\n");
return;
}
int numOfDaysHospitalized, suppliesCost, surgicalFee, otherCharges;
bool ICU;
printf("How many days were you haspitalized: ");
scanf("%d", & numOfDaysHospitalized);
int ICUFlag;
do {
printf("Select A Ward Type\n1-Normal Ward 2-ICU: ");
scanf("%d", & ICUFlag);
} while (ICUFlag < 1 || ICUFlag > 2);
if (ICUFlag == 2)
ICU = true;
else
ICU = false;
printf("Enter Cost of Supplies and Services: ");
scanf("%d", & suppliesCost);
printf("Enter Surgical Fees: ");
scanf("%d", & surgicalFee);
printf("Enter Other Charges: ");
scanf("%d", & otherCharges);
int ICUCharges = 0;
if (ICU == true)
{
if (patients[i].plan == 1)
ICUCharges = numOfDaysHospitalized * 120;
else if (patients[i].plan == 2)
ICUCharges = numOfDaysHospitalized * 150;
else
ICUCharges = numOfDaysHospitalized * 200;
} else
{
if (patients[i].plan == 1)
ICUCharges = numOfDaysHospitalized * 250;
else if (patients[i].plan == 2)
ICUCharges = numOfDaysHospitalized * 400;
else
ICUCharges = numOfDaysHospitalized * 700;
}
int totalClaimAmount = numOfDaysHospitalized + suppliesCost + surgicalFee + otherCharges + ICUCharges;
if (patients[i].annualClaim == true)
{
if (patients[i].age > 60)
{
printf("The subscriber age has exceeded the limit(60 Year), Not Eligible");
return;
}
}
int j;
for (j = 0; j < patientCount; j++)
{
if (claims[j].id == patients[i].id)
break;
}
int amountToBeBorne = 0;
if (totalClaimAmount <= claims[j].remaininigAmount)
{
claims[j].amountClaimed += totalClaimAmount;
claims[j].remaininigAmount -= totalClaimAmount;
} else
{
amountToBeBorne = totalClaimAmount - claims[j].remaininigAmount;
claims[j].amountClaimed += (totalClaimAmount - amountToBeBorne);
claims[j].remaininigAmount = 0;
printf("\n\nThe amount that can be claimed is less then the claim by subscriber. %d RM should be given by subscriber themselves\n", amountToBeBorne);
}
FILE * fp;
fp = fopen("claims.txt", "w");
for (int i = 0; i < patientCount; i++)
fprintf(fp, "%d,%d,%d,%d\n", claims[i].id, claims[i].claimedYear, claims[i].amountClaimed, claims[i].remaininigAmount);
fclose(fp);
printf("Subscriber ID: %d\nSubscriber Name: %s\nSubscriber Claimed Year: %d\nSubscriber amount Claimed: %d\nSubscriber Remaining Claimed: %d\n", claims[j].id, patients[i].name, claims[j].claimedYear, claims[j].amountClaimed, claims[j].remaininigAmount);
system("pause");
}
void accountInfo()
{
system("cls");
int ch;
printf("1-Total Amount Claimed by LifeTime Claim Limit subscriber\n");
printf("2-Total number of Annual Claim Limit who have exhausted all their eligible amount\n");
scanf("%d", & ch);
if (ch == 1)
{
int totalAmountClaimedByLifeTimeSubs = 0;
for (int i = 0; i < patientCount; i++)
{
if (patients[i].annualClaim == false)
{
for (int j = 0; j < patientCount; j++)
{
if (claims[j].id == patients[i].id)
{
totalAmountClaimedByLifeTimeSubs += claims[j].amountClaimed;
}
}
}
}
printf("\nTotal amount Claimed By LifeTime Subscribers is: %d\n", totalAmountClaimedByLifeTimeSubs);
} else
{
int count = 0;
for (int i = 0; i < patientCount; i++)
{
if (claims[i].remaininigAmount <= 0 && patients[i].annualClaim == true)
count++;
}
printf("Total number of Annual Claim Limit Subcriber who have exhausted all their amount are: %d\n", count);
}
system("pause");
}
void searchingFunctionalities()
{
system("cls");
int ch;
printf("1-Search by ID\n2-Search by age\n");
scanf("%d", & ch);
if (ch == 1)
{
int id;
printf("Enter patient ID for which you want Search: ");
scanf("%d", & id);
int i;
for (i = 0; i < patientCount; i++)
{
if (patients[i].id == id)
{
printf("\nSubscriber Name: %s\nSubscriber Age: %d\nSubscriber Contact: %s\nSubscriber Address: %s\n", patients[i].name, patients[i].age, patients[i].contactNum, patients[i].address);
break;
}
}
printf("Subscriber Not Found");
} else
{
int age;
printf("Enter age for which you want Search: ");
scanf("%d", & age);
for (int i = 0; i < patientCount; i++)
{
if (patients[i].age == age)
{
printf("\nSubscriber Name: %s\nSubscriber ID: %d\nSubscriber Contact: %s\nSubscriber Address: %s\n", patients[i].name, patients[i].id, patients[i].contactNum, patients[i].address);
}
}
}
system("pause");
}
void loadData()
{
char line[MAX_LENGTH];
const char * delimiter = ",\n";
FILE * fp;
fp = fopen("patients.txt", "r");
char c;
if (fp == NULL)
{
printf("file not found");
return;
}
while (fp != NULL)
{
if (fgets(line, MAX_LENGTH - 1, fp) == NULL)
break;
if (line[1] == '\0')
break;
patients[patientCount].id = atoi(strtok(line, delimiter));
strcpy(patients[patientCount].name, strtok(NULL, delimiter));
patients[patientCount].age = atoi(strtok(NULL, delimiter));
patients[patientCount].annualClaim = strtok(NULL, delimiter);
patients[patientCount].plan = atoi(strtok(NULL, delimiter));
strcpy(patients[patientCount].contactNum, strtok(NULL, delimiter));
strcpy(patients[patientCount].address, strtok(NULL, delimiter));
strcpy(line, "\0");
patientCount++;
}
fclose(fp);
fp = fopen("claims.txt", "r");
int claimCount = 0;
while (fp != NULL)
{
if (fgets(line, MAX_LENGTH - 1, fp) == NULL)
break;
if (line == "\n")
break;
claims[claimCount].id = atoi(strtok(line, delimiter));
claims[claimCount].claimedYear = atoi(strtok(NULL, delimiter));
claims[claimCount].amountClaimed = atoi(strtok(NULL, delimiter));
claims[claimCount].remaininigAmount = atoi(strtok(NULL, delimiter));
strcpy(line, "\0");
claimCount++;
}
fclose(fp);
}
int menu()
int ch;
do {
system("cls");
               printf("Select one of the below option to continue\n");
printf("1-Insurence Plan Subscription\n");
printf("2-Claim Processing\n");
printf("3-Accounts Information\n");
printf("4-Searching Functionalities\n");
printf("5-Exit\n");
scanf("%d", & ch);
} while (ch > 5 || ch < 1);
return ch;
}
int main()
{
int ch;
loadData();
do {
ch = menu();
if (ch == 1)
subscribe();
else if (ch == 2)
claimProcess();
else if (ch == 3)
accountInfo();
else if (ch == 4)
searchingFunctionalities();
else
break;
} while (ch != 5);
system("pause");
return 0;
}

In: Computer Science

Using Matlab create an m. file that solves the following problem. Ramanujan's taxi. S. Ramanujan was...

Using Matlab create an m. file that solves the following problem. Ramanujan's taxi. S. Ramanujan was an Indian mathematician who became famous for his intuition for numbers. When the English mathematician G. H. Hardy came to visit him in the hospital one day, Hardy remarked that the number of his taxi was 1729, a rather dull number. To which Ramanujan replied, "No, Hardy! No, Hardy! It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways." Verify this claim by writing a program ​that takes an integer command-line argument n and prints all integers less than or equal to n that can be expressed as the sum of two cubes in two different ways - find distinct positive integers ​a ,​b ,​c , and​ d such that​ a3 + b3 = c3 + d3. Use four nests for loops. Now, the license plate 87539319 seems like a rather dull number. Determine why it's not.

In: Computer Science

11. Payroll in C++ Design a PayRoll class that has data members for an employee’s hourly...

11. Payroll in C++

Design a PayRoll class that has data members for an employee’s hourly pay rate, number of hours worked of type double. The default constructor will set the hours worked and pay rate to zero. The class must have a mutator function to set the pay rate for each employee and hours worked. The class should include accessors for both the hours worked and the rate of pay. The class should lastly have a getGross function that will return a double calculated by multiplying the hours worked by the rate
of pay.

Write a program with an array of seven PayRoll objects. The program should ask the user for the rate of pay for each employee and the number of hours each employee has worked. Be sure to include an employee claiming to work more then 60 hours per week. Print out, the array number of the employee, the hours worked, the rate of pay, and the gross pay, of all the employee's each on their own line. Set the precision for printing the doubles to two decimal places.

Input Validation: Do not accept values greater than 60 for the number of hours worked, simply have the set function set number of hours worked to 60, the maximum allowed.

Data output:
Creating◦7◦Payroll◦objects.⏎
Enter◦the◦#◦0◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦0◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦1◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦1◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦2◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦2◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦3◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦3◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦4◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦4◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦5◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦5◦employee's◦hours◦worked◦for◦the◦week:Enter◦the◦#◦6◦employee's◦rate◦of◦pay◦per◦hour:Enter◦the◦#◦6◦employee's◦hours◦worked◦for◦the◦week:⏎

Employee◦#◦0◦worked◦22.00◦hours◦at◦$12.22◦for◦a◦gross◦pay◦of◦$268.84⏎
Employee◦#◦1◦worked◦36.00◦hours◦at◦$99.99◦for◦a◦gross◦pay◦of◦$3599.64⏎
Employee◦#◦2◦worked◦20.00◦hours◦at◦$45.67◦for◦a◦gross◦pay◦of◦$913.40⏎
Employee◦#◦3◦worked◦0.00◦hours◦at◦$56.78◦for◦a◦gross◦pay◦of◦$0.00⏎
Employee◦#◦4◦worked◦5.00◦hours◦at◦$40.45◦for◦a◦gross◦pay◦of◦$202.25⏎
Employee◦#◦5◦worked◦60.00◦hours◦at◦$30.35◦for◦a◦gross◦pay◦of◦$1821.00⏎
Employee◦#◦6◦worked◦45.00◦hours◦at◦$30.33◦for◦a◦gross◦pay◦of◦$1364.85⏎

In: Computer Science

Please briefly explain the answer and why. (1) What are the differences between a process and...

Please briefly explain the answer and why.

(1) What are the differences between a process and a thread? Explain in perspectives of memory sharing, switching, communication, etc.


(2) In inter-process communication using message passing, there are two types of send/receive operations: blocking send/receive and non-blocking send/receive. What is the difference between the two approaches? Explain how the operations will behave when called.


(3) When a process is created, memory is allocated for the process. Describe each section of the memory allocated to the process, and what goes into each section.

In: Computer Science

At L's Insurance Company, a surcharge (an extra cost) is added to the insurance premium if...

At L's Insurance Company, a surcharge (an extra cost) is added to the insurance premium if the driver has points on his or her license. If the driver has no points, there is no surcharge. If the driver has 1 to 4 points, the surcharge is 8% of the insurance premium. If the driver has 5 to 8 points, the surcharge is 15% of the insurance premium. If the driver has 9 points, the surcharge is 18% of the insurance premium. If the driver has 10 or more points, the surcharge is 23% of the insurance premium. Write a complete Java program that includes the statements to read in the insurance premium and the number of points from the keyboard using the Scanner class. The program should then calculate the surcharge and the total cost, which is the sum of the premium and the surcharge. Use constants where applicable and format your output with System.out.printf method.

Class Name: InsuranceCost

Sample Output:

Enter insurance premium amount: #####

Enter the number of points you have: ##

Your surcharge is: $###,###.##

Your total cost for insurance is: $###,###.##

In: Computer Science

Computer System Forensics course a long and comprehensive explanation by typing please 1.What are some notable...

Computer System Forensics course

a long and comprehensive explanation by typing please

1.What are some notable differences between Windows forensics and Linux forensics?

2.Name some popular shell commands that can be considered very useful for forensic investigations.

intrusion detection course

3.Discuss 3 issues threatening web applications

In: Computer Science

Q3)   Write a C program that counts the number of odd numbers with using function count()...

Q3)   Write a C program that counts the number of odd numbers with using function count() within the set. The set has only one negative number which determines the end of set.

In: Computer Science

select the correct window_frame_clause a) INTERVAL '5' DAYS AND UNLIMITED PRECEDING b) INTERVAL '5' DAYS PRECEDING...

select the correct window_frame_clause

a) INTERVAL '5' DAYS AND UNLIMITED PRECEDING

b) INTERVAL '5' DAYS PRECEDING AND CURRENT ROW

c) INTERVAL '5' DAYS AND CURRENT ROW

d) INTERVAL '5' DAYS AND FIRST ROW

In: Computer Science

(a) List and explain three types of pipeline hazards. (b) List and explain three types of...

(a) List and explain three types of pipeline hazards.

(b) List and explain three types of cache misses.

(c) What is the principle of locality?

(d). Discuss the advantage and disadvantage of the write back and write through policy in the cache.

In: Computer Science

Write two functions in C++ called readData() and findAverage(). Please answer it in C++ The first...

  1. Write two functions in C++ called readData() and findAverage().

Please answer it in C++

The first function should take a reference to an ifstream object and a reference to an array of double, read data into the array from the file and return the number of values read. It should stop reading when the end of the file is reached. The data file contains prices of an unspecified item, one per line.

The second function takes a reference to an array of double, and an int indicating the number of elements in the array and then calculates and returns the average of the values in the array.

(b) The program below is designed to use the functions readData() and findAverage()defined in part a above to read the data from a file called prices.txt to the array and then calculate and display the average. Currently, the program has missing sections indicated by the empty text boxes. Complete the program by inserting the missing statements into the spaces provided.

In: Computer Science

Discuss the CSVLOD model and its relevance to this Damien mask Business context? (20 Marks)

Discuss the CSVLOD model and its relevance to this Damien mask Business context?

In: Computer Science

For this assignment, write a parallel program in C++ using OpenMP for vector addition. Assume A,...

For this assignment, write a parallel program in C++ using OpenMP for vector addition. Assume A, B, C are three vectors of equal length. The program will add the corresponding elements of vectors A and B and will store the sum in the corresponding elements in vector C (in other words C[i] = A[i] + B[i]). Every thread should execute an approximately equal number of loop iterations.

As an input vector A, initialize its size to 10,000 and elements from 1 to 10,000.

So, A[0] = 1, A[1] = 2, A[2] = 3, … , A[9999] = 10000.

Input vector B will be initialized to the same size with opposite inputs.

So, B[0] = 10000, B[1] = 9999, B[2] = 9998, … , B[9999] = 1

Using the above input vectors A and B, create output Vector C which will be computed as

C[ i ] = A[ i ] + B[ i ];

You should check whether your output vector value is 10001 in every C[ i ].

First, start with 2 threads (each thread adding 5,000 vectors), and then do with 4, and 8 threads. Remember sometimes your vector size can not be divided equally by the number of threads. You need to slightly modify the pseudo code to handle the situation accordingly. (Hint: If you have p threads, first (p - 1) threads should have the same input size and the last thread will take care of whatever the remainder portion.) Check the running time from each experiment and compare the result. Report your findings from this project in a separate paragraph.

Your output should show a team of treads does evenly distributed work, but a big vector size might cause an issue in output. You can create mini version of original vector in much smaller size of 100 (A[0] = 1, A[1] = 2, A[2] = 3, … , A[99] = 100) and run with 6 threads once and take a snapshot of your output. And run with original size with 2, 4, and 8 threads to compare running times.

Pseudocode for Assignment

mystart = myid*n/p; // starting index for the individual thread

myend = mystart+n/p; // ending index for the individual thread

for (i = mystart; i < myend; i++) // each thread computes local sum

do vector addition // and later all local sums combined

In: Computer Science

Objective: CODE IN JAVA Create a program that displays a design or picture for someone in...

Objective: CODE IN JAVA

Create a program that displays a design or picture for someone in your quarantine household/group: a pet, a parent, a sibling, a friend. Make them a picture using the tools in TurtleGraphics and run your program to share it with them! Use a pen object, as well as any of the shape class objects to help you create your design. You must use and draw at least 5 shape objects. You must use a minimum of 4 different colors in your design. You must pick up the pen at least once in your code. You mut put down the pen at least once in your code.

In: Computer Science

You do not need to import the Math class into your Java program to use methods...

You do not need to import the Math class into your Java program to use methods or constants in it.

Group of answer choices

True

False

In: Computer Science