1.
a) Write a C program to calculate |A-B|. You should type in A and B when running the program.
b) Write a C program using a function to calculate (A-B)^(1/2)
-If A > B, the result will be (A-B)^(1/2)
-If A < B,the result will be (B-A)^(1/2)i
-You should type in A and B when running the program.
In: Computer Science
Explain the Starving Time at Jamestown in the winter of 1609-1610
In: Operations Management
Peterson algorithm operating systems can someone explain to me what will be shared between the two processes? and how is the order of execution in the two processes? if possible by drawing it will be better
i am mainly confused on how the order of execution between the two processes will be and how will the data be shared between them. i am also confused how the program counter will work between them
In: Computer Science
What is collective bargaining?
What is an exception to the WARN (Worker Adjustment and Retraining Act)?
In: Operations Management
In: Chemistry
Please refer on the article titled as “Improving Occupational Safety and Health in Construction”, published in The Ingenieur, Vol. 69 January – March 2017 by the Board of Engineers Malaysia. simplify and create a summary of the article. (150words)
In: Mechanical Engineering
What is the sociological imagination and how is it related to agency and social structure?
In: Psychology
In: Operations Management
Discuss a population group that is facing greater challenges and barriers to accessing care in the United States. Include the following in your discussion:
In: Operations Management
Discuss a population group that is facing greater challenges and barriers to accessing care in the United States. Include the following in your discussion:
In: Operations Management
Choose Amazon to analyze
High level risk management assessment, Identify 3 Traditional hazard risks, Identify 3 ERM type risks, and discuss the risks and evaluate potential costs of these risks
In: Operations Management
JAVA coding language:
Consider the method getAllCharAsString:
public statis String getAllCharAsString(String inputStr, char target) {
}
The method accepts a String parameter, inputStr, and a char parameter, target. It returns the result string consisting of all the characters in inputStr which match the target character (matching is case sensitive, for example, 'c' does not match "C"). If the characters match, the character is appended to the result String. After all the characters in inputStr have been compared, the method returns the result String. The method returns the empty String if there were no matches. Assume the inputStr is a String with length >= 0.
Example 1:
String str = "Open the pod bay doors Hal.";
String resStr = getAllCharsAsString(str, 'o');
resStr would be the String, "ooo".
Example 2:
String str = "Open the pod bay doors Hal.";
String resStr = getAllCharsAsString(str, 'z');
resStr would be the empty String, " ".
Write the getAllCharAsString method body in the box below.
In: Computer Science
c++ programing.
Objectives
Define a class called Person with private members name of type string, and money of integer type. The class has the public member functions set(), getMoney(), print(), and a parameterized constructor with default values.
Define a class called Patient with private data members name of type string, durationOfTreatment, and TreatmentCost of type integer. The class has the public member functions set(), getCost(), getDuration(), print(), and a parameterized constructor with default values.
Define a class called Doctor that publicly inherits the class Person and has the private members numberOfPatients,totalCost, list[] (an array of type Patient), and calculateTotalCost(). The class has the public member functions set(), print(), and a parameterized constructor with default values.
Implement all member functions, enforcing the principle of least privileged.
The following driver produces the given sample input / output.
int main()
{
Doctor Hakeem;
Hakeem.set("Ali Omar", 3000, 3);
Hakeem.print();
return 0;
}
Sample input / output:
Enter the name, duration, and cost of treatment number 1: Allergies 23 150
Enter the name, duration, and cost of treatment number 2: Bronchiectasis 15 280
Enter the name, duration, and cost of treatment number 3: Gallstones 10 50
Ali Omar has 3000 dirham and treated the following patients:
Allergies was treated for 23 minutes, at a cost 150 dirham per minute
Bronchiectasis was treated for 15 minutes, at a cost 280 dirham per minute
Gallstones was treated for 10 minutes, at a cost 50 dirham per minute
The total cost of the 3 patients is 8150 dirham
The overall total of money is 11150 dirham
In: Computer Science
In: Operations Management
Given the relation R = {(n, m) | n, m ∈ ℤ, n ≥ m}. Which of the following statements about R is correct?
|
R is not a partial order because it is not antisymmetric |
|
|
R is not a partial order because it is not reflexive |
|
|
R is a partial order |
|
|
R is not a partial order because it is not transitive |
In: Computer Science